Job Runner for Climate Impact Lab Jobs
Project description
====
jrnr
====
.. image:: https://img.shields.io/pypi/v/jrnr.svg
:target: https://pypi.python.org/pypi/jrnr
.. image:: https://img.shields.io/travis/ClimateImpactLab/jrnr.svg
:target: https://travis-ci.org/ClimateImpactLab/jrnr
.. image:: https://readthedocs.org/projects/jrnr/badge/?version=latest
:target: https://jrnr.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://pyup.io/repos/github/ClimateImpactLab/jrnr/shield.svg
:target: https://pyup.io/repos/github/ClimateImpactLab/jrnr/
:alt: Updates
Job Runner for Climate Impact Lab Jobs
* Free software: MIT license
* Documentation: https://jrnr.readthedocs.io.
Setting up this package
-----------------------
*Justin Simcock: complete these instructions and then remove this section from
the readme.*
1. Create a matching repository on github if you haven't already:
a. go to https://github.com/organizations/ClimateImpactLab/repositories/new
b. enter the following information:
owner
ClimateImpactLab
Repository Name
jrnr
Description
Job Runner for Climate Impact Lab Jobs
Privacy
Public
**Do not initialize the repo with a readme, license, or gitignore!**
c. Press the big green buttton
2. Execute the following commands in this directory:
.. code-block:: bash
git init
git add .
git commit -m "initial commit"
git remote add origin git@github.com:ClimateImpactLab/jrnr.git
git push -u origin master
3. Set up automated testing, coverage, updates, and docs:
a. Set up testing
i. go to https://travis-ci.org/ and sign in/sign up with github.
Make sure travis has access to the repositories on your github
account *and* those owned by the ClimateImpactLab by enabling
access in your account settings.
ii. Next to "My Repositories" click the '+' icon
iii. Flip the switch on ClimateImpactLab/jrnr. If
you don't see it in the list, click 'Sync account', and make
sure you are looking at the ClimateImpactLab repositories.
iv. Push a change to your package (for example, you could delete
this section). You should see tests start running on travis
automatically.
v. Start writing tests for your code in the
``jrnr/tests`` folder. There are some
examples already in there to get you started.
b. Set up docs
i. go to https://readthedocs.io and sign in/sign up with github.
Same deal - make sure readthedocs has access to your github
account and ClimateImpactLab.
ii. click 'Import a project', go to ClimateImpactLab, and refresh.
iii. click the '+' icon next to
ClimateImpactLab/jrnr. Pick a name for your
project. The name has to be globally unique (not just within
the ClimateImpactLab), so if you chose something with a common
name you may have to rename the docs.
iv. next time you push code to master, docs should build
automatically. You can view them at
https://jrnr.readthedocs.io/en/latest/
(substitute whatever name you chose).
c. Set up updates
i. go to https://pyup.io. you know the drill.
ii. Go to your account, and click '+ Add Repo'. Sync.
iii. Add ClimateImpactLab/jrnr
with "Dependency Updates" and "SafetyCI" turned on. Leave
"Update Schedules" off.
d. Set up test coverage monitoring
i. next up: https://coveralls.io. you got this.
e. Breathe easy. The next time you push code, these should all update for
you! Now that wasn't so bad, was it?
4. Develop with github:
a. In general, it's best to file an issue when you want to change something
or when you've found a bug, then write tests which test a-priori
assertions about desired behavior, and then write the minimum amount of
code required to pass these tests. See the contributing docs for more
workflow suggestions.
To run all tests on your local machine:
.. code-block:: bash
make test
5. Deploy
a. Set up deployment by registering the package on the python package index
(PyPI):
i. Create an account on PyPI: https://pypi.python.org/pypi
ii. Register the package:
.. code-block:: bash
python setup.py register
iii. Encrypt & package your credentials so travis can deploy for you:
.. code-block:: bash
python travis_pypi_setup.py
b. When you're ready to deploy this package, make sure all your changes are
committed. Then run:
.. code-block:: bash
bumpversion patch # (or minor or major)
git push
git push --tags
As soon as this new tagged commit passes tests, travis will deploy for
you
c. Anyone (in the world) should now be able to install your package with
.. code-block:: bash
pip install [package-name]
Features
--------
* TODO
Credits
---------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
=======
History
=======
0.2.1 (Current Version)
-----------------------
* Fix bug in ``slurm_runner.do_job`` which caused job duplication when race conditions on lock object creation occur (:issue:`3`)
* Infer filepath from passed function in ``slurm_runner``. Removes need to supply filepath argument in ``slurm_runner`` function calls (:issue:`5`)
* Adds ``return_index`` parameter to ``slurm_runner`` (:issue:`7`)
0.2.0 (2017-07-31)
------------------
* Fix interactive bug -- call interactive=True on ``slurm_runner.run_interactive()`` (:issue:`1`)
* Add slurm_runner as module-level import
0.1.2 (2017-07-28)
------------------
* Add interactive capability
0.1.1 (2017-07-28)
------------------
* Fix deployment bugs
0.1.0 (2017-07-28)
------------------
* First release on PyPI.
jrnr
====
.. image:: https://img.shields.io/pypi/v/jrnr.svg
:target: https://pypi.python.org/pypi/jrnr
.. image:: https://img.shields.io/travis/ClimateImpactLab/jrnr.svg
:target: https://travis-ci.org/ClimateImpactLab/jrnr
.. image:: https://readthedocs.org/projects/jrnr/badge/?version=latest
:target: https://jrnr.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://pyup.io/repos/github/ClimateImpactLab/jrnr/shield.svg
:target: https://pyup.io/repos/github/ClimateImpactLab/jrnr/
:alt: Updates
Job Runner for Climate Impact Lab Jobs
* Free software: MIT license
* Documentation: https://jrnr.readthedocs.io.
Setting up this package
-----------------------
*Justin Simcock: complete these instructions and then remove this section from
the readme.*
1. Create a matching repository on github if you haven't already:
a. go to https://github.com/organizations/ClimateImpactLab/repositories/new
b. enter the following information:
owner
ClimateImpactLab
Repository Name
jrnr
Description
Job Runner for Climate Impact Lab Jobs
Privacy
Public
**Do not initialize the repo with a readme, license, or gitignore!**
c. Press the big green buttton
2. Execute the following commands in this directory:
.. code-block:: bash
git init
git add .
git commit -m "initial commit"
git remote add origin git@github.com:ClimateImpactLab/jrnr.git
git push -u origin master
3. Set up automated testing, coverage, updates, and docs:
a. Set up testing
i. go to https://travis-ci.org/ and sign in/sign up with github.
Make sure travis has access to the repositories on your github
account *and* those owned by the ClimateImpactLab by enabling
access in your account settings.
ii. Next to "My Repositories" click the '+' icon
iii. Flip the switch on ClimateImpactLab/jrnr. If
you don't see it in the list, click 'Sync account', and make
sure you are looking at the ClimateImpactLab repositories.
iv. Push a change to your package (for example, you could delete
this section). You should see tests start running on travis
automatically.
v. Start writing tests for your code in the
``jrnr/tests`` folder. There are some
examples already in there to get you started.
b. Set up docs
i. go to https://readthedocs.io and sign in/sign up with github.
Same deal - make sure readthedocs has access to your github
account and ClimateImpactLab.
ii. click 'Import a project', go to ClimateImpactLab, and refresh.
iii. click the '+' icon next to
ClimateImpactLab/jrnr. Pick a name for your
project. The name has to be globally unique (not just within
the ClimateImpactLab), so if you chose something with a common
name you may have to rename the docs.
iv. next time you push code to master, docs should build
automatically. You can view them at
https://jrnr.readthedocs.io/en/latest/
(substitute whatever name you chose).
c. Set up updates
i. go to https://pyup.io. you know the drill.
ii. Go to your account, and click '+ Add Repo'. Sync.
iii. Add ClimateImpactLab/jrnr
with "Dependency Updates" and "SafetyCI" turned on. Leave
"Update Schedules" off.
d. Set up test coverage monitoring
i. next up: https://coveralls.io. you got this.
e. Breathe easy. The next time you push code, these should all update for
you! Now that wasn't so bad, was it?
4. Develop with github:
a. In general, it's best to file an issue when you want to change something
or when you've found a bug, then write tests which test a-priori
assertions about desired behavior, and then write the minimum amount of
code required to pass these tests. See the contributing docs for more
workflow suggestions.
To run all tests on your local machine:
.. code-block:: bash
make test
5. Deploy
a. Set up deployment by registering the package on the python package index
(PyPI):
i. Create an account on PyPI: https://pypi.python.org/pypi
ii. Register the package:
.. code-block:: bash
python setup.py register
iii. Encrypt & package your credentials so travis can deploy for you:
.. code-block:: bash
python travis_pypi_setup.py
b. When you're ready to deploy this package, make sure all your changes are
committed. Then run:
.. code-block:: bash
bumpversion patch # (or minor or major)
git push
git push --tags
As soon as this new tagged commit passes tests, travis will deploy for
you
c. Anyone (in the world) should now be able to install your package with
.. code-block:: bash
pip install [package-name]
Features
--------
* TODO
Credits
---------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
=======
History
=======
0.2.1 (Current Version)
-----------------------
* Fix bug in ``slurm_runner.do_job`` which caused job duplication when race conditions on lock object creation occur (:issue:`3`)
* Infer filepath from passed function in ``slurm_runner``. Removes need to supply filepath argument in ``slurm_runner`` function calls (:issue:`5`)
* Adds ``return_index`` parameter to ``slurm_runner`` (:issue:`7`)
0.2.0 (2017-07-31)
------------------
* Fix interactive bug -- call interactive=True on ``slurm_runner.run_interactive()`` (:issue:`1`)
* Add slurm_runner as module-level import
0.1.2 (2017-07-28)
------------------
* Add interactive capability
0.1.1 (2017-07-28)
------------------
* Fix deployment bugs
0.1.0 (2017-07-28)
------------------
* First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jrnr-0.2.2.tar.gz
(19.2 kB
view details)
Built Distribution
jrnr-0.2.2-py2.py3-none-any.whl
(12.6 kB
view details)
File details
Details for the file jrnr-0.2.2.tar.gz
.
File metadata
- Download URL: jrnr-0.2.2.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d24332b95b28c78dc9dd202d7150a79e8b53f5f011add5f8a535547dd2525105 |
|
MD5 | b63594055e09f291f561ab73348d16f3 |
|
BLAKE2b-256 | f038a77cb7946fd4e8124decc5de27d6e36a98124e8cd04464fb658e348bdf0b |
File details
Details for the file jrnr-0.2.2-py2.py3-none-any.whl
.
File metadata
- Download URL: jrnr-0.2.2-py2.py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74a544cff174e6a0f17e1ccbb9cf9f33d069d378203dc409dca7894841f9e59b |
|
MD5 | 66b71ce8c8a92a06fd46f38071a3d5e2 |
|
BLAKE2b-256 | 1c745993517722519f62ac83ea842a00830862d6a85580c5f2a8b815fa2213e5 |