From 7b2da0fce0d0cc6f2c85b7b618ca1c47bae5ab98 Mon Sep 17 00:00:00 2001 From: mgrover1 Date: Thu, 24 Aug 2023 21:37:30 -0500 Subject: [PATCH 1/4] ADD: Add revised docs --- CONTRIBUTING.md | 146 ++++++++++++++++++++++++++++ README.md | 78 +++++++++++++++ README.rst | 56 ----------- ci/environment-docs.yml | 3 + cmweather/__init__.py | 3 +- cmweather/cm.py | 2 +- cmweather/cm_colorblind.py | 2 +- docs/source/api.md | 19 ++++ docs/source/conf.py | 19 +++- docs/source/contributing.md | 3 + docs/source/contributing.rst | 2 - docs/source/{index.rst => index.md} | 25 ++--- docs/source/usage.md | 99 +++++++++++++++++++ docs/source/usage.rst | 7 -- setup.py | 2 +- 15 files changed, 383 insertions(+), 83 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 README.md delete mode 100644 README.rst create mode 100644 docs/source/api.md create mode 100644 docs/source/contributing.md delete mode 100644 docs/source/contributing.rst rename docs/source/{index.rst => index.md} (52%) create mode 100644 docs/source/usage.md delete mode 100644 docs/source/usage.rst diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..bcc0de8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,146 @@ +# Contributing to cmweather + +Contributions are highly welcomed and appreciated. Every little help counts, +so do not hesitate! + +The following sections cover some general guidelines +regarding development in cmweather for maintainers and contributors. +Nothing here is set in stone and can't be changed. +Feel free to suggest improvements or changes in the workflow. + +```{contents} Contribution links +:depth: 2 +``` + +(submitfeedback)= + +## Feature requests and feedback + +Do you like cmweather? Share some love on Twitter or in your blog posts! + +We'd also like to hear about your propositions and suggestions. Feel free to +[submit them as issues](https://github.com/openradar/cmweather) and: + +- Explain in detail how they should work. +- Keep the scope as narrow as possible. This will make it easier to implement. + +(reportbugs)= + +## Report bugs + +Report bugs for cmweather in the [issue tracker](https://github.com/openradar/cmweather). + +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, + specifically the Python interpreter version, installed libraries, and cmweather + version. +- Detailed steps to reproduce the bug. + +If you can write a demonstration test that currently fails but should pass +(xfail), that is a very useful commit to make as well, even if you cannot +fix the bug itself. + +(fixbugs)= + +## Fix bugs + +Look through the [GitHub issues for bugs](https://github.com/openradar/cmweather/labels/type:%20bug). + +Talk to developers to find out how you can fix specific bugs. + +## Write documentation + +cmweather could always use more documentation. What exactly is needed? + +- More complementary documentation. Have you perhaps found something unclear? +- Docstrings. There can never be too many of them. +- Blog posts, articles and such -- they're all very appreciated. + +You can also edit documentation files directly in the GitHub web interface, +without using a local copy. This can be convenient for small fixes. + +:::{note} + +> Build the documentation locally with the following command: +> +> ```bash +> $ conda env update -f ci/environment.yml +> $ cd docs +> $ make html +> ``` +> +> The built documentation should be available in the `docs/_build/`. + +(pull-requests)= +::: + +(pull-requests-1)= + +## Preparing Pull Requests + +1. Fork the + [cmweather GitHub repository](https://github.com/openradar/cmweather). It's + fine to use `cmweather` as your fork repository name because it will live + under your user. + +2. Clone your fork locally using [git](https://git-scm.com/) and create a branch: + + ``` + $ git clone git@github.com:YOUR_GITHUB_USERNAME/cmweather.git + $ cd cmweather + # now, to fix a bug or add feature create your own branch off "master": + + $ git checkout -b your-bugfix-feature-branch-name master + ``` + +3. Install [pre-commit](https://pre-commit.com) and its hook on the cmweather repo: + + ``` + $ pip install --user pre-commit + $ pre-commit install + ``` + + Afterwards `pre-commit` will run whenever you commit. + + is a framework for managing and maintaining multi-language pre-commit hooks + to ensure code-style and code formatting is consistent. + +4. Install dependencies into a new conda environment: + + ``` + $ conda env update -f ci/environment.yml + ``` + +5. Run all the tests + + Now running tests is as simple as issuing this command: + + ``` + $ conda activate sandbox-devel + $ pytest --junitxml=test-reports/junit.xml --cov=./ --verbose + ``` + + This command will run tests via the "pytest" tool against the latest Python version. + +6. You can now edit your local working copy and run the tests again as necessary. Please follow PEP-8 for naming. + + When committing, `pre-commit` will re-format the files if necessary. + +7. Commit and push once your tests pass and you are happy with your change(s): + + ``` + $ git commit -a -m "" + $ git push -u + ``` + +8. Finally, submit a pull request through the GitHub website using this data: + + ``` + head-fork: YOUR_GITHUB_USERNAME/cmweather + compare: your-branch-name + + base-fork: openradar/cmweather + base: master + ``` diff --git a/README.md b/README.md new file mode 100644 index 0000000..26f96a6 --- /dev/null +++ b/README.md @@ -0,0 +1,78 @@ +# cmweather + +```{image} https://github.com/openradar/cmweather/actions/workflows/ci.yaml/badge.svg +:alt: Continuous Integration Status +:target: https://github.com/openradar/cmweather/actions/workflows/ci.yaml +``` + +```{image} https://github.com/openradar/cmweather/actions/workflows/linting.yaml/badge.svg +:alt: Code Style Status +:target: https://github.com/openradar/cmweather/actions/workflows/linting.yaml +``` + +```{image} https://img.shields.io/codecov/c/github/openradar/cmweather.svg?style=for-the-badge +:target: https://codecov.io/gh/openradar/cmweather +``` + +% If you want the following badges to be visible, please remove this line, and unindent the lines below +% .. image:: https://img.shields.io/readthedocs/cmweather/latest.svg?style=for-the-badge +% :target: https://cmweather.readthedocs.io/en/latest/?badge=latest +% :alt: Documentation Status +% +% .. image:: https://img.shields.io/pypi/v/cmweather.svg?style=for-the-badge +% :target: https://pypi.org/project/cmweather +% :alt: Python Package Index +% +% .. image:: https://img.shields.io/conda/vn/conda-forge/cmweather.svg?style=for-the-badge +% :target: https://anaconda.org/conda-forge/cmweather +% :alt: Conda Version + +## Motivation + +The motivation for this package is to contain weather maps relevant to the weather and climate community. There are **many** colormaps that are unique to the weather/climate community that are not included in core libraries such as [matplotlib](https://matplotlib.org/). This is also meant to be a community collaboration, across multiple domain-specific packages (ex. MetPy, GeoCAT, Py-ART). It is lightweight, easy to install, and we encourage contributions from across the community! + +While not all of the colormaps are color vision deficiency (CVD) friendly, we do include CVD friendly colormaps, and encourage users to use these when possible. + +## Installation + +cmweather can be found on both PyPI and conda-forge, installable using + +```bash +mamba install cmweather +``` + +or + +```bash +pip install cmweather +``` + +### Development Installation + +For a development install, do the following in the repository directory: + +```bash +conda env update -f ci/environment.yml +conda activate cmweather-dev +python -m pip install -e . +``` + +Also, please install `pre-commit` hooks from the root directory of the created project by running: + +``` +pre-commit install +``` + +These code style pre-commit hooks (black, isort, flake8, ...) will run every time you are about to commit code. + +% If you want the following badges to be visible, please remove this line, and unindent the lines below +% Re-create notebooks with Pangeo Binder +% -------------------------------------- +% +% Try notebooks hosted in this repo on Pangeo Binder. Note that the session is ephemeral. +% Your home directory will not persist, so remember to download your notebooks if you +% made changes that you need to use at a later time! +% +% .. image:: https://img.shields.io/static/v1.svg?logo=Jupyter&label=Pangeo+Binder&message=GCE+us-central1&color=blue&style=for-the-badge +% :target: https://binder.pangeo.io/v2/gh/openradar/cmweather/master?urlpath=lab +% :alt: Binder diff --git a/README.rst b/README.rst deleted file mode 100644 index 33d462f..0000000 --- a/README.rst +++ /dev/null @@ -1,56 +0,0 @@ -.. image:: https://github.com/openradar/cmweather/actions/workflows/ci.yaml/badge.svg - :target: https://github.com/openradar/cmweather/actions/workflows/ci.yaml - :alt: Continuous Integration Status - -.. image:: https://github.com/openradar/cmweather/actions/workflows/linting.yaml/badge.svg - :target: https://github.com/openradar/cmweather/actions/workflows/linting.yaml - :alt: Code Style Status - -.. image:: https://img.shields.io/codecov/c/github/openradar/cmweather.svg?style=for-the-badge - :target: https://codecov.io/gh/openradar/cmweather - -.. If you want the following badges to be visible, please remove this line, and unindent the lines below - .. image:: https://img.shields.io/readthedocs/cmweather/latest.svg?style=for-the-badge - :target: https://cmweather.readthedocs.io/en/latest/?badge=latest - :alt: Documentation Status - - .. image:: https://img.shields.io/pypi/v/cmweather.svg?style=for-the-badge - :target: https://pypi.org/project/cmweather - :alt: Python Package Index - - .. image:: https://img.shields.io/conda/vn/conda-forge/cmweather.svg?style=for-the-badge - :target: https://anaconda.org/conda-forge/cmweather - :alt: Conda Version - - -cmweather -========= - -Development ------------- - -For a development install, do the following in the repository directory: - -.. code-block:: bash - - conda env update -f ci/environment.yml - conda activate cmweather-dev - python -m pip install -e . - -Also, please install `pre-commit` hooks from the root directory of the created project by running:: - - pre-commit install - -These code style pre-commit hooks (black, isort, flake8, ...) will run every time you are about to commit code. - -.. If you want the following badges to be visible, please remove this line, and unindent the lines below - Re-create notebooks with Pangeo Binder - -------------------------------------- - - Try notebooks hosted in this repo on Pangeo Binder. Note that the session is ephemeral. - Your home directory will not persist, so remember to download your notebooks if you - made changes that you need to use at a later time! - - .. image:: https://img.shields.io/static/v1.svg?logo=Jupyter&label=Pangeo+Binder&message=GCE+us-central1&color=blue&style=for-the-badge - :target: https://binder.pangeo.io/v2/gh/openradar/cmweather/master?urlpath=lab - :alt: Binder diff --git a/ci/environment-docs.yml b/ci/environment-docs.yml index 657b43f..014f770 100644 --- a/ci/environment-docs.yml +++ b/ci/environment-docs.yml @@ -10,6 +10,9 @@ dependencies: - netcdf4 - xarray - pooch + - myst-nb + - myst-parser + - sphinx-design - pip - pip: - sphinxext-opengraph diff --git a/cmweather/__init__.py b/cmweather/__init__.py index 2162ce0..a0e26fa 100644 --- a/cmweather/__init__.py +++ b/cmweather/__init__.py @@ -7,7 +7,7 @@ colormaps for plotting. Available colormaps, reversed versions (_r) are also provided, these -colormaps are available within matplotlib with names 'COLORMAP': +colormaps are available within matplotlib with names: * BlueBrown10 * BlueBrown11 @@ -62,5 +62,6 @@ # Get the version try: __version__ = get_distribution(__name__).version + print(__version__) except DistributionNotFound: # pragma: no cover __version__ = '0.0.0' # pragma: no cover diff --git a/cmweather/cm.py b/cmweather/cm.py index 0f79003..66ad2c9 100644 --- a/cmweather/cm.py +++ b/cmweather/cm.py @@ -2,7 +2,7 @@ Radar related colormaps. Available colormaps, reversed versions (_r) are also provided, these -colormaps are available within matplotlib with names 'pyart_COLORMAP': +colormaps are available within matplotlib: * BlueBrown10 * BlueBrown11 diff --git a/cmweather/cm_colorblind.py b/cmweather/cm_colorblind.py index dda624f..95158a7 100644 --- a/cmweather/cm_colorblind.py +++ b/cmweather/cm_colorblind.py @@ -2,7 +2,7 @@ Colorblind friendly radar colormaps Available colormaps, reversed versions are also provided, these -colormaps are available within matplotlib with names pyart_COLORMAP': +colormaps are available within matplotlib: * HomeyerRainbow * balance diff --git a/docs/source/api.md b/docs/source/api.md new file mode 100644 index 0000000..46ec641 --- /dev/null +++ b/docs/source/api.md @@ -0,0 +1,19 @@ +# Reference + +## Color Vision Deficiency Friendly Colormaps (`cmweather.cm_colorblind`) + +```{eval-rst} +.. automodule:: cmweather.cm_colorblind + :members: + :undoc-members: + :show-inheritance: +``` + +## More Weather Colormaps (`cmweather.cm`) + +```{eval-rst} +.. automodule:: cmweather.cm + :members: + :undoc-members: + :show-inheritance: +``` diff --git a/docs/source/conf.py b/docs/source/conf.py index 2ba1f24..bc27f2a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -17,7 +17,7 @@ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -# sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath('../../../cmweather')) cwd = os.getcwd() parent = os.path.dirname(cwd) @@ -40,11 +40,18 @@ 'sphinx.ext.intersphinx', 'sphinx.ext.extlinks', 'numpydoc', + 'myst_nb', 'IPython.sphinxext.ipython_console_highlighting', 'IPython.sphinxext.ipython_directive', 'nbsphinx', + 'sphinx_design', ] + +# MyST config +myst_enable_extensions = ['amsmath', 'colon_fence', 'deflist', 'html_image'] +myst_url_schemes = ['http', 'https', 'mailto'] + extlinks = { 'issue': ('https://github.com/openradar/cmweather/issues/%s', 'GH#'), 'pr': ('https://github.com/openradar/cmweather/pull/%s', 'GH#'), @@ -54,7 +61,10 @@ templates_path = ['_templates'] # The suffix of source filenames. -source_suffix = '.rst' +source_suffix = ['.md', '.rst'] + +# Generate the API documentation when building +autoclass_content = 'both' # Enable notebook execution # https://nbsphinx.readthedocs.io/en/0.4.2/never-execute.html @@ -221,6 +231,11 @@ ('index', 'cmweather.tex', 'cmweather Documentation', 'Open Radar Community', 'manual'), ] +# Autosummary pages will be generated by sphinx-autogen instead of sphinx-build +autosummary_generate = True +autosummary_imported_members = True +autodoc_typehints = 'description' + # The name of an image file (relative to this directory) to place at the top of # the title page. # latex_logo = None diff --git a/docs/source/contributing.md b/docs/source/contributing.md new file mode 100644 index 0000000..8ece9d8 --- /dev/null +++ b/docs/source/contributing.md @@ -0,0 +1,3 @@ +```{include} ../../CONTRIBUTING.md + +``` diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst deleted file mode 100644 index cd215d2..0000000 --- a/docs/source/contributing.rst +++ /dev/null @@ -1,2 +0,0 @@ - -.. include:: ../../CONTRIBUTING.rst diff --git a/docs/source/index.rst b/docs/source/index.md similarity index 52% rename from docs/source/index.rst rename to docs/source/index.md index 99fd161..1826edc 100644 --- a/docs/source/index.rst +++ b/docs/source/index.md @@ -1,18 +1,19 @@ -.. include:: ../../README.md +```{include} ../../README.md -Contents: -========= +``` -.. toctree:: - :maxdepth: 2 - - usage - contributing - - -Feedback -======== +```{toctree} +--- +maxdepth: 2 +caption: Getting Started +hidden: +--- +usage +contributing +api +``` +## Feedback If you encounter any errors or problems with **cmweather**, please open an issue at the GitHub http://github.com/openradar/cmweather main repository. diff --git a/docs/source/usage.md b/docs/source/usage.md new file mode 100644 index 0000000..d076451 --- /dev/null +++ b/docs/source/usage.md @@ -0,0 +1,99 @@ +--- +jupytext: + text_representation: + format_name: myst +kernelspec: + display_name: Python 3 + name: python3 +--- + +# Usage + +## Installing cmweather + +cmweather can be installed in three ways: + +```{eval-rst} + +.. tab-set:: + + .. tab-item:: conda + + Using the `conda `__ package manager that comes with the + Anaconda/Miniconda/Mamba distribution: + + .. code:: bash + + $ mamba install cmweather --channel conda-forge + + .. tab-item:: pip + + Using the `pip `__ package manager: + + .. code:: bash + + $ python -m pip install cmweather + + .. tab-item:: Development version + + To install a development version from source: + + .. code:: bash + + $ git clone https://github.com/openradar/cmweather + $ cd cmweather + $ python -m pip install -e . +``` + +## Use cmweather In Your Scripts/Notebooks + +You can use **cmweather** colormaps as you would use **matplotlib** colormaps in your workflow. + +The first step is to import cmweather. + +```{code-cell} ipython3 +import cmweather + +``` + +### RECOMMENDED: Try out a Color Vision Deficiency (CVD) Friendly Colormaps + +It is recommended you try one of the CVD-friendly colormaps included in cmweather, such as ChaseSpectral + +```{code-cell} ipython3 +import cmweather +import numpy as np +import matplotlib.pyplot as plt + +# Create some synthetic data +x = np.arange(1, 100) +y = np.arange(1, 100, .5) +x_2d, y_2d = np.meshgrid(x, y) +temps = (x_2d + y_2d)/2 + +# Plot our data and add a colorbar +color = plt.pcolormesh(temps, cmap='ChaseSpectral') +plt.colorbar(color); +``` + +### Using "Traditional" Colormaps + +We can also use other colormaps such as the National Weather Service (NWS) Reflectivity (`NWSRef`) colormap with our plot + +```{code-cell} ipython3 +import cmweather +import numpy as np +import matplotlib.pyplot as plt + +# Create some synthetic data +x = np.arange(1, 100) +y = np.arange(1, 100, .5) +x_2d, y_2d = np.meshgrid(x, y) +temps = (x_2d + y_2d)/2 + +# Plot our data and add a colorbar +color = plt.pcolormesh(temps, cmap='NWSRef') +plt.colorbar(color); +``` + +A full list of colormaps can be found in the [Reference](api.md) section of the docs diff --git a/docs/source/usage.rst b/docs/source/usage.rst deleted file mode 100644 index 6d68f9f..0000000 --- a/docs/source/usage.rst +++ /dev/null @@ -1,7 +0,0 @@ -======== -Usage -======== - -To use cmweather in a project:: - - import cmweather diff --git a/setup.py b/setup.py index 664b8ef..01b2047 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with open('requirements.txt') as f: requirements = f.read().strip().split('\n') -with open('README.rst') as f: +with open('README.md') as f: long_description = f.read() setup( From 8698540814a9bf1cacd7056854cc4f0c86a345d4 Mon Sep 17 00:00:00 2001 From: mgrover1 Date: Thu, 24 Aug 2023 21:41:33 -0500 Subject: [PATCH 2/4] ADD: Add readme back in --- README.rst | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 README.rst diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..33d462f --- /dev/null +++ b/README.rst @@ -0,0 +1,56 @@ +.. image:: https://github.com/openradar/cmweather/actions/workflows/ci.yaml/badge.svg + :target: https://github.com/openradar/cmweather/actions/workflows/ci.yaml + :alt: Continuous Integration Status + +.. image:: https://github.com/openradar/cmweather/actions/workflows/linting.yaml/badge.svg + :target: https://github.com/openradar/cmweather/actions/workflows/linting.yaml + :alt: Code Style Status + +.. image:: https://img.shields.io/codecov/c/github/openradar/cmweather.svg?style=for-the-badge + :target: https://codecov.io/gh/openradar/cmweather + +.. If you want the following badges to be visible, please remove this line, and unindent the lines below + .. image:: https://img.shields.io/readthedocs/cmweather/latest.svg?style=for-the-badge + :target: https://cmweather.readthedocs.io/en/latest/?badge=latest + :alt: Documentation Status + + .. image:: https://img.shields.io/pypi/v/cmweather.svg?style=for-the-badge + :target: https://pypi.org/project/cmweather + :alt: Python Package Index + + .. image:: https://img.shields.io/conda/vn/conda-forge/cmweather.svg?style=for-the-badge + :target: https://anaconda.org/conda-forge/cmweather + :alt: Conda Version + + +cmweather +========= + +Development +------------ + +For a development install, do the following in the repository directory: + +.. code-block:: bash + + conda env update -f ci/environment.yml + conda activate cmweather-dev + python -m pip install -e . + +Also, please install `pre-commit` hooks from the root directory of the created project by running:: + + pre-commit install + +These code style pre-commit hooks (black, isort, flake8, ...) will run every time you are about to commit code. + +.. If you want the following badges to be visible, please remove this line, and unindent the lines below + Re-create notebooks with Pangeo Binder + -------------------------------------- + + Try notebooks hosted in this repo on Pangeo Binder. Note that the session is ephemeral. + Your home directory will not persist, so remember to download your notebooks if you + made changes that you need to use at a later time! + + .. image:: https://img.shields.io/static/v1.svg?logo=Jupyter&label=Pangeo+Binder&message=GCE+us-central1&color=blue&style=for-the-badge + :target: https://binder.pangeo.io/v2/gh/openradar/cmweather/master?urlpath=lab + :alt: Binder From e9c5a7edd6a8c3862be2cbdf28a60d8357bad865 Mon Sep 17 00:00:00 2001 From: mgrover1 Date: Thu, 24 Aug 2023 21:42:16 -0500 Subject: [PATCH 3/4] DEL: Remove the old readme --- README.rst | 56 ------------------------------------------------------ 1 file changed, 56 deletions(-) delete mode 100644 README.rst diff --git a/README.rst b/README.rst deleted file mode 100644 index 33d462f..0000000 --- a/README.rst +++ /dev/null @@ -1,56 +0,0 @@ -.. image:: https://github.com/openradar/cmweather/actions/workflows/ci.yaml/badge.svg - :target: https://github.com/openradar/cmweather/actions/workflows/ci.yaml - :alt: Continuous Integration Status - -.. image:: https://github.com/openradar/cmweather/actions/workflows/linting.yaml/badge.svg - :target: https://github.com/openradar/cmweather/actions/workflows/linting.yaml - :alt: Code Style Status - -.. image:: https://img.shields.io/codecov/c/github/openradar/cmweather.svg?style=for-the-badge - :target: https://codecov.io/gh/openradar/cmweather - -.. If you want the following badges to be visible, please remove this line, and unindent the lines below - .. image:: https://img.shields.io/readthedocs/cmweather/latest.svg?style=for-the-badge - :target: https://cmweather.readthedocs.io/en/latest/?badge=latest - :alt: Documentation Status - - .. image:: https://img.shields.io/pypi/v/cmweather.svg?style=for-the-badge - :target: https://pypi.org/project/cmweather - :alt: Python Package Index - - .. image:: https://img.shields.io/conda/vn/conda-forge/cmweather.svg?style=for-the-badge - :target: https://anaconda.org/conda-forge/cmweather - :alt: Conda Version - - -cmweather -========= - -Development ------------- - -For a development install, do the following in the repository directory: - -.. code-block:: bash - - conda env update -f ci/environment.yml - conda activate cmweather-dev - python -m pip install -e . - -Also, please install `pre-commit` hooks from the root directory of the created project by running:: - - pre-commit install - -These code style pre-commit hooks (black, isort, flake8, ...) will run every time you are about to commit code. - -.. If you want the following badges to be visible, please remove this line, and unindent the lines below - Re-create notebooks with Pangeo Binder - -------------------------------------- - - Try notebooks hosted in this repo on Pangeo Binder. Note that the session is ephemeral. - Your home directory will not persist, so remember to download your notebooks if you - made changes that you need to use at a later time! - - .. image:: https://img.shields.io/static/v1.svg?logo=Jupyter&label=Pangeo+Binder&message=GCE+us-central1&color=blue&style=for-the-badge - :target: https://binder.pangeo.io/v2/gh/openradar/cmweather/master?urlpath=lab - :alt: Binder From f4373558e807569ee5346a66db0bd0eeb671a47c Mon Sep 17 00:00:00 2001 From: mgrover1 Date: Thu, 24 Aug 2023 21:43:21 -0500 Subject: [PATCH 4/4] ADD: Add readme back in --- README.rst | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 README.rst diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..33d462f --- /dev/null +++ b/README.rst @@ -0,0 +1,56 @@ +.. image:: https://github.com/openradar/cmweather/actions/workflows/ci.yaml/badge.svg + :target: https://github.com/openradar/cmweather/actions/workflows/ci.yaml + :alt: Continuous Integration Status + +.. image:: https://github.com/openradar/cmweather/actions/workflows/linting.yaml/badge.svg + :target: https://github.com/openradar/cmweather/actions/workflows/linting.yaml + :alt: Code Style Status + +.. image:: https://img.shields.io/codecov/c/github/openradar/cmweather.svg?style=for-the-badge + :target: https://codecov.io/gh/openradar/cmweather + +.. If you want the following badges to be visible, please remove this line, and unindent the lines below + .. image:: https://img.shields.io/readthedocs/cmweather/latest.svg?style=for-the-badge + :target: https://cmweather.readthedocs.io/en/latest/?badge=latest + :alt: Documentation Status + + .. image:: https://img.shields.io/pypi/v/cmweather.svg?style=for-the-badge + :target: https://pypi.org/project/cmweather + :alt: Python Package Index + + .. image:: https://img.shields.io/conda/vn/conda-forge/cmweather.svg?style=for-the-badge + :target: https://anaconda.org/conda-forge/cmweather + :alt: Conda Version + + +cmweather +========= + +Development +------------ + +For a development install, do the following in the repository directory: + +.. code-block:: bash + + conda env update -f ci/environment.yml + conda activate cmweather-dev + python -m pip install -e . + +Also, please install `pre-commit` hooks from the root directory of the created project by running:: + + pre-commit install + +These code style pre-commit hooks (black, isort, flake8, ...) will run every time you are about to commit code. + +.. If you want the following badges to be visible, please remove this line, and unindent the lines below + Re-create notebooks with Pangeo Binder + -------------------------------------- + + Try notebooks hosted in this repo on Pangeo Binder. Note that the session is ephemeral. + Your home directory will not persist, so remember to download your notebooks if you + made changes that you need to use at a later time! + + .. image:: https://img.shields.io/static/v1.svg?logo=Jupyter&label=Pangeo+Binder&message=GCE+us-central1&color=blue&style=for-the-badge + :target: https://binder.pangeo.io/v2/gh/openradar/cmweather/master?urlpath=lab + :alt: Binder