From 222c1d1f325f68cb2fca71dd47219c17f90fe986 Mon Sep 17 00:00:00 2001 From: Katelyn FitzGerald <7872563+kafitzgerald@users.noreply.github.com> Date: Fri, 29 Sep 2023 14:03:38 -0600 Subject: [PATCH 01/16] pin matplotlib to <3.8 --- build_envs/docs.yml | 4 ++-- build_envs/environment.yml | 4 ++-- docs/release-notes.rst | 3 ++- setup.cfg | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/build_envs/docs.yml b/build_envs/docs.yml index a13de436..353a3d3c 100644 --- a/build_envs/docs.yml +++ b/build_envs/docs.yml @@ -2,10 +2,10 @@ name: gv-docs channels: - conda-forge dependencies: - - python>=3.8, <=3.10 + - python>=3.8, <3.11 - cartopy - cmaps - - matplotlib + - matplotlib<3.8 - pint - pip - pre-commit diff --git a/build_envs/environment.yml b/build_envs/environment.yml index 44139a8b..896f5818 100644 --- a/build_envs/environment.yml +++ b/build_envs/environment.yml @@ -2,10 +2,10 @@ name: geocat_viz_build channels: - conda-forge dependencies: - - python>=3.8, <=3.10 + - python>=3.8, <3.11 - cartopy - make - - matplotlib + - matplotlib<3.8 - sphinx - pip - cmaps diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 358c2047..35ef1afb 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -7,7 +7,8 @@ Release Notes Bug Fixes ^^^^^^^^^ -* Xarray unpinned by `Katelyn Fitzgerald`_ in (:pr:`159`) +* Matplotlib pinned to <3.8 `Katelyn Fitzgerald`_ in (:pr:`161`) +* Unnecessary xarray pin removed by `Katelyn Fitzgerald`_ in (:pr:`159`) v2023.09.0 (September 7, 2023) ------------------------------ diff --git a/setup.cfg b/setup.cfg index 8d022b7c..decb5172 100644 --- a/setup.cfg +++ b/setup.cfg @@ -36,7 +36,7 @@ setup_requires = setuptools pip install_requires = - matplotlib + matplotlib<3.8 xarray numpy cartopy From 3396116f6f96d0a26d58ca151680a1e11af9ab8b Mon Sep 17 00:00:00 2001 From: Katelyn FitzGerald <7872563+kafitzgerald@users.noreply.github.com> Date: Fri, 29 Sep 2023 14:23:26 -0600 Subject: [PATCH 02/16] add python 3.11 and remove python 3.8 --- .github/workflows/ci.yml | 2 +- build_envs/docs.yml | 2 +- build_envs/environment.yml | 2 +- build_envs/upstream-dev-environment.yml | 2 +- setup.cfg | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c15e36b1..91e5d9ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: fail-fast: false matrix: os: [ "ubuntu-latest", "macos-latest"] - python-version: [ "3.8", "3.9", "3.10" ] + python-version: [ "3.9", "3.10", "3.11" ] steps: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.11.0 diff --git a/build_envs/docs.yml b/build_envs/docs.yml index a13de436..164be4c1 100644 --- a/build_envs/docs.yml +++ b/build_envs/docs.yml @@ -2,7 +2,7 @@ name: gv-docs channels: - conda-forge dependencies: - - python>=3.8, <=3.10 + - python>=3.9, <3.12 - cartopy - cmaps - matplotlib diff --git a/build_envs/environment.yml b/build_envs/environment.yml index 44139a8b..82dd8261 100644 --- a/build_envs/environment.yml +++ b/build_envs/environment.yml @@ -2,7 +2,7 @@ name: geocat_viz_build channels: - conda-forge dependencies: - - python>=3.8, <=3.10 + - python>=3.9, <3.12 - cartopy - make - matplotlib diff --git a/build_envs/upstream-dev-environment.yml b/build_envs/upstream-dev-environment.yml index dbe472e9..9374ea5d 100644 --- a/build_envs/upstream-dev-environment.yml +++ b/build_envs/upstream-dev-environment.yml @@ -2,7 +2,7 @@ name: geocat_viz_upstream channels: - conda-forge dependencies: - - python>=3.7 + - python>=3.9 - geocat-comp - cf_xarray>=0.3.1 - geocat-datafiles diff --git a/setup.cfg b/setup.cfg index 8d022b7c..97e95ac1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,15 +17,15 @@ classifiers = Intended Audience :: Science/Research Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 Topic :: Scientific/Engineering [options] zip_safe = False include_package_data = True -python_requires = >=3.8, <3.11 +python_requires = >=3.9, <3.12 package_dir = =src packages = From cd791c1cb867cf1565c65dd9f9f23d436effd18f Mon Sep 17 00:00:00 2001 From: Katelyn FitzGerald <7872563+kafitzgerald@users.noreply.github.com> Date: Fri, 29 Sep 2023 14:27:41 -0600 Subject: [PATCH 03/16] release notes update --- docs/release-notes.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 358c2047..ec2066d9 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -5,9 +5,13 @@ Release Notes ============= +New Features +^^^^^^^^^ +* Added Python 3.11 and removed Python 3.8 `Katelyn FitzGerald`_ in (:pr:`162`) + Bug Fixes ^^^^^^^^^ -* Xarray unpinned by `Katelyn Fitzgerald`_ in (:pr:`159`) +* Xarray unpinned by `Katelyn FitzGerald`_ in (:pr:`159`) v2023.09.0 (September 7, 2023) ------------------------------ From d81cdfb11e59c504076b140dc85722d1b23c6abf Mon Sep 17 00:00:00 2001 From: Katelyn FitzGerald <7872563+kafitzgerald@users.noreply.github.com> Date: Fri, 29 Sep 2023 15:10:29 -0600 Subject: [PATCH 04/16] Add code of conduct (#163) Add CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 82 ++++++++++++++++++++++++++++++++++++++++++ docs/release-notes.rst | 1 + 2 files changed, 83 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..0067790e --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,82 @@ +# Code of Conduct + +## Our Pledge + +We, as contributors, creators, stewards, and maintainers (participants), of GeoCAT-viz pledge to make participation in our +project and community a safe, productive, welcoming and inclusive experience for everyone. All participants are required +to abide by this Code of Conduct. This includes respectful treatment of everyone regardless of age, body size, disability, +ethnicity, gender identity or expression, level of experience, nationality, political affiliation, veteran status, pregnancy, +genetic information, physical appearance, race, religion, or sexual orientation, as well as any other characteristic protected +under applicable US federal or state law. + +## Our Standards + +Examples of behaviors that contribute to a positive environment include: + +- All participants are treated with respect and consideration, valuing a diversity of views and opinions +- Be considerate, respectful, and collaborative +- Communicate openly with respect for others, critiquing ideas rather than individuals and gracefully accepting criticism +- Acknowledging the contributions of others +- Avoid personal attacks directed toward other participants +- Be mindful of your surroundings and of your fellow participants +- Alert project administrators if you notice a dangerous situation or someone in distress +- Respect the rules and policies of the project and venue + +Examples of unacceptable behavior include, but are not limited to: + +- Harassment, intimidation, or discrimination in any form +- Physical, verbal, or written abuse by anyone to anyone, including repeated use of pronouns other than those requested +- Unwelcome sexual attention or advances +- Personal attacks directed at other guests, members, participants, etc. +- Publishing others’ private information, such as a physical or electronic address, without explicit permission +- Alarming, intimidating, threatening, or hostile comments or conduct +- Inappropriate use of nudity and/or sexual images +- Threatening or stalking anyone, including a participant +- Other conduct which could reasonably be considered inappropriate in a professional setting + +## Scope + +This Code of Conduct applies to all spaces managed by GeoCAT whether they be physical, online or face-to-face. +This includes project code, code repository, associated web pages, documentation, mailing lists, project websites +and wiki pages, issue tracker, meetings, telecons, events, project social media accounts, and any other forums +created by the project team which the community uses for communication. In addition, violations of this Code of +Conduct outside these spaces may affect a person's ability to participate within them. Representation of a project +may be further defined and clarified by project maintainers. + +## Community Responsibilities + +Everyone in the community is empowered to respond to people who are showing unacceptable behavior. They can talk to +them privately or publicly. Anyone requested to stop unacceptable behavior is expected to comply immediately. If the +behavior continues concerns may be brought to the project administrators or to any other party listed in the Reporting +section below. + +## Project Administrator Responsibilities + +Project administrators are responsible for clarifying the standards of acceptable behavior and are encouraged to model +appropriate behavior and provide support when people in the community point out inappropriate behavior. Project +administrator(s) are normally the ones that would be tasked to carry out the actions in the Consequences section below. + +## Reporting + +Instances of unacceptable behavior can be brought to the attention of the project administrator(s) who may take any action +as outlined in the Consequences section below. However, making a report to a project administrator is not considered an +‘official report’ to UCAR. + +## Consequences + +Upon receipt of a complaint, the project administrator(s) may take any action deemed necessary and appropriate under the +circumstances. Such action can include things such as: removing, editing, or rejecting comments, commits, code, wiki edits, +email, issues, and other contributions that are not aligned to this Code of Conduct, or banning temporarily or permanently +any contributor for other behaviors that are deemed inappropriate, threatening, offensive, or harmful. Project administrators +also have the right to report violations to UCAR HR and/or UCAR’s Office of Diversity, Equity and Inclusion (ODEI), as well +as a participant’s home institution and/or law enforcement. In the event an incident is reported to UCAR, UCAR will follow +its Harassment Reporting and Complaint Procedure. + +## Attribution + +This Code of Conduct was originally adapted from the Contributor Covenant, version 1.4. We then aligned it with the UCAR +Participant Code of Conduct, which also borrows from the American Geophysical Union (AGU) Code of Conduct. The UCAR Participant +Code of Conduct applies to both UCAR employees as well as participants in activities run by UCAR. The original version of this +for all software projects that have strong management from UCAR or UCAR staff is available on the UCAR website at +[https://doi.org/10.5065/6w2c-a132](https://doi.org/10.5065/6w2c-a132). The date that it was adopted by this project was 2 +October 2023. When responding to complaints, UCAR HR and ODEI will do so based on the latest published version. diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 45b6de95..9c35d95c 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -7,6 +7,7 @@ Release Notes New Features ^^^^^^^^^ +* Add code of conduct by `Katelyn FitzGerald`_ in (:pr:`163`) * Added Python 3.11 and removed Python 3.8 `Katelyn FitzGerald`_ in (:pr:`162`) Bug Fixes From d93b7ce002f383c82d7da47389634f99f45bbff8 Mon Sep 17 00:00:00 2001 From: Katelyn FitzGerald <7872563+kafitzgerald@users.noreply.github.com> Date: Fri, 29 Sep 2023 16:38:47 -0600 Subject: [PATCH 05/16] Fix docs env python version --- build_envs/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_envs/docs.yml b/build_envs/docs.yml index 353a3d3c..01c2cae6 100644 --- a/build_envs/docs.yml +++ b/build_envs/docs.yml @@ -2,7 +2,7 @@ name: gv-docs channels: - conda-forge dependencies: - - python>=3.8, <3.11 + - python>=3.8, <3.12 - cartopy - cmaps - matplotlib<3.8 From 3996196ccf1e2773a3b855cf0d08f0b9795c17fc Mon Sep 17 00:00:00 2001 From: Katelyn FitzGerald <7872563+kafitzgerald@users.noreply.github.com> Date: Fri, 29 Sep 2023 16:39:11 -0600 Subject: [PATCH 06/16] Fix environment.yml python version --- build_envs/environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_envs/environment.yml b/build_envs/environment.yml index 896f5818..d1172053 100644 --- a/build_envs/environment.yml +++ b/build_envs/environment.yml @@ -2,7 +2,7 @@ name: geocat_viz_build channels: - conda-forge dependencies: - - python>=3.8, <3.11 + - python>=3.8, <3.12 - cartopy - make - matplotlib<3.8 From 2da3edc8dda47b48d32d166439f95048eb8fde1e Mon Sep 17 00:00:00 2001 From: Katelyn FitzGerald <7872563+kafitzgerald@users.noreply.github.com> Date: Fri, 29 Sep 2023 19:03:13 -0600 Subject: [PATCH 07/16] add contrib.rst to docs --- docs/contrib.rst | 455 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 455 insertions(+) create mode 100644 docs/contrib.rst diff --git a/docs/contrib.rst b/docs/contrib.rst new file mode 100644 index 00000000..8e24debf --- /dev/null +++ b/docs/contrib.rst @@ -0,0 +1,455 @@ +.. _contributing: + +========================== +Contributing to geocat-viz +========================== + +************ +Introduction +************ + +Thank you for considering making a contribution to ``geocat-viz``! There are +many ways to contribute to this project, including reporting bugs, requesting +additional or new functionality, improving our documentation, or contributing +your own code and we appreciate all of them. + +If you have any questions, please feel free to reach out to us on `GitHub +Discussions `__. You can also +reach us by email at geocat@ucar.edu. + +************** +Where to start +************** + +Look through our open issues and see if there is anything you would like to take +on! We recommend working with core developers to implement new functionality. We +can help you get started and make sure your code is consistent with the rest of +the project. + +Also check out any beginner-friendly issues we have tagged with `good first +issue `__. + +We do not officially "assign" issues to contributors, but if you are interested +in working on an issue, please comment on the issue to let us know you are +working on it. This will help us avoid duplicate work. + +The code for ``geocat-viz`` is hosted on GitHub. If you do not have one, you +will need to create a `free GitHub account `__. +The `GitHub Quickstart Guide +`__ is a great place to get +started with git and GitHub. + +************** +Reporting bugs +************** + +Something not working as expected? We would love to hear about it! Please report +any bugs you find by opening an issue on GitHub. See our `bug report template +`__ +to get started. + +When reporting a bug, please include as much information as possible. This will +help us reproduce the bug and fix it efficiently. For more information on how to +write a good bug report, see this stackoverflow post on `how to make a good bug +report `__. + +************************* +Requesting new plot types +************************* + +Have an idea for a new plot type? Want to know how to do something in Python that +you used to do in NCL? See our `plot type request template +`__ +to get started. + +You can also use our `Feature Request Form +`__ to submit a feature request. + + +*********************** +Improving Documentation +*********************** + +We are always looking for ways to improve our documentation. If you find +something that is unclear or confusing, please let us know by opening an issue. +To contribute to our documentation yourself, see the `Documentation`_ section of +this guide. + +***************************** +Development workflow overview +***************************** + +This is a brief overview of the development workflow we use for ``geocat-viz``. +A more detailed description of each step is provided in following sections. + +**Get set up to develop on your local machine** + +#. `Fork and clone the repository`_. +#. `Create a development environment`_. +#. `Create a branch for your changes`_. +#. `Install pre-commit hooks`_. + +**Make your changes** + +#. `Understanding the codebase`_. +#. `Write and run tests`_. +#. :ref:`Generate ` and :ref:`check ` the documentation. + +**Contribute your code** + +#. `Push your changes to your fork`_. +#. `Open a pull request`_. +#. `Address feedback`_. +#. Wait for your pull request to be merged. +#. `Delete your branch`_. + +******************************************* +Get set up to develop on your local machine +******************************************* + +Fork and clone the repository +----------------------------- + +Get started by forking the NCAR/geocat-viz repository on GitHub. To do this, +find the "Fork" button near the top of the page and click it. This will create a +copy of the project under your personal github account. + +Next, clone your forked copy to your local machine. + +.. code-block:: bash + + git clone https://github.com/your-user-name/geocat-viz.git + + +Enter the project folder and set the upstream remote to the NCAR/geocat-viz +repository. This will allow you to keep your fork up to date with the main +repository. + +.. code-block:: bash + + cd geocat-viz git remote add upstream https://github.com/NCAR/geocat-viz.git + +For more information, see the `GitHub quickstart section on forking a repository +`__. + +Create a development environment +-------------------------------- + +To run and test any changes you make in ``geocat-viz``, you will need to create +a development environment. We recommend installing and using `conda +`__ +and/or `mamba +`__. + +Use the following commands to create a new conda environment to develop +``geocat-viz`` in. + +.. code-block:: bash + + # Create a new conda environment + conda create -c conda-forge -n geocat_viz_build python=3.10 + + # Use the environment file to populate the environment with the required dependencies + conda env update -f build_envs/environment.yml + + # Activate your new environment + conda activate geocat_viz_build + + # Install your local copy of geocat-viz in interactive mode + pip install -e . + +To test your new install, open a python session and try importing +``geocat.viz``. + +.. code-block:: python + + >>> import geocat.viz as gv + +You can follow a similar process to create our documentation environment, +``gv-docs`` from the ``build_envs/docs.yml`` file. + +See the `conda documentation +`__ for more information. + + +Create a branch for your changes +-------------------------------- + +We highly recommend creating a new branch on your fork for each new feature or +bug that you work on. + +To create and check out a new branch, use the following command: + +.. code-block:: bash + + git checkout -b + +You can see a list of all branches in your local repository by running: + +.. code-block:: bash + + git branch + +For more information on branching, check out this `learn git branching +`__ interactive tool. + +Install pre-commit hooks +------------------------ + +``geocat-viz`` uses pre-commit hooks to ensure a standardized base-level code +formatting and style. + +The ``pre-commit`` package is installed by default when using the +``build_envs/environment.yml`` file. To set up the pre-commit hooks, run the +following command from the root of the repository: + +.. code-block:: bash + + pre-commit install + +Now, whenever you commit changes, the pre-commit hooks will run and may make +small modifications to your code. If the pre-commit hooks make any changes, you +will need to re-add the files and commit them again in order to successfully make +the commit. + +To manually run the pre-commit hooks, use the following command: + +.. code-block:: bash + + pre-commit run --all-files + +You can skip the pre-commit hooks by adding the ``--no-verify`` flag to your +commit command like this: + +.. code-block:: bash + + git commit -m "your commit message" --no-verify + +For more information on pre-commit hooks, see the `pre-commit documentation `__. + + +***************** +Make your changes +***************** + +After you're all set up to develop ``geocat-viz``, you can start making your +changes. This section describes where, how, and what to change to add your +contributions to the ``geocat-viz`` codebase. + + +Understanding the codebase +-------------------------- + +The ``geocat-viz`` top-level directory is organized as follows: + +.. code-block:: bash + + geocat-viz + ├── build_envs + ├── docs + ├── src + │ └── geocat + │ └── viz + +* The ``build_envs`` directory contains the ``environment.yml`` file used to + create your development environment. It also contains additional environment + files used for testing and building the documentation. + +* The ``docs`` directory contains the ``sphinx`` documentation for + ``geocat-viz``. + +* The ``src/geocat/viz`` directory, contains the code for the ``geocat.viz`` + package. This is the place to add new functionality. The ``geocat.viz`` code + is organized into modules, each of which is contained in its own file. It is + recommended that you add new functionality to an existing file, though it may + be appropriate to make a new file. + + +When adding new functionality, there are multiple auxiliary files that you may +need to modify to incorporate your code into the package. These include: + +* ``src/geocat/viz/__init__.py``: This file imports all of the functions intended + for the public API. + +* ``docs/internal_api/index.rst`` and ``docs/user_api/index.rst``: These files + are used to generate the API documentation from docstrings. + +* ``docs/release-notes.rst``: This file documents changes to the codebase that + we add to in the same PR as the code changes. + + +Write and run tests +------------------- + +``geocat-viz`` uses `pytest `__ for unit tests. Currently, +we have unit tests written in both ``pytest`` and ``unittest``. We are in the +process of converting all of our tests to ``pytest`` and we encourage you to +write new tests using ``pytest``. + +To run the tests locally, use the following command from the root of the +repository: + +.. code-block:: bash + + pytest + +To run a specific test, use the following command: + +.. code-block:: bash + + pytest tests/test_mod.py::test_func + +These tests will also run automatically when you open a pull request using +GitHub Actions and the ``.github/workflows/ci.yml`` file. + +See the `pytest documentation `__ for more information. + + +************* +Documentation +************* + +``geocat-viz`` uses `sphinx `__ and +`ReadTheDocs `__ to build and host the +documentation. + + +Docstrings +---------- + +The most common situation in which you will need to add to the documentation is +through docstrings. + +``geocat-viz`` uses `numpydoc +`__ style docstrings. See +`sphinx's example numpydoc docstring +`__. + +To include your docstring documentation in the API reference, you will need to +add it to either the ``docs/internal_api/index.rst`` or +``docs/user_api/index.rst`` file, depending on whether the function is intended +for internal or external use. + +Editing other documentation files +--------------------------------- + +We welcome changes and improvements to all parts of our documentation (including +this guide)! You can find these files in the ``docs`` directory. + +These files are mainly written in `reStructuredText +`__, +but additional file types such as ``.md`` and ``.ipynb`` are also used. + +Important documentation files to know about include: + +* ``docs/index.rst``: This file is the main page of the documentation. Files + added to ``toctree`` blocks in this file will be included in the documentation + as top-level subpages. + +* ``docs/contrib.rst``: This file is the source for this guide! + +* ``docs/conf.py``: This file contains the configuration for building the documentation. + +* ``docs/examples/*.ipynb``, ``docs/examples.rst``, and ``docs/gallery.yml``: + These files are used to generate the jupyter notebook examples in the + documentation. Notebooks in the ``docs/examples/`` directory are added to the + documentation by adding them to the ``toctree`` in ``docs/examples.rst`` and + linked to their cover picture by adding them to the ``docs/gallery.yml`` + file. + +See the `sphinx documentation `__ for +more information about writing sphinx documentation. + +.. _generate-docs: + +Generate the documentation locally +---------------------------------- + +To generate the documentation locally, follow the steps below. + +#. Create and activate the ``gv-docs`` conda environment using the ``build_envs/docs.yml`` file. +#. Enter the ``docs`` directory. +#. Run ``make html`` or to build the documentation. +#. Open ``docs/_build/html/index.html`` in your browser to view the documentation. + +.. _check-docs: + +Check the documentation +----------------------- + +As well as checking local documentation generation, you should also check the +preview documentation generated as part of a PR. To do this, scroll down to the +"checks" section of the PR and click on the "Details" link next to the +"docs/readthedocs.org:geocat-viz" check. This will take you to the +corresponding build on ReadTheDocs, where you can view the documentation built +from your PR and see any warnings or errors on your build. + +******************** +Contribute your code +******************** + +Once you have prepared your changes and are ready for them to be reviewed by the +GeoCAT team, you can open a pull request. This section describes how to open a +pull request and what to expect after you open it. + +Push your changes to your fork +------------------------------ + +Once you have made your changes locally, you will need to push them to your +branch on your fork on GitHub. To do this, use the following command: + +.. code-block:: bash + + git push + +From here, you can request that your changes be merged into the main repository in the form of a pull request. + +Open a pull request +------------------- + +GitHub has extensive `pull request guides and documentation +`__ that we recommend. This section +describes the basics for our workflow. + +From your branch on your fork, open the "Pull requests" tab and click the "New +pull request" button. Make sure the "base repository" is "NCAR/geocat-viz" and +the "base" branch is set to "main", with the "head repository" and "compare" +branch set to your fork and prepared branch, respectively. + +From this page, you can see a view of the changes you have made in your branch. + +We recommend adding a short, descriptive title to your pull request. The body of +the pull request should autofill with our pull request template, which has it's +own set of directions. Please fill out the relevant sections of the template, +including adding a more detailed description of your changes. + +Once you have filled out the template, click the "Create pull request" button. +This will open your pull request on the ``geocat-viz`` repository. + +If you want to open a pull request but are not ready for it to be reviewed, you +can open the pull request as a draft. This is also a good way to get feedback on +your work that might not be ready to contribute yet. + +Address feedback +---------------- + +After you open your pull request, the GeoCAT team will review it and +may provide feedback like asking for changes or suggesting improvements. You can +address this feedback by making changes to your branch and pushing them to your +fork. The pull request will automatically update with your changes. + +The GeoCAT team appreciates your contributions and the interactive process of +reviewing pull requests, and will do our best to review your pull request in a +timely manner. It is totally normal to have to make several rounds of changes to +your pull request before it is ready to be merged, especially if you are new to +the project. + +Once your pull request is approved by a core maintainer and passes the relevant +checks, it will be merged into the main repository! + + +Delete your branch +------------------ + +We recommend deleting your branch after your pull request is merged. This will +help keep your fork clean and organized, but is not required. From c6df6cad45dc05504874a2a46501c7fa0eb9fb0b Mon Sep 17 00:00:00 2001 From: Katelyn FitzGerald <7872563+kafitzgerald@users.noreply.github.com> Date: Mon, 2 Oct 2023 17:44:56 -0600 Subject: [PATCH 08/16] Fix contributor's guide links --- .github/PULL_REQUEST_TEMPLATE.md | 2 ++ CONTRIBUTING.md | 56 +------------------------------- docs/index.rst | 2 +- 3 files changed, 4 insertions(+), 56 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 633fda21..552f53dc 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -32,6 +32,8 @@ apply to this PR, comment it out or delete it. --> Thank you so much for your PR! To help us review your contribution, please consider the following points: +- A contributor's guide is available at https://geocat-viz.readthedocs.io/en/latest/contrib.html + - Fork this repository and open the PR from your fork. Do not directly work on the NCAR/geocat-viz repository. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 99812e17..429e1370 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,56 +1,2 @@ -Please first refer to [GeoCAT Contributor's Guide](https://geocat.ucar.edu/pages/contributing.html) for overall -contribution guidelines (such as detailed description of GeoCAT structure, forking, repository cloning, -branching, etc.). Once you determine that a function should be contributed under this repo, please refer to the -following contribution guidelines: +The contributor's guide for GeoCAT-viz can be found in our [online documentation](https://geocat-viz.readthedocs.io/en/latest/contrib.html). - -# Adding new utility functions to the Geocat-viz repo - -1. Please check the followings to ensure that the functionality you are about to work on has not been ported yet: - - - Functions implemented in `$GEOCAT_VIZ/src/geocat/viz/util/util.py`, - - - The list of [GeoCAT-viz Issues](https://github.com/NCAR/GeoCAT-viz/issues) and - [GeoCAT-examples Issues](https://github.com/NCAR/GeoCAT-examples/issues) to see if any of - the existing to-do items are something you might be interested in working on, - - - If so, please comment (or self-assign the issue if you have permissions to do so) indicating that - you intend to work on it. - - - Otherwise, you may create and self-assign an issue under - [GeoCAT-viz Issues](https://github.com/NCAR/GeoCAT-viz/issues) - that describes need for the functionality you are planning to contribute. - -2. Define a new function and implement it under the `$GEOCAT_VIZ/src/geocat/viz/util/util.py`. - -# Adding new plotting utility functionality to the Geocat-viz repo - -1. Please check the followings to ensure that the functionality you are about to work on has not been ported yet: - - - Functions implemented in `$GEOCAT_VIZ/src/geocat/viz/` - - - The list of [GeoCAT-viz Issues](https://github.com/NCAR/GeoCAT-viz/issues) and - [GeoCAT-examples Issues](https://github.com/NCAR/GeoCAT-examples/issues) to see if any of - the existing to-do items are something you might be interested in working on, - - - If so, please comment (or self-assign the issue if you have permissions to do so) indicating that - you intend to work on it. - - - Otherwise, you may create and self-assign an issue under - [GeoCAT-viz Issues](https://github.com/NCAR/GeoCAT-viz/issues) - that describes need for the functionality you are planning to contribute. - -2. Determine which module is the best home for your new function. - - - If necessary, create a new `.py` module under `$GEOCAT_VIZ/src/geocat/viz/`. - - - Implement your plotting function inside the chosen module, making - use of the pre-defined parent classes if appropriate - -3. Add new modules to the namespace by adding it to `$GEOCAT_VIZ/src/geocat/viz/__init__.py` - -# Adding functionality to the User API Documentation - -1. Add your new function to `GEOCAT_VIZ/docs/user_api/index.rst`. - -2. Ensure that the function docstring has examples linking to relevant GeoCAT-Examples scripts. diff --git a/docs/index.rst b/docs/index.rst index 4c0390e8..db28769c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -89,7 +89,7 @@ plotting packages. :caption: For Developers Release Notes - Contributor's Guide + Contributor's Guide Roadmap .. toctree:: From d0836635f6e92ff9c10e7e42dfed5aa3f8236dec Mon Sep 17 00:00:00 2001 From: Katelyn FitzGerald <7872563+kafitzgerald@users.noreply.github.com> Date: Mon, 2 Oct 2023 18:08:27 -0600 Subject: [PATCH 09/16] fix a few more links in README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 98389675..773c6c14 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,13 @@ plotting packages. GeoCAT-viz functionality is used by [GeoCAT Homepage](https://geocat.ucar.edu/) -[GeoCAT-viz Contributor's Guide](https://github.com/NCAR/geocat-viz/blob/main/CONTRIBUTING.md) +[GeoCAT-viz Contributor's Guide](https://geocat-viz.readthedocs.io/en/latest/contrib.html) -[GeoCAT-viz documentation on Read the Docs](https://geocat-viz.readthedocs.io) +[GeoCAT-viz Documentation on Read the Docs](https://geocat-viz.readthedocs.io) # Installation instructions -Please see our documentation for [installation instructions](https://github.com/NCAR/geocat-viz/blob/main/INSTALLATION.md). +Please see our documentation for [installation instructions](https://geocat-viz.readthedocs.io/en/latest/installation.html). # Citing GeoCAT-viz From c25ace92c6f7d6bf697f6440d713726c56531cf7 Mon Sep 17 00:00:00 2001 From: Katelyn FitzGerald <7872563+kafitzgerald@users.noreply.github.com> Date: Mon, 2 Oct 2023 18:16:20 -0600 Subject: [PATCH 10/16] a few more edits to contrib.rst --- docs/contrib.rst | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/docs/contrib.rst b/docs/contrib.rst index 8e24debf..21cd80f9 100644 --- a/docs/contrib.rst +++ b/docs/contrib.rst @@ -92,7 +92,6 @@ A more detailed description of each step is provided in following sections. **Make your changes** #. `Understanding the codebase`_. -#. `Write and run tests`_. #. :ref:`Generate ` and :ref:`check ` the documentation. **Contribute your code** @@ -278,33 +277,6 @@ need to modify to incorporate your code into the package. These include: we add to in the same PR as the code changes. -Write and run tests -------------------- - -``geocat-viz`` uses `pytest `__ for unit tests. Currently, -we have unit tests written in both ``pytest`` and ``unittest``. We are in the -process of converting all of our tests to ``pytest`` and we encourage you to -write new tests using ``pytest``. - -To run the tests locally, use the following command from the root of the -repository: - -.. code-block:: bash - - pytest - -To run a specific test, use the following command: - -.. code-block:: bash - - pytest tests/test_mod.py::test_func - -These tests will also run automatically when you open a pull request using -GitHub Actions and the ``.github/workflows/ci.yml`` file. - -See the `pytest documentation `__ for more information. - - ************* Documentation ************* From 521008f7d9d4adb20e6d6af57b77df2ff5d22e4b Mon Sep 17 00:00:00 2001 From: Katelyn FitzGerald <7872563+kafitzgerald@users.noreply.github.com> Date: Mon, 2 Oct 2023 18:22:13 -0600 Subject: [PATCH 11/16] edits to release notes --- docs/release-notes.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 9c35d95c..eb7eb8ac 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -5,16 +5,20 @@ Release Notes ============= -New Features -^^^^^^^^^ -* Add code of conduct by `Katelyn FitzGerald`_ in (:pr:`163`) -* Added Python 3.11 and removed Python 3.8 `Katelyn FitzGerald`_ in (:pr:`162`) - Bug Fixes ^^^^^^^^^ -* Matplotlib pinned to <3.8 `Katelyn Fitzgerald`_ in (:pr:`161`) +* Matplotlib pinned to <3.8 `Katelyn FitzGerald`_ in (:pr:`161`) * Xarray unpinned by `Katelyn FitzGerald`_ in (:pr:`159`) +New Features +^^^^^^^^^^^^ +* Added Python 3.11 and removed Python 3.8 `Katelyn FitzGerald`_ in (:pr:`162`) + +Documentation +^^^^^^^^^^^^^ +* Add a contributor's guide by `Katelyn FitzGerald`_ in (:pr:`166`) +* Add code of conduct by `Katelyn FitzGerald`_ in (:pr:`163`) + v2023.09.0 (September 7, 2023) ------------------------------ Bug fix in ``add_height_from_pressure_axis()`` and added example documentation. From b3ed5a0c4258f74e0719c5b30b2faf3ccd083273 Mon Sep 17 00:00:00 2001 From: Katelyn FitzGerald <7872563+kafitzgerald@users.noreply.github.com> Date: Mon, 2 Oct 2023 18:24:43 -0600 Subject: [PATCH 12/16] fix whitespace --- CONTRIBUTING.md | 1 - docs/contrib.rst | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 429e1370..984090b7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,2 +1 @@ The contributor's guide for GeoCAT-viz can be found in our [online documentation](https://geocat-viz.readthedocs.io/en/latest/contrib.html). - diff --git a/docs/contrib.rst b/docs/contrib.rst index 21cd80f9..0e041961 100644 --- a/docs/contrib.rst +++ b/docs/contrib.rst @@ -158,7 +158,7 @@ Use the following commands to create a new conda environment to develop pip install -e . To test your new install, open a python session and try importing -``geocat.viz``. +``geocat.viz``. .. code-block:: python From a5b7b222c21aaed86f74e9ac0b06f7a60f1a8662 Mon Sep 17 00:00:00 2001 From: anissa111 Date: Tue, 3 Oct 2023 15:10:10 -0600 Subject: [PATCH 13/16] finalize release notes for v2023.10.0 --- docs/release-notes.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/release-notes.rst b/docs/release-notes.rst index eb7eb8ac..399ba793 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -5,6 +5,11 @@ Release Notes ============= +v2023.10.0 (October 3, 2023) +---------------------------- +This release adds a Contributor's Guide and Code of Conduct, updates several +dependency pins, and adds Python 3.11 support while removing Python 3.8. + Bug Fixes ^^^^^^^^^ * Matplotlib pinned to <3.8 `Katelyn FitzGerald`_ in (:pr:`161`) From a32f93227ced280ea9ce5ddbf20c49fc53488194 Mon Sep 17 00:00:00 2001 From: Katelyn FitzGerald <7872563+kafitzgerald@users.noreply.github.com> Date: Wed, 4 Oct 2023 09:21:28 -0600 Subject: [PATCH 14/16] Python version fix in environment and installation doc files (#170) * update python version in docs.yml * update python version in environment.yml * update python version in installation.rst --- build_envs/docs.yml | 2 +- build_envs/environment.yml | 2 +- docs/installation.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build_envs/docs.yml b/build_envs/docs.yml index 01c2cae6..fd2ca1fb 100644 --- a/build_envs/docs.yml +++ b/build_envs/docs.yml @@ -2,7 +2,7 @@ name: gv-docs channels: - conda-forge dependencies: - - python>=3.8, <3.12 + - python>=3.9, <3.12 - cartopy - cmaps - matplotlib<3.8 diff --git a/build_envs/environment.yml b/build_envs/environment.yml index d1172053..5a6fd5f4 100644 --- a/build_envs/environment.yml +++ b/build_envs/environment.yml @@ -2,7 +2,7 @@ name: geocat_viz_build channels: - conda-forge dependencies: - - python>=3.8, <3.12 + - python>=3.9, <3.12 - cartopy - make - matplotlib<3.8 diff --git a/docs/installation.rst b/docs/installation.rst index cc0a19d3..399e5ab0 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -95,7 +95,7 @@ installed. Required dependencies for building and testing GeoCAT-viz ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Python 3.8+ + - Python 3.9+ - `numpy `__ - `xarray `__ - `matplotlib `__ From 2caa503be96a96d2899cd9969804c3cc275a2425 Mon Sep 17 00:00:00 2001 From: Katelyn FitzGerald <7872563+kafitzgerald@users.noreply.github.com> Date: Wed, 1 Nov 2023 18:02:38 -0600 Subject: [PATCH 15/16] Invert y-axis in add_height_from_pressure_axis.ipynb --- docs/examples/add_height_from_pressure_axis.ipynb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/examples/add_height_from_pressure_axis.ipynb b/docs/examples/add_height_from_pressure_axis.ipynb index 57cb6416..6cc54793 100644 --- a/docs/examples/add_height_from_pressure_axis.ipynb +++ b/docs/examples/add_height_from_pressure_axis.ipynb @@ -80,6 +80,9 @@ " linestyles='solid',\n", " add_labels=False)\n", "\n", + "# Invert y-axis\n", + "ax.invert_yaxis()\n", + "\n", "# Create second y-axis to show geo-potential height.\n", "axRHS = gv.add_height_from_pressure_axis(ax, heights=[4, 8])\n", "\n", From 1ef734865e6eb6527da83d42ee72d46a0f2c8a7f Mon Sep 17 00:00:00 2001 From: Katelyn FitzGerald <7872563+kafitzgerald@users.noreply.github.com> Date: Wed, 1 Nov 2023 18:11:17 -0600 Subject: [PATCH 16/16] Update release-notes.rst --- docs/release-notes.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 399ba793..32c81083 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -5,6 +5,14 @@ Release Notes ============= +v2023.11.0 (Unreleased) +----------------------- +[Plain text summary here] + +Documentation +^^^^^^^^^^^^^ +* Invert y-axis in add_height_from_pressure_axis example by `Katelyn FitzGerald`_ in (:pr:`173`) + v2023.10.0 (October 3, 2023) ---------------------------- This release adds a Contributor's Guide and Code of Conduct, updates several @@ -12,12 +20,12 @@ dependency pins, and adds Python 3.11 support while removing Python 3.8. Bug Fixes ^^^^^^^^^ -* Matplotlib pinned to <3.8 `Katelyn FitzGerald`_ in (:pr:`161`) +* Matplotlib pinned to <3.8 by `Katelyn FitzGerald`_ in (:pr:`161`) * Xarray unpinned by `Katelyn FitzGerald`_ in (:pr:`159`) New Features ^^^^^^^^^^^^ -* Added Python 3.11 and removed Python 3.8 `Katelyn FitzGerald`_ in (:pr:`162`) +* Added Python 3.11 and removed Python 3.8 by `Katelyn FitzGerald`_ in (:pr:`162`) Documentation ^^^^^^^^^^^^^