diff --git a/.circleci/config.yml b/.circleci/config.yml index 9af1f64193..4be508c9e5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,8 +8,8 @@ commands: check_changes: steps: - run: | - if (test "$CIRCLE_BRANCH" = master || - git --no-pager diff --name-only origin/master... | + if (test "$CIRCLE_BRANCH" = main || + git --no-pager diff --name-only origin/main... | grep -q -E -f .circleci/install_triggers) then echo Running installation tests @@ -209,7 +209,7 @@ workflows: filters: branches: only: - - master + - main jobs: - test - install diff --git a/.github/workflows/action-conda-publish.yml b/.github/workflows/action-conda-publish.yml index 65931cc999..1a20f935fc 100644 --- a/.github/workflows/action-conda-publish.yml +++ b/.github/workflows/action-conda-publish.yml @@ -6,7 +6,7 @@ on: # use this to test before actual release and publish push: branches: - - master + - main jobs: diff --git a/.github/workflows/action-install-from-conda.yml b/.github/workflows/action-install-from-conda.yml index a2c9100265..152d2692eb 100644 --- a/.github/workflows/action-install-from-conda.yml +++ b/.github/workflows/action-install-from-conda.yml @@ -13,19 +13,19 @@ name: Conda Base Install -# runs on a push on master and at the end of every day +# runs on a push on main and at the end of every day on: # triggering on push without branch name will run tests everytime # there is a push on any branch # turn it on only if needed push: branches: - - master - # run the test only if the PR is to master + - main + # run the test only if the PR is to maain # turn it on if required #pull_request: # branches: - # - master + # - main schedule: - cron: '0 4 * * *' diff --git a/.github/workflows/action-install-from-pypi.yml b/.github/workflows/action-install-from-pypi.yml index 8d5e2abcab..19877b0d7a 100644 --- a/.github/workflows/action-install-from-pypi.yml +++ b/.github/workflows/action-install-from-pypi.yml @@ -13,21 +13,20 @@ name: PyPi Install -# runs on a push on master and at the end of every day +# runs on a push on main and at the end of every day on: # triggering on push without branch name will run tests everytime # there is a push on any branch # turn it on only if needed push: branches: - - master - - github-actions2 + - main - # run the test only if the PR is to master + # run the test only if the PR is to main # turn it on if required #pull_request: # branches: - # - master + # - main schedule: - cron: '0 0 * * *' diff --git a/.github/workflows/action-install-from-source.yml b/.github/workflows/action-install-from-source.yml index 00ed97f61d..60ec5b04d6 100644 --- a/.github/workflows/action-install-from-source.yml +++ b/.github/workflows/action-install-from-source.yml @@ -14,20 +14,20 @@ name: Source Install -# runs on a push on master and at the end of every day +# runs on a push on main and at the end of every day on: # triggering on push without branch name will run tests everytime # there is a push on any branch # turn it on only if needed push: branches: - - master + - main - github-actions2 - # run the test only if the PR is to master + # run the test only if the PR is to main # turn it on if required #pull_request: # branches: - # - master + # - main schedule: - cron: '0 0 * * *' diff --git a/.github/workflows/action-pypi-build-and-deploy.yml b/.github/workflows/action-pypi-build-and-deploy.yml index 9bfa4997d5..4d2d0b34df 100644 --- a/.github/workflows/action-pypi-build-and-deploy.yml +++ b/.github/workflows/action-pypi-build-and-deploy.yml @@ -6,7 +6,7 @@ on: # use this for testing push: branches: - - master + - main jobs: build-n-publish: diff --git a/.github/workflows/action-test.yml b/.github/workflows/action-test.yml index 1ceb33beb5..0da6da7c58 100644 --- a/.github/workflows/action-test.yml +++ b/.github/workflows/action-test.yml @@ -13,19 +13,19 @@ name: Test -# runs on a push on master and at the end of every day +# runs on a push on main and at the end of every day on: # triggering on push without branch name will run tests everytime # there is a push on any branch # turn it on only if needed push: branches: - - master - # run the test only if the PR is to master + - main + # run the test only if the PR is to main # turn it on if required #pull_request: # branches: - # - master + # - main schedule: - cron: '0 0 * * *' # nightly diff --git a/README.md b/README.md index 0c35d47036..c7aac18c5b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Documentation Status](https://readthedocs.org/projects/esmvaltool/badge/?version=latest)](https://esmvaltool.readthedocs.io/en/latest/?badge=latest) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3387139.svg)](https://doi.org/10.5281/zenodo.3387139) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ESMValGroup?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![CircleCI](https://circleci.com/gh/ESMValGroup/ESMValCore/tree/master.svg?style=svg)](https://circleci.com/gh/ESMValGroup/ESMValCore/tree/master) +[![CircleCI](https://circleci.com/gh/ESMValGroup/ESMValCore/tree/main.svg?style=svg)](https://circleci.com/gh/ESMValGroup/ESMValCore/tree/main) [![Codacy Badge](https://app.codacy.com/project/badge/Coverage/5d496dea9ef64ec68e448a6df5a65783)](https://www.codacy.com/gh/ESMValGroup/ESMValCore?utm_source=github.com&utm_medium=referral&utm_content=ESMValGroup/ESMValCore&utm_campaign=Badge_Coverage) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/5d496dea9ef64ec68e448a6df5a65783)](https://www.codacy.com/gh/ESMValGroup/ESMValCore?utm_source=github.com&utm_medium=referral&utm_content=ESMValGroup/ESMValCore&utm_campaign=Badge_Grade) [![Docker Build Status](https://img.shields.io/docker/cloud/build/esmvalgroup/esmvalcore)](https://hub.docker.com/r/esmvalgroup/esmvalcore/) diff --git a/doc/changelog.rst b/doc/changelog.rst index 77432796fb..ab1ab4881b 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -41,7 +41,7 @@ Documentation - Fix numbering of steps in release instructions (`#838 `__) `Bouwe Andela `__ - Add labels to changelogs of individual versions for easy reference (`#899 `__) `Klaus Zimmermann `__ -- Make CircleCI badge specific to master branch (`#902 `__) `Bouwe Andela `__ +- Make CircleCI badge specific to main branch (`#902 `__) `Bouwe Andela `__ - Fix docker build badge url (`#906 `__) `Stef Smeets `__ - Update github PR template (`#909 `__) `Stef Smeets `__ - Refer to ESMValTool GitHub discussions page in the error message (`#900 `__) `Bouwe Andela `__ diff --git a/doc/contributing.rst b/doc/contributing.rst index a54a5d94ab..a3663e9e4b 100644 --- a/doc/contributing.rst +++ b/doc/contributing.rst @@ -28,7 +28,7 @@ installation. New development should preferably be done in the `ESMValCore `__ GitHub repository. -The default git branch is ``master``. +The default git branch is ``main``. Use this branch to create a new feature branch from and make a pull request against. This @@ -74,7 +74,7 @@ Please keep the following considerations in mind when programming: are easy to understand and implement for scientific contributors. - No additional CMOR checks should be implemented inside preprocessor functions. The input cube is fixed and confirmed to follow the specification in - `esmvalcore/cmor/tables `__ + `esmvalcore/cmor/tables `__ before applying any other preprocessor functions. This design helps to keep the preprocessor functions and diagnostics scripts that use the preprocessed data from the tool simple and reliable. @@ -288,9 +288,9 @@ The documentation is built by readthedocs_ using `Sphinx `__. + `doc `__. When writing - `reStructuredText `_ + `reStructuredText `_ (``.rst``) files, please try to limit the line length to 80 characters and always start a sentence on a new line. This makes it easier to review changes to documentation on GitHub. @@ -300,7 +300,7 @@ There are two main ways of adding documentation: `docstrings `__ of Python modules, classes, and functions that are mentioned in - `doc/api `__ + `doc/api `__ are used to generate the online documentation. This results in the :ref:`api`. The standard document with best practices on writing docstrings is @@ -380,7 +380,7 @@ CircleCI_ will build the documentation with the command: This will catch mistakes that can be detected automatically. The configuration file for Sphinx_ is -`doc/shinx/source/conf.py `_. +`doc/shinx/source/conf.py `_. See :ref:`esmvaltool:esmvalcore-documentation-integration` for information on how the ESMValCore documentation is integrated into the complete ESMValTool @@ -395,7 +395,7 @@ Tests ----- To check that the code works correctly, there tests available in the -`tests directory `_. +`tests directory `_. We use `pytest `_ to write and run our tests. Contributions to ESMValCore should be covered by unit tests. @@ -439,7 +439,7 @@ Sample data New or modified preprocessor functions should preferably also be tested using the sample data. These tests are located in -`tests/sample_data `__. +`tests/sample_data `__. Please mark new tests that use the sample data with the `decorator `__ ``@pytest.mark.use_sample_data``. @@ -481,16 +481,16 @@ These nightly tests have been designed to follow the installation procedures described in the documentation, e.g. in the :ref:`install` chapter. The nightly tests are run using both CircleCI and GitHub Actions. The result of the tests ran by CircleCI can be seen on the -`CircleCI project page `__ +`CircleCI project page `__ and the result of the tests ran by GitHub Actions can be viewed on the `Actions tab `__ of the repository. The configuration of the tests run by CircleCI can be found in the directory -`.circleci `__, +`.circleci `__, while the configuration of the tests run by GitHub Actions can be found in the directory -`.github/workflows `__. +`.github/workflows `__. .. _backward_compatibility: @@ -549,7 +549,7 @@ Before considering adding a new dependency, carefully check that the of the dependency you want to add and any of its dependencies are `compatible `__ with the -`Apache 2.0 `_ +`Apache 2.0 `_ license that applies to the ESMValCore. Note that GPL version 2 license is considered incompatible with the Apache 2.0 license, while the compatibility of GPL version 3 license with the Apache 2.0 @@ -625,7 +625,7 @@ You can attract the attention of the `@ESMValGroup/esmvaltool-coreteam`_ by mentioning them in the issue if it looks like no-one is working on solving the problem yet. The issue needs to be fixed in a separate pull request first. -After that has been merged into the ``master`` branch and all checks on this +After that has been merged into the ``main`` branch and all checks on this branch are green again, merge it into your own branch to get the tests to pass. When reviewing a pull request, always make sure that all checks were successful. @@ -652,14 +652,14 @@ To make a new release of the package, follow these steps: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Check the ``nightly`` -`build on CircleCI `__ +`build on CircleCI `__ and the `GitHub Actions run `__. All tests should pass before making a release (branch). 2. Create a release branch ~~~~~~~~~~~~~~~~~~~~~~~~~~ -Create a branch off the ``master`` branch and push it to GitHub. +Create a branch off the ``main`` branch and push it to GitHub. Ask someone with administrative permissions to set up branch protection rules for it so only you and the person helping you with the release can push to it. Announce the name of the branch in an issue and ask the members of the @@ -673,7 +673,7 @@ The version number is stored in ``esmvalcore/_version.py``, ``package/meta.yaml``, ``CITATION.cff``. Make sure to update all files. Also update the release date in ``CITATION.cff``. See https://semver.org for more information on choosing a version number. -Make a pull request and get it merged into ``master`` and cherry pick it into +Make a pull request and get it merged into ``main`` and cherry pick it into the release branch. 4. Add release notes @@ -686,18 +686,18 @@ previous release. Review the results, and if anything needs changing, change it on GitHub and re-run the script until the changelog looks acceptable. Copy the result to the file ``doc/changelog.rst``. -Make a pull request and get it merged into ``master`` and cherry pick it into +Make a pull request and get it merged into ``main`` and cherry pick it into the release branch.. 5. Cherry pick bugfixes into the release branch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If a bug is found and fixed (i.e. pull request merged into the -``master`` branch) during the period of testing, use the command +``main`` branch) during the period of testing, use the command ``git cherry-pick`` to include the commit for this bugfix into the release branch. When the testing period is over, make a pull request to update the release notes with the latest changes, get it merged into -``master`` and cherry-pick it into the release branch. +``main`` and cherry-pick it into the release branch. 6. Make the release on GitHub ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -706,7 +706,7 @@ Do a final check that all tests on CircleCI and GitHub Actions completed successfully. Then click the `releases tab `__ -and create the new release from the release branch (i.e. not from ``master``). +and create the new release from the release branch (i.e. not from ``main``). 7. Create and upload the Conda package ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/develop/derivation.rst b/doc/develop/derivation.rst index a1bf5a44b3..9d097ff843 100644 --- a/doc/develop/derivation.rst +++ b/doc/develop/derivation.rst @@ -8,7 +8,7 @@ The variable derivation preprocessor module allows to derive variables which are not in the CMIP standard data request using standard variables as input. This is a special type of :ref:`preprocessor function `. All derivation scripts are located in -`esmvalcore/preprocessor/_derive/ `_. +`esmvalcore/preprocessor/_derive/ `_. A typical example looks like this: .. code-block:: py diff --git a/doc/develop/preprocessor_function.rst b/doc/develop/preprocessor_function.rst index 9c3d3b907c..2b828dc9dd 100644 --- a/doc/develop/preprocessor_function.rst +++ b/doc/develop/preprocessor_function.rst @@ -6,7 +6,7 @@ Preprocessor function Preprocessor functions are located in :py:mod:`esmvalcore.preprocessor`. To add a new preprocessor function, start by finding a likely looking file to add your function to in -`esmvalcore/preprocessor `_. +`esmvalcore/preprocessor `_. Create a new file in that directory if you cannot find a suitable place. The function should look like this: @@ -51,7 +51,7 @@ The function should look like this: The above function needs to be imported in the file -`esmvalcore/preprocessor/__init__.py `__: +`esmvalcore/preprocessor/__init__.py `__: .. code-block:: python @@ -110,7 +110,7 @@ The documentation in the function docstring will be shown in the :ref:`preprocessor_functions` chapter. In addition, you should add documentation on how to use the new preprocessor function from the recipe in -`doc/recipe/preprocessor.rst `__ +`doc/recipe/preprocessor.rst `__ so it is shown in the :ref:`preprocessor` chapter. See the introduction to :ref:`documentation` for more information on how to best write documentation. diff --git a/doc/quickstart/configure.rst b/doc/quickstart/configure.rst index 02354ae891..cd8a92eca9 100644 --- a/doc/quickstart/configure.rst +++ b/doc/quickstart/configure.rst @@ -174,7 +174,7 @@ Most users and diagnostic developers will not need to change this file, but it may be useful to understand its content. It will be installed along with ESMValCore and can also be viewed on GitHub: `esmvalcore/config-developer.yml -`_. +`_. This configuration file describes the file system structure and CMOR tables for several key projects (CMIP6, CMIP5, obs4mips, OBS6, OBS) on several key machines (e.g. BADC, CP4CDS, DKRZ, ETHZ, SMHI, BSC). CMIP data is stored as part of the Earth System Grid @@ -270,7 +270,7 @@ Project CMOR table configuration -------------------------------- ESMValCore comes bundled with several CMOR tables, which are stored in the directory -`esmvalcore/cmor/tables `_. +`esmvalcore/cmor/tables `_. These are copies of the tables available from `PCMDI `_. For every ``project`` that can be used in the recipe, there are four settings @@ -294,7 +294,7 @@ related to CMOR table settings available: References configuration file ============================= -The `esmvaltool/config-references.yml `__ file contains the list of ESMValTool diagnostic and recipe authors, +The `esmvaltool/config-references.yml `__ file contains the list of ESMValTool diagnostic and recipe authors, references and projects. Each author, project and reference referred to in the documentation section of a recipe needs to be in this file in the relevant section. diff --git a/doc/quickstart/install.rst b/doc/quickstart/install.rst index 787ae2fafd..3069b2aba3 100644 --- a/doc/quickstart/install.rst +++ b/doc/quickstart/install.rst @@ -45,11 +45,11 @@ By far the easiest way to install these dependencies is to use conda_. For a minimal conda installation (recommended) go to https://conda.io/miniconda.html. After installing Conda, download -`the file with the list of dependencies `_: +`the file with the list of dependencies `_: .. code-block:: bash - wget https://raw.githubusercontent.com/ESMValGroup/ESMValCore/master/environment.yml + wget https://raw.githubusercontent.com/ESMValGroup/ESMValCore/main/environment.yml and install these dependencies into a new conda environment with the command @@ -84,7 +84,7 @@ You can get the latest release with docker pull esmvalgroup/esmvalcore:stable -If you want to use the current master branch, use +If you want to use the current main branch, use .. code-block:: bash diff --git a/doc/recipe/overview.rst b/doc/recipe/overview.rst index e49abab13e..f62bdbe956 100644 --- a/doc/recipe/overview.rst +++ b/doc/recipe/overview.rst @@ -60,7 +60,7 @@ the following: Note that all authors, projects, and references mentioned in the description section of the recipe need to be included in the (locally installed copy of the) file - `esmvaltool/config-references.yml `_, + `esmvaltool/config-references.yml `_, see :ref:`config-ref`. The author name uses the format: ``surname_name``. For instance, John Doe would be: ``doe_john``. This information can be omitted by new users