Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6d4999a
Provide version information
VeckoTheGecko Aug 14, 2024
c1b851e
Build API documentation
VeckoTheGecko Aug 14, 2024
cc091cb
Configure Ruff, add pre-commit, remove flake isort and pydocstyle
VeckoTheGecko Aug 15, 2024
e3ce363
Remove linting workflow
VeckoTheGecko Aug 15, 2024
5da39de
Updating readme to include community guidelines
michaeldenes Aug 16, 2024
0d1756b
Updating documentation of constructors.py for API function list
michaeldenes Aug 16, 2024
3666670
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 16, 2024
a52a9fe
Updates to docstrings, stokes, wind, settling.
michaeldenes Aug 16, 2024
60622ad
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 16, 2024
817e236
Updates to biofouling kernel docstrings
michaeldenes Aug 16, 2024
f34dae6
Some updates to docstrings, still to complete
michaeldenes Aug 16, 2024
83bddc1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 16, 2024
764f0d0
Cleaning up docstrings for all kernels.
michaeldenes Aug 26, 2024
dff0cd4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 26, 2024
06b2601
Update docstrings in utils file
michaeldenes Aug 26, 2024
b1b6641
Cleaning up the docstrings and reformatting the mathematics
michaeldenes Aug 26, 2024
a94c404
FIxing up docstring math
michaeldenes Aug 26, 2024
b8603e6
Swapping a ' for a `
michaeldenes Aug 26, 2024
8c655cf
Swapping another ' for a `
michaeldenes Aug 26, 2024
b7052df
More ` for ', and fixing biofouling math docstring to read correctly …
michaeldenes Aug 26, 2024
dcda85c
Cleaning up the docstrings
michaeldenes Aug 26, 2024
3ba8fe6
Formatting fixes for docstrings
michaeldenes Aug 26, 2024
6b52cc3
Adding community guidelines text to main documentation page
michaeldenes Aug 26, 2024
91a6973
Updating documentation index page
michaeldenes Aug 26, 2024
9dc75fe
Fixes to link formatting on index page
michaeldenes Aug 26, 2024
12a1fcd
Updating docstring for dataset download
michaeldenes Aug 27, 2024
84e2d0a
Minor update to docstring
michaeldenes Aug 27, 2024
55ace59
Ignore D100 warning for linting.
michaeldenes Aug 27, 2024
7e419d3
Update API structure and Ruff lint ignore
VeckoTheGecko Aug 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .flake8

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/linting.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ input_data/
**.DS_store**
**.pyc**
**.zarr
*.egg-info
build
docs/_build/*
docs/_downloads
.vscode
_version_setup.py

16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
# - id: end-of-file-fixer
- id: check-yaml
- id: check-json
types: [text]
files: \.(json|ipynb)$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.6
hooks:
- id: ruff
args: [ --fix ]
# - id: ruff-format
6 changes: 3 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ build:
os: ubuntu-22.04
tools:
python: mambaforge-22.9
# jobs: # TODO: uncomment when we have a test suite
# pre_build:
# - sphinx-build -b linkcheck docs/ _build/linkcheck
jobs:
pre_build:
- pip install . # Need access to version information

sphinx:
configuration: docs/conf.py
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ The tool is based on the [`Parcels`](https://oceanparcels.org/) computational La
conda install conda-forge::plasticparcels
```

### Community contributions and support
#### Contributing code
We welcome contributions to `plasticparcels`, especially example workbooks and analyses for our [public examples page](https://plastic.oceanparcels.org/en/latest/examples.html). To contribute to the project, please submit a [pull request](https://github.com/OceanParcels/plasticparcels/pulls).

#### Requesting features and reporting issues/bugs
If you want to request a new feature, or if you find an issue or bug in the code, please open an issue in the [`plasticparcels` issue tracker](https://github.com/OceanParcels/plasticparcels/issues).

#### Seeking support?
If you would like support using `plasticparcels`, or are have any questions about your `plasticparcels` simulations, please start a discussion in the [`plasticparcels` discussion page](https://github.com/OceanParcels/plasticparcels/discussions).




### Further information
For more information and documentation, see the [plasticparcels documentation](https://plastic.oceanparcels.org/).

Expand Down
14 changes: 9 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@
import sys
import warnings

sys.path.insert(0, os.path.abspath('..')) # Allow to find `plasticparcels` package

import plasticparcels

project = 'plasticparcels'
copyright = f'{datetime.datetime.now().year}, The OceanParcels Team'
author = 'The OceanParcels Team'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = []

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
Expand Down Expand Up @@ -78,6 +81,7 @@
"myst_parser",
"nbsphinx",
"numpydoc",
'sphinx.ext.autosummary',
]

myst_enable_extensions = ["dollarmath", "amsmath"]
Expand Down Expand Up @@ -130,12 +134,12 @@ def linkcode_resolve(domain, info):
else:
linespec = ""

fn = os.path.relpath(fn, start=os.path.dirname(parcels.__file__))
fn = os.path.relpath(fn, start=os.path.dirname(plasticparcels.__file__))

if "-" in parcels.__version__:
return f"https://github.com/OceanParcels/plasticparcels/blob/master/parcels/{fn}{linespec}"
if "-" in plasticparcels.__version__:
return f"https://github.com/OceanParcels/plasticparcels/blob/master/plasticparcels/{fn}{linespec}"
else:
return (
f"https://github.com/OceanParcels/plasticparcels/blob/"
f"{parcels.__version__}/parcels/{fn}{linespec}"
f"{plasticparcels.__version__}/plasticparcels/{fn}{linespec}"
)
2 changes: 1 addition & 1 deletion docs/environment_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies:
- numpydoc
- nbsphinx
- sphinx<6
- pandoc>1.12.1,<3
- pandoc>3,<4
- pydata-sphinx-theme
- sphinx-autobuild
- myst-parser
14 changes: 11 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,21 @@ Required Data

* Hydrodynamic model data: `MOI GLO12 (psy4v3r1) <https://www.mercator-ocean.eu/en/solutions-expertise/accessing-digital-data/product-details/?offer=4217979b-2662-329a-907c-602fdc69c3a3&system=d35404e4-40d3-59d6-3608-581c9495d86a>`_
* Biogeochemical model data: `MOI BIO4 (biomer4v2r1) <https://www.mercator-ocean.eu/en/solutions-expertise/accessing-digital-data/product-details/?offer=8d0c01f3-81c7-0a59-0d06-602fdf63c5b6&system=dc40b324-7de7-0732-880b-5d9dcf7d344a>`_
* Wave data: `ECMWF ERA5 Wave <https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels>`_ (specifically, the variables ``mean_wave_period``, ``peak_wave_period``, ``u_component_stokes_drift``, and ``v_component_stokes_drift``.)
* Wind data: `ECMWF ERA5 Wind <https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels>`_ (specifically, the variables ``10m_u_component_of_wind`` and ``10m_v_component_of_wind``)
* Wave data: `ECMWF ERA5 Wave <https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels>`_ (specifically, the variables ``mean_wave_period``, ``peak_wave_period``, ``u_component_stokes_drift``, and ``v_component_stokes_drift``.)
* Wind data: `ECMWF ERA5 Wind <https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels>`_ (specifically, the variables ``10m_u_component_of_wind`` and ``10m_v_component_of_wind``)

For the wind and wave data, we recommend using the `CDS API <https://cds.climate.copernicus.eu/api-how-to>`_.

To run the examples, you will need to update the data directories in settings ``.json`` files.

Just like the ``parcels`` framework, ``plasticparcels`` can be adapted to use other hydrodynamic, biogeochemical, wave, and atmospheric models. If you require assistance, please contact us through the [Discussions page on GitHub](https://github.com/OceanParcels/plasticparcels/discussions).
Just like the ``parcels`` framework, ``plasticparcels`` can be adapted to use other hydrodynamic, biogeochemical, wave, and atmospheric models. If you require assistance, please contact us through the `Discussions page on GitHub <https://github.com/OceanParcels/plasticparcels/discussions>`_.

Community Guidelines
^^^^^^^^^^^^^^^^^^^^

We welcome contributions to ``plasticparcels``, especially example workbooks and analyses for our `public examples page <https://plastic.oceanparcels.org/en/latest/examples.html>`_. To contribute to the project, please submit a `pull request <https://github.com/OceanParcels/plasticparcels/pulls>`_.
If you want to request a new feature, or if you find an issue or bug in the code, please open an issue in the `plasticparcels issue tracker <https://github.com/OceanParcels/plasticparcels/issues>`_.
If you would like support using ``plasticparcels``, or are have any questions about your ``plasticparcels`` simulations, please start a discussion in the `plasticparcels discussion page <https://github.com/OceanParcels/plasticparcels/discussions>`_.

.. toctree::
:maxdepth: 2
Expand All @@ -48,4 +55,5 @@ Just like the ``parcels`` framework, ``plasticparcels`` can be adapted to use ot
Examples <examples>
Physics kernels <physicskernels>
Plastic initialisation maps <initialisationmaps>
API reference <reference/index>
OceanParcels website <https://oceanparcels.org/>
6 changes: 6 additions & 0 deletions docs/reference/constructors.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
plasticparcels.constructors
---------------------------

.. automodule:: plasticparcels.constructors
:members:
:show-inheritance: yes
10 changes: 10 additions & 0 deletions docs/reference/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
API
===

.. toctree::
:maxdepth: 2

plasticparcels.constructors <constructurs>
plasticparcels.kernels <kernels>
plasticparcels.particlefile <particlefile>
plasticparcels.utils <utils>
6 changes: 6 additions & 0 deletions docs/reference/kernels.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
plasticparcels.kernels
---------------------------

.. automodule:: plasticparcels.kernels
:members:
:show-inheritance: yes
6 changes: 6 additions & 0 deletions docs/reference/particlefile.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
plasticparcels.particlefile
---------------------------

.. automodule:: plasticparcels.particlefile
:members:
:show-inheritance: yes
6 changes: 6 additions & 0 deletions docs/reference/utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
plasticparcels.utils
---------------------------

.. automodule:: plasticparcels.utils
:members:
:show-inheritance: yes
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ dependencies:
# Testing
- pytest
- coverage
- pre_commit
2 changes: 2 additions & 0 deletions plasticparcels/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from plasticparcels.constructors import * # noqa
from plasticparcels.particlefile import * # noqa
from plasticparcels.utils import * # noqa

from plasticparcels._version_setup import __version__, __version_tuple__ # noqa
Loading