diff --git a/.github/ISSUE_TEMPLATE/general-issue.md b/.github/ISSUE_TEMPLATE/general-issue.md index 6a82bddbe..3f3b2925f 100644 --- a/.github/ISSUE_TEMPLATE/general-issue.md +++ b/.github/ISSUE_TEMPLATE/general-issue.md @@ -1,8 +1,7 @@ --- name: Parcels feature requests, enhancements, or bug reporting about: Create an Issue about bugs in the Parcels codebase, or required improvements -title: '' -labels: '' -assignees: '' - +title: "" +labels: "" +assignees: "" --- diff --git a/.github/workflows/pypi-release.yaml b/.github/workflows/pypi-release.yaml index 050f332ed..6b3106900 100644 --- a/.github/workflows/pypi-release.yaml +++ b/.github/workflows/pypi-release.yaml @@ -5,7 +5,7 @@ on: - published push: tags: - - 'v*' + - "v*" workflow_dispatch: jobs: @@ -79,7 +79,6 @@ jobs: repository_url: https://test.pypi.org/legacy/ verbose: true - upload-to-pypi: needs: test-built-dist if: github.event_name == 'release' diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 5cb547f3d..7ba645959 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: os: [macos, ubuntu, windows] - include: # TODO check if these can go? + include: # TODO check if these can go? - os: macos os-short: osx - os: ubuntu diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fab3d8953..da754834e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,30 +1,34 @@ repos: -- repo: https://github.com/pre-commit/pre-commit-hooks + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-yaml - - id: check-ast - - id: check-json + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-ast + - id: check-json types: [text] files: \.(json|ipynb)$ -- repo: https://github.com/pycqa/flake8 - rev: '6.1.0' + - repo: https://github.com/pycqa/flake8 + rev: "6.1.0" hooks: - - id: flake8 -- repo: https://github.com/pycqa/pydocstyle - rev: 6.3.0 # pick a git hash / tag to point to + - id: flake8 + - repo: https://github.com/pycqa/pydocstyle + rev: 6.3.0 # pick a git hash / tag to point to hooks: - - id: pydocstyle -- repo: https://github.com/nbQA-dev/nbQA + - id: pydocstyle + - repo: https://github.com/nbQA-dev/nbQA rev: 1.7.1 hooks: - - id: nbqa-black - - id: nbqa-check-ast - - id: nbqa-isort -- repo: https://github.com/pycqa/isort + - id: nbqa-black + - id: nbqa-check-ast + - id: nbqa-isort + - repo: https://github.com/pycqa/isort rev: 5.13.2 hooks: - - id: isort + - id: isort name: isort (python) + - repo: https://github.com/pre-commit/mirrors-prettier + rev: "v3.1.0" + hooks: + - id: prettier diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..4f549f9dd --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +docs/_templates diff --git a/CITATION.cff b/CITATION.cff index 9fd3a663b..6553b908f 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,20 +1,20 @@ cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: -- family-names: "Van Sebille" - given-names: "Erik" - orcid: "https://orcid.org/0000-0003-2041-0704" -- family-names: "Kehl" - given-names: "Christian" - orcid: "https://orcid.org/0000-0003-4200-1450" -- family-names: "Lange" - given-names: "Michael" - orcid: "https://orcid.org/0000-0002-3232-0127" -- family-names: "Delandmeter" - given-names: "Philippe" - orcid: "https://orcid.org/0000-0003-0100-5834" -- name: "The Parcels contributors" - website: "https://github.com/OceanParcels/parcels/graphs/contributors" + - family-names: "Van Sebille" + given-names: "Erik" + orcid: "https://orcid.org/0000-0003-2041-0704" + - family-names: "Kehl" + given-names: "Christian" + orcid: "https://orcid.org/0000-0003-4200-1450" + - family-names: "Lange" + given-names: "Michael" + orcid: "https://orcid.org/0000-0002-3232-0127" + - family-names: "Delandmeter" + given-names: "Philippe" + orcid: "https://orcid.org/0000-0003-0100-5834" + - name: "The Parcels contributors" + website: "https://github.com/OceanParcels/parcels/graphs/contributors" title: "Parcels" version: 2.4.2 doi: 10.5281/zenodo.8010997 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index d7500e73f..9570e7d11 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo Examples of behavior that contributes to creating a positive environment include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting +- The use of sexualized language or imagery and unwelcome sexual attention or advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities diff --git a/README.md b/README.md index 828e98fbd..c7c38d974 100644 --- a/README.md +++ b/README.md @@ -4,27 +4,26 @@ ![Arctic-SO-medusaParticles](https://github.com/OceanParcels/oceanparcels_website/blob/master/images/homepage.gif) -*Animation of virtual particles carried by ocean surface flow in the global oceans. The particles are advected with [Parcels](http://oceanparcels.org/) in data from the [NEMO Ocean Model](https://www.nemo-ocean.eu/).* +_Animation of virtual particles carried by ocean surface flow in the global oceans. The particles are advected with [Parcels](http://oceanparcels.org/) in data from the [NEMO Ocean Model](https://www.nemo-ocean.eu/)._ ### Parcels manuscript and code The manuscript detailing the first release of Parcels, version 0.9, has been published in [Geoscientific Model Development](https://www.geosci-model-dev.net/10/4175/2017/gmd-10-4175-2017.html) and can be cited as -*Lange, M and E van Sebille (2017) Parcels v0.9: prototyping a Lagrangian Ocean Analysis framework for the petascale age. Geoscientific Model Development, 10, 4175-4186. https://doi.org/10.5194/gmd-2017-167* +_Lange, M and E van Sebille (2017) Parcels v0.9: prototyping a Lagrangian Ocean Analysis framework for the petascale age. Geoscientific Model Development, 10, 4175-4186. https://doi.org/10.5194/gmd-2017-167_ The manuscript detailing version 2.0 of Parcels is available at [Geoscientific Model Development](https://www.geosci-model-dev.net/12/3571/2019/gmd-12-3571-2019-discussion.html) and can be cited as: -*Delandmeter, P and E van Sebille (2019) The Parcels v2.0 Lagrangian framework: new field interpolation schemes. Geoscientific Model Development, 12, 3571-3584. https://doi.org/10.5194/gmd-12-3571-2019* +_Delandmeter, P and E van Sebille (2019) The Parcels v2.0 Lagrangian framework: new field interpolation schemes. Geoscientific Model Development, 12, 3571-3584. https://doi.org/10.5194/gmd-12-3571-2019_ The manuscript detailing the performance of Parcels v2.4 is available at [Computers & Geosciences](https://doi.org/10.1016/j.cageo.2023.105322) and can be cited as: -*Kehl, C, PD Nooteboom, MLA Kaandorp and E van Sebille (2023) Efficiently simulating Lagrangian particles in large-scale ocean flows — Data structures and their impact on geophysical applications, Computers and Geosciences, 175, 105322. https://doi.org/10.1016/j.cageo.2023.105322* +_Kehl, C, PD Nooteboom, MLA Kaandorp and E van Sebille (2023) Efficiently simulating Lagrangian particles in large-scale ocean flows — Data structures and their impact on geophysical applications, Computers and Geosciences, 175, 105322. https://doi.org/10.1016/j.cageo.2023.105322_ ### Further information See [oceanparcels.org](http://oceanparcels.org/) for further information about [installing](https://docs.oceanparcels.org/en/latest/installation.html) and [running](https://docs.oceanparcels.org/en/latest/documentation.html) the Parcels code, as well as extended [documentation](https://docs.oceanparcels.org/en/latest/reference.html) of the methods and classes. - ### Launch Parcels Tutorials on [mybinder.org](https://mybinder.org/v2/gh/OceanParcels/parcels/master?labpath=docs%2Fexamples%2Fparcels_tutorial.ipynb) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/OceanParcels/parcels/master?labpath=docs%2Fexamples%2Fparcels_tutorial.ipynb) diff --git a/docs/contributing.md b/docs/contributing.md index 5fd4884d7..1fea47073 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -5,41 +5,36 @@ Even if you don't want to contribute directly to the codebase, getting involved This document outlines some guidelines for contributing to the parcels codebase. If you have any questions or suggestions for how we can improve this document, please let us know. - ## Getting Started To get started contributing to parcels, you'll need to install the developer version of Parcels following [our installation instructions](installation.rst#installation-for-developers). This will install the latest version of Parcels from the `master` branch of the repository. **Optional:** Setup `pre-commit` hooks by running `pre-commit install`. This ensures that code is formatted correctly before you commit it. - ## Making Changes Once you have a working environment, you can start making changes to the code! Here are some general guidelines to follow when making changes: -* Follow the [NumPy docstring conventions](https://numpydoc.readthedocs.io/en/latest/format.html) when adding or modifying docstrings. - -* Follow the [PEP 8](https://peps.python.org/pep-0008/) style guide when writing code. This codebase also uses [flake8](https://flake8.pycqa.org/en/latest/) and [isort](https://pycqa.github.io/isort/) to ensure a consistent code style (these tools are run automatically by pre-commit). +- Follow the [NumPy docstring conventions](https://numpydoc.readthedocs.io/en/latest/format.html) when adding or modifying docstrings. -* Use Git to manage your changes. Create a new branch for each feature or bug fix. +- Follow the [PEP 8](https://peps.python.org/pep-0008/) style guide when writing code. This codebase also uses [flake8](https://flake8.pycqa.org/en/latest/) and [isort](https://pycqa.github.io/isort/) to ensure a consistent code style (these tools are run automatically by pre-commit). -* Write clear commit messages that explain the changes you've made. +- Use Git to manage your changes. Create a new branch for each feature or bug fix. -* Include tests for any new code you write. +- Write clear commit messages that explain the changes you've made. -* Submit your changes as a pull request to the `master` branch, and wait for feedback! +- Include tests for any new code you write. +- Submit your changes as a pull request to the `master` branch, and wait for feedback! ```{note} Feel free to create an issue for your proposed feature or change to the codebase so that feedback can be given. Submitting a "draft pull request" is also a great way to give visibility to your branch during development, allowing for faster feedback. ``` - ## Working with documentation The documentation for this project is processed by Sphinx. To view documentation from your changes, you can run `sphinx-autobuild --ignore "*.zip" docs docs/_build` to create a server to automatically rebuild the documentation when you make changes. - If you have any questions or issues while contributing to parcels, please feel free to [open a discussion](https://github.com/OceanParcels/parcels/discussions). Thank you for your contributions!