Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #78 from andersy005/docs/update
Browse files Browse the repository at this point in the history
Update documentation for release v2019.2.28
  • Loading branch information
andersy005 authored Mar 1, 2019
2 parents 38fdb6f + 55341e6 commit e0aa2ee
Show file tree
Hide file tree
Showing 11 changed files with 130 additions and 54 deletions.
6 changes: 1 addition & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
Thanks for submitting a PR, your contribution is really appreciated!

Here's a quick checklist that should be present in PRs (you can delete this text from the final description, this is
just a guideline):
Here's a quick checklist that should be present in PRs (you can delete this text from the final description, this is just a guideline):

- [ ] Create a new changelog file in the `changelog` folder, with a name like `<ISSUE NUMBER>.<TYPE>.rst`. See [CHANGELOG.rst](https://github.com/NCAR/esmlab/blob/master/CHANGELOG.rst) for details.
- [ ] Include documentation when adding new features.
- [ ] Include new tests or update existing tests when applicable.

[summarize your pull request here]
24 changes: 14 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-json
- id: check-added-large-files
- id: check-yaml
- id: double-quote-string-fixer

- repo: https://github.com/ambv/black
rev: 18.9b0
hooks:
- id: black
args: ["--line-length", "100", "--skip-string-normalization",
args: ["--line-length", "100", "--skip-string-normalization",
"--exclude", '''/(esmlab/_version.py|versioneer.py)/''']


- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.4.3
hooks:
- id: autopep8
entry: autopep8
args: ["--in-place", "--aggressive"]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
Expand All @@ -27,4 +31,4 @@ repos:
rev: v4.3.4
hooks:
- id: isort
args: ["line_length=100"]
args: ["line_length=100"]
50 changes: 40 additions & 10 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,28 +1,58 @@
=================
==================
Changelog history
=================
==================

Esmlab v2019.2.28 (2019-02-28)
==============================

Features
---------

- Add function to flexibily compute weights and dimensions to use in statistical operations (:pr:`74`) `Anderson Banihirwe`_

- Add ``time_manager`` class to support managing the time coordinate of datasets (:pr:`75`) and (:pr:`76`) `Matthew Long`_


Bug Fixes
----------

- Remove hard-coded ``tb_name=time_bound`` in ``compute_time_var`` (:pr:`72`) `Anderson Banihirwe`_

Documentation
---------------

- Add release procedure to documentation (:pr:`78`) `Anderson Banihirwe`_


Trivial/Internal Changes
-------------------------

- Use `esmlab-data <https://github.com/NCAR/esmlab-data>`_ in tests (:pr:`67`) `Anderson Banihirwe`_
- Update continuous integration workflow (:pr:`68`) `Anderson Banihirwe`_



Esmlab v2019.2.1 (2019-02-12)
==============================

- Add time_boud to output of compute_ann_mean (:pr:`51`) `Matthew Long`_
- Add ``time_bound`` to output of ``compute_ann_mean`` (:pr:`51`) `Matthew Long`_
- Add xarray alignment option to prevent using mismatching coordinates (:pr:`54`) `Anderson Banihirwe`_
- Add regridding functionality (:pr:`56`) `Matthew Long`_
- Handle time_bound on data read with decode_times=True (:pr:`59`) `Matthew Long`_
- Handle ``time_bound`` on data read with ``decode_times=True`` (:pr:`59`) `Matthew Long`_
- Add interface to esmlab-data (:pr:`61`) `Anderson Banihirwe`_


Esmlab v2019.2.0 (2019-02-02)
==============================

- Rename compute_ann_climatology to compute_ann_mean (:pr:`33`) `Anderson Banihirwe`_
- Don't add NaNs for _FillValue (:pr:`34`) `Anderson Banihirwe`_
- Change time handling for compute_mon_climatology and compute_ann_mean (:pr:`37`) `Matthew Long`_
- Add slice_mon_clim_time argument to compute_mon_climatology (:pr:`37`) `Matthew Long`_
- Drop time_bound var from compute_ann_mean (:pr:`43`) `Matthew Long`_
- Rename ``compute_ann_climatology`` to ``compute_ann_mean`` (:pr:`33`) `Anderson Banihirwe`_
- Don't add ``NaNs`` for ``_FillValue`` (:pr:`34`) `Anderson Banihirwe`_
- Change time handling for ``compute_mon_climatology`` and ``compute_ann_mean`` (:pr:`37`) `Matthew Long`_
- Add slice_mon_clim_time argument to ``compute_mon_climatology`` (:pr:`37`) `Matthew Long`_
- Drop ``time_bound`` variable from ``compute_ann_mean`` (:pr:`43`) `Matthew Long`_




.. _`Anderson Banihirwe`: https://github.com/andersy005
.. _`Matthew Long`: https://github.com/matt-long
.. _`Matthew Long`: https://github.com/matt-long
45 changes: 45 additions & 0 deletions HOWTORELEASE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Release Procedure
-----------------

Our current policy for releasing is to aim for a release every two weeks.
The idea is to get fixes and new features out instead of trying to cram a ton of
features into a release and by consequence taking a lot of time to make a new one.

#. Create a new branch ``release-yyyy.mm.dd`` with the version for the release

* Update `CHANGELOG.rst`
* Make sure all new changes, features are reflected in the documentation.

#. Open a new pull request for this branch targeting `master`


#. After all tests pass and the PR has been approved, merge the PR into ``master``

#. Tag a release and push to github::

$ git tag -a v2019.1.1 -m "Version 2019.1.1"
$ git push origin master --tags

#. Build and publish release on PyPI::

$ git clean -xfd # remove any files not checked into git
$ python setup.py sdist bdist_wheel --universal # build package
$ twine upload dist/* # register and push to pypi

#. Update esmlab conda-forge feedstock

* Fork `esmlab-feedstock repository <https://github.com/conda-forge/esmlab-feedstock>`_
* Clone this fork and edit recipe::

$ git clone [email protected]:username/esmlab-feedstock.git
$ cd esmlab-feedstock
$ cd recipe
$ # edit meta.yaml

- Update version
- Get sha256 from pypi.org for `esmlab <https://pypi.org/project/esmlab/#files>`_
- Fill in the rest of information as described `here <https://github.com/conda-forge/esmlab-feedstock#updating-esmlab-feedstock>`_

* Commit and submit a PR


8 changes: 6 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ include LICENSE
include README.rst
include requirements.txt
include requirements-py2.txt
recursive-include tests
include CONTRIBUTING.rst
include HOWTORELEASE.rst

recursive-include tests *.py
recursive-include tests/data/*.nc
recursive-include tests/utils/*.py
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
include versioneer.py
include esmlab/_version.py
include esmlab/_version.py
7 changes: 2 additions & 5 deletions ci/environment-dev-2.7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ dependencies:
- distributed
- matplotlib
- netcdf4
- numpy==1.15
- numpy
- pytest
- pytest-cov
- python=2.7
- xarray==0.11.2
- xarray>=0.11.2
- zarr
- pip:
- pytest-lazy-fixture
- contextlib2



4 changes: 2 additions & 2 deletions ci/environment-dev-3.6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ dependencies:
- ipykernel
- matplotlib
- netcdf4
- numpy==1.15
- numpy
- pytest
- pytest-cov
- python=3.6
- xarray==0.11.3
- xarray>=0.11.3
- xesmf
- zarr
- pip:
Expand Down
6 changes: 2 additions & 4 deletions ci/environment-dev-3.7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,15 @@ dependencies:
- matplotlib
- nbsphinx
- netcdf4
- numpy==1.15
- numpy
- numpydoc
- pandoc
- pytest
- pytest-cov
- python=3.7
- recommonmark
- six
- sphinx_rtd_theme
- sphinx>=1.6
- xarray==0.11.2
- xarray>=0.11.2
- xesmf
- zarr
- pip:
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
regridding.ipynb
api
contributing
release_procedure
changelog


Expand Down
1 change: 1 addition & 0 deletions docs/source/release_procedure.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../../HOWTORELEASE.rst
32 changes: 16 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@
import versioneer
from os.path import exists

if exists("README.rst"):
with open("README.rst") as f:
if exists('README.rst'):
with open('README.rst') as f:
long_description = f.read()
else:
long_description = ""
long_description = ''

if sys.version_info > (3, 0):
with open("requirements.txt") as f:
install_requires = f.read().strip().split("\n")
with open('requirements.txt') as f:
install_requires = f.read().strip().split('\n')
else:
with open("requirements-py2.txt") as f:
install_requires = f.read().strip().split("\n")
with open('requirements-py2.txt') as f:
install_requires = f.read().strip().split('\n')

test_requirements = ["pytest"]
test_requirements = ['pytest']

setup(
maintainer="Anderson Banihirwe",
maintainer_email="[email protected]",
description="Tools for working with earth system multi-model analyses with xarray",
maintainer='Anderson Banihirwe',
maintainer_email='[email protected]',
description='Tools for working with earth system multi-model analyses with xarray',
install_requires=install_requires,
license="Apache License 2.0",
license='Apache License 2.0',
long_description=long_description,
keywords="esmlab xarray cmip",
name="esmlab",
keywords='esmlab xarray cmip cesm',
name='esmlab',
packages=find_packages(),
test_suite="tests",
test_suite='tests',
tests_require=test_requirements,
url="https://github.com/NCAR/esmlab",
url='https://github.com/NCAR/esmlab',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
zip_safe=False,
Expand Down

0 comments on commit e0aa2ee

Please sign in to comment.