Skip to content

Commit

Permalink
Merge pull request #31 from roocs/v0.1.2
Browse files Browse the repository at this point in the history
v0.1.2
  • Loading branch information
ellesmith88 committed Oct 19, 2020
2 parents 979d3b3 + 38ff279 commit ffebf1d
Show file tree
Hide file tree
Showing 51 changed files with 916 additions and 471 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- id: check-useless-excludes
27 changes: 27 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
#python:
# version: 3.6

conda:
environment: docs/environment.yml

build:
image: stable
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ before_install:
install:
- pip install -U tox-travis

script: tox -e $TOXENV
script: tox -e $TOXENV
9 changes: 0 additions & 9 deletions AUTHORS.md

This file was deleted.

16 changes: 16 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

Credits
=======

Lead
----


* Ag Stephens ag.stephens@stfc.ac.uk

Contributors
------------


* Eleanor Smith eleanor.smith@stfc.ac.uk
* Carsten Ehbrecht ehbrecht@dkrz.de
89 changes: 55 additions & 34 deletions CONTRIBUTING.md → CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,116 +1,137 @@
# Contributing

Contributing
============

Contributions are welcome, and they are greatly appreciated! Every little bit
helps, and credit will always be given.

You can contribute in many ways:

## Types of Contributions
Types of Contributions
----------------------

### Report Bugs
Report Bugs
^^^^^^^^^^^

Report bugs at https://github.com/roocs/roocs-utils/issues.

If you are reporting a bug, please include:


* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.

### Fix Bugs
Fix Bugs
^^^^^^^^

Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
wanted" is open to whoever wants to implement it.

### Implement Features
Implement Features
^^^^^^^^^^^^^^^^^^

Look through the GitHub issues for features. Anything tagged with "enhancement"
and "help wanted" is open to whoever wants to implement it.

### Write Documentation
Write Documentation
^^^^^^^^^^^^^^^^^^^

roocs-utils could always use more documentation, whether as part of the
official roocs-utils docs, in docstrings, or even on the web in blog posts,
articles, and such.

### Submit Feedback
Submit Feedback
^^^^^^^^^^^^^^^

The best way to send feedback is to file an issue at https://github.com/ellesmith88/roocs-utils/issues.
The best way to send feedback is to file an issue at https://github.com/roocs/roocs-utils/issues.

If you are proposing a feature:


* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that contributions
are welcome :)

### Get Started!
Get Started!
^^^^^^^^^^^^

Ready to contribute? Here's how to set up ``roocs-utils`` for local development.

Ready to contribute? Here's how to set up `roocs-utils` for local development.

1. Fork the `roocs-utils` repo on GitHub.
2. Clone your fork locally::
#. Fork the ``roocs-utils`` repo on GitHub.
#.
Clone your fork locally:

$ git clone git@github.com:your_name_here/roocs-utils.git

3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
#.
Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:

$ mkvirtualenv roocs-utils
$ cd roocs-utils/
$ python setup.py develop

4. Create a branch for local development::
#.
Create a branch for local development:

$ git checkout -b name-of-your-bugfix-or-feature

Now you can make your changes locally.
Now you can make your changes locally.

5. When you are done making changes, check that your changes pass flake8 and the
tests, including testing other Python versions with tox::
#.
When you are done making changes, check that your changes pass flake8 and the
tests, including testing other Python versions with tox:

$ flake8 roocs-utils tests
$ python setup.py test or py.test
$ tox

To get flake8 and tox, just pip install them into your virtualenv.
To get flake8 and tox, just pip install them into your virtualenv.

6. Commit your changes and push your branch to GitHub::
#.
Commit your changes and push your branch to GitHub:

$ git add .
$ git commit -m "Your detailed description of your changes."
$ git push origin name-of-your-bugfix-or-feature

7. Submit a pull request through the GitHub website.
#.
Submit a pull request through the GitHub website.

## Pull Request Guidelines
Pull Request Guidelines
-----------------------

Before you submit a pull request, check that it meets these guidelines:

1. The pull request should include tests.
2. If the pull request adds functionality, the docs should be updated. Put

#. The pull request should include tests.
#. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.md.
3. The pull request should work for Python 2.7, 3.4, 3.5 and 3.6, and for PyPy. Check
https://travis-ci.org/ellesmith88/roocs_utils/pull_requests
#. The pull request should work for Python 2.7, 3.4, 3.5 and 3.6, and for PyPy. Check
https://travis-ci.com/github/roocs/roocs-utils/pull_requests
and make sure that the tests pass for all supported Python versions.

## Tips
Tips
----

To run a subset of tests::
To run a subset of tests:

$ py.test tests.test_roocs_utils


## Deploying
Deploying
---------

A reminder for the maintainers on how to deploy.
Make sure all your changes are committed (including an entry in HISTORY.md).
Then run:

```
$ bumpversion patch # possible: major / minor / patch
$ git push
$ git push --tags
```
.. code-block:: shell
$ bumpversion patch # possible: major / minor / patch
$ git push
$ git push --tags
Travis will then deploy to PyPI if tests pass.
6 changes: 0 additions & 6 deletions HISTORY.md

This file was deleted.

92 changes: 92 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@

Version History
===============

v0.1.2 (2020-10-15)
-------------------

Updating the documentation and improving the changelog.

Upgrade Steps
^^^^^^^^^^^^^


* None

Breaking Changes
^^^^^^^^^^^^^^^^


* None

New Features
^^^^^^^^^^^^


* None

Bug Fixes
^^^^^^^^^


* None

Other Changes
^^^^^^^^^^^^^


* Updated doc strings to improve documentation.
* Updated documentation.

v0.1.1 (2020-10-12)
-------------------

Fixing mostly existing functionality to work more efficiently with the other packages in roocs.

Upgrade Steps
^^^^^^^^^^^^^


* None

Breaking Changes
^^^^^^^^^^^^^^^^


* ``environment.yml`` has been updated to bring it in line with requirements.txt.
* ``level`` coordinates would previously have been identified as ``None``. They are now identified as ``level``.

New Features
^^^^^^^^^^^^


* ``parameterise`` function added in ``roocs_utils.parameter`` to use in all roocs packages.
* ``ROOCS_CONFIG`` environment variable can be used to override default config in ``etc/roocs.ini``.
To use a local config file set ``ROOCS_CONFIG`` as the file path to this file. Several file paths can be provided
separated by a ``:``
* Inventory functionality added - this can be used to create an inventory of datasets. See ``README`` for more info.
* ``project_utils`` added with the following functions to get the project name of a dataset and the base directory for
that project.
* ``utils.common`` and ``utils.time_utils`` added.
* ``is_level`` implemented in ``xarray_utils`` to identify whether a coordinate is a level or not.

Bug Fixes
^^^^^^^^^


* ``xarray_utils.xarray_utils.get_main_variable`` updated to exclude common coordinates from the search for the
main variable. This fixes a bug where coordinates such as ``lon_bounds`` would be returned as the main variable.

Other Changes
^^^^^^^^^^^^^


* ``README`` update to explain inventory functionality.
* ``Black`` and ``flake8`` formatting applied.
* Fixed import warning with ``collections.abc``.

v0.1.0 (2020-07-30)
-------------------


* First release.
30 changes: 15 additions & 15 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ Copyright 2018 United Kingdom Research and Innovation

Authors: Eleanor Smith

Redistribution and use in source and binary forms, with or without
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

0 comments on commit ffebf1d

Please sign in to comment.