diff --git a/.github/workflows/python-documentation.yml b/.github/workflows/python-documentation.yml new file mode 100644 index 0000000..f6d1ff7 --- /dev/null +++ b/.github/workflows/python-documentation.yml @@ -0,0 +1,33 @@ +name: Build jaxparrow html documentation + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: write + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.9" + - name: Install dependencies + run: | + pip install sphinx sphinx_rtd_theme myst_parser + - name: Sphinx build + run: | + sphinx-build docs docs/_build + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + publish_branch: gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/_build/ + force_orphan: true diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..ea65926 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,42 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Build and test jaxparrow + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: "pip" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + # install the package locally + python -m pip install . + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest tests/test_velocities.py --doctest-modules --junitxml=junit/test-results.xml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..878ec48 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,33 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload jaxparrow to PyPI + +on: + release: + types: [published] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.9" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/README.md b/README.md index d4c90d9..b787ca0 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ u_cyclo, v_cyclo = cyclogeostrophy(u_geos=u_geos, v_geos=v_geos, By default, the `cyclogeostrophy` function relies on our variational method. Its `method` argument provides the ability to use an iterative method instead, either the one described by [Penven *et al.*](https://doi.org/10.1016/j.dsr2.2013.10.015), or the one by [Ioannou *et al.*](https://doi.org/10.1029/2019JC015031). Additional arguments also give a finer control over the three approaches hyperparameters. \ -See [**jaxparrow** documentation](docs/_build/html/index.html) for more details. +See [**jaxparrow** documentation](docs/_build/index.html) for more details. [Notebooks](notebooks/README.md) are available as step-by-step examples. diff --git a/docs/_build/html/.buildinfo b/docs/_build/.buildinfo similarity index 82% rename from docs/_build/html/.buildinfo rename to docs/_build/.buildinfo index 491b674..e319db9 100644 --- a/docs/_build/html/.buildinfo +++ b/docs/_build/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: bd118657e0721db2929ba23353b9ee53 +config: 5ec2c7199585950b86ff044830b95058 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_build/.doctrees/environment.pickle b/docs/_build/.doctrees/environment.pickle new file mode 100644 index 0000000..c4b11ef Binary files /dev/null and b/docs/_build/.doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/index.doctree b/docs/_build/.doctrees/index.doctree similarity index 100% rename from docs/_build/doctrees/index.doctree rename to docs/_build/.doctrees/index.doctree diff --git a/docs/_build/doctrees/jaxparrow.cyclogeostrophy.doctree b/docs/_build/.doctrees/jaxparrow.cyclogeostrophy.doctree similarity index 100% rename from docs/_build/doctrees/jaxparrow.cyclogeostrophy.doctree rename to docs/_build/.doctrees/jaxparrow.cyclogeostrophy.doctree diff --git a/docs/_build/.doctrees/jaxparrow.doctree b/docs/_build/.doctrees/jaxparrow.doctree new file mode 100644 index 0000000..a926dce Binary files /dev/null and b/docs/_build/.doctrees/jaxparrow.doctree differ diff --git a/docs/_build/doctrees/jaxparrow.geostrophy.doctree b/docs/_build/.doctrees/jaxparrow.geostrophy.doctree similarity index 100% rename from docs/_build/doctrees/jaxparrow.geostrophy.doctree rename to docs/_build/.doctrees/jaxparrow.geostrophy.doctree diff --git a/docs/_build/doctrees/jaxparrow.tools.doctree b/docs/_build/.doctrees/jaxparrow.tools.doctree similarity index 100% rename from docs/_build/doctrees/jaxparrow.tools.doctree rename to docs/_build/.doctrees/jaxparrow.tools.doctree diff --git a/docs/_build/doctrees/jaxparrow.tools.tools.doctree b/docs/_build/.doctrees/jaxparrow.tools.tools.doctree similarity index 100% rename from docs/_build/doctrees/jaxparrow.tools.tools.doctree rename to docs/_build/.doctrees/jaxparrow.tools.tools.doctree diff --git a/docs/_build/doctrees/modules.doctree b/docs/_build/.doctrees/modules.doctree similarity index 100% rename from docs/_build/doctrees/modules.doctree rename to docs/_build/.doctrees/modules.doctree diff --git a/docs/_build/doctrees/usage.doctree b/docs/_build/.doctrees/usage.doctree similarity index 100% rename from docs/_build/doctrees/usage.doctree rename to docs/_build/.doctrees/usage.doctree diff --git a/docs/_build/html/_sources/index.rst.txt b/docs/_build/_sources/index.rst.txt similarity index 100% rename from docs/_build/html/_sources/index.rst.txt rename to docs/_build/_sources/index.rst.txt diff --git a/docs/_build/html/_sources/jaxparrow.cyclogeostrophy.rst.txt b/docs/_build/_sources/jaxparrow.cyclogeostrophy.rst.txt similarity index 100% rename from docs/_build/html/_sources/jaxparrow.cyclogeostrophy.rst.txt rename to docs/_build/_sources/jaxparrow.cyclogeostrophy.rst.txt diff --git a/docs/_build/html/_sources/jaxparrow.geostrophy.rst.txt b/docs/_build/_sources/jaxparrow.geostrophy.rst.txt similarity index 100% rename from docs/_build/html/_sources/jaxparrow.geostrophy.rst.txt rename to docs/_build/_sources/jaxparrow.geostrophy.rst.txt diff --git a/docs/_build/html/_sources/jaxparrow.rst.txt b/docs/_build/_sources/jaxparrow.rst.txt similarity index 94% rename from docs/_build/html/_sources/jaxparrow.rst.txt rename to docs/_build/_sources/jaxparrow.rst.txt index 3bb0560..45065a5 100644 --- a/docs/_build/html/_sources/jaxparrow.rst.txt +++ b/docs/_build/_sources/jaxparrow.rst.txt @@ -7,7 +7,6 @@ Subpackages .. toctree:: :maxdepth: 4 - jaxparrow.grid jaxparrow.tools Submodules diff --git a/docs/_build/html/_sources/jaxparrow.tools.rst.txt b/docs/_build/_sources/jaxparrow.tools.rst.txt similarity index 100% rename from docs/_build/html/_sources/jaxparrow.tools.rst.txt rename to docs/_build/_sources/jaxparrow.tools.rst.txt diff --git a/docs/_build/html/_sources/jaxparrow.tools.tools.rst.txt b/docs/_build/_sources/jaxparrow.tools.tools.rst.txt similarity index 100% rename from docs/_build/html/_sources/jaxparrow.tools.tools.rst.txt rename to docs/_build/_sources/jaxparrow.tools.tools.rst.txt diff --git a/docs/_build/html/_sources/modules.rst.txt b/docs/_build/_sources/modules.rst.txt similarity index 100% rename from docs/_build/html/_sources/modules.rst.txt rename to docs/_build/_sources/modules.rst.txt diff --git a/docs/_build/html/_sources/usage.rst.txt b/docs/_build/_sources/usage.rst.txt similarity index 100% rename from docs/_build/html/_sources/usage.rst.txt rename to docs/_build/_sources/usage.rst.txt diff --git a/docs/_build/html/_static/alabaster.css b/docs/_build/_static/alabaster.css similarity index 100% rename from docs/_build/html/_static/alabaster.css rename to docs/_build/_static/alabaster.css diff --git a/docs/_build/html/_static/basic.css b/docs/_build/_static/basic.css similarity index 100% rename from docs/_build/html/_static/basic.css rename to docs/_build/_static/basic.css diff --git a/docs/_build/html/_static/custom.css b/docs/_build/_static/custom.css similarity index 100% rename from docs/_build/html/_static/custom.css rename to docs/_build/_static/custom.css diff --git a/docs/_build/html/_static/doctools.js b/docs/_build/_static/doctools.js similarity index 100% rename from docs/_build/html/_static/doctools.js rename to docs/_build/_static/doctools.js diff --git a/docs/_build/html/_static/documentation_options.js b/docs/_build/_static/documentation_options.js similarity index 100% rename from docs/_build/html/_static/documentation_options.js rename to docs/_build/_static/documentation_options.js diff --git a/docs/_build/html/_static/file.png b/docs/_build/_static/file.png similarity index 100% rename from docs/_build/html/_static/file.png rename to docs/_build/_static/file.png diff --git a/docs/_build/html/_static/language_data.js b/docs/_build/_static/language_data.js similarity index 100% rename from docs/_build/html/_static/language_data.js rename to docs/_build/_static/language_data.js diff --git a/docs/_build/html/_static/minus.png b/docs/_build/_static/minus.png similarity index 100% rename from docs/_build/html/_static/minus.png rename to docs/_build/_static/minus.png diff --git a/docs/_build/html/_static/plus.png b/docs/_build/_static/plus.png similarity index 100% rename from docs/_build/html/_static/plus.png rename to docs/_build/_static/plus.png diff --git a/docs/_build/html/_static/pygments.css b/docs/_build/_static/pygments.css similarity index 100% rename from docs/_build/html/_static/pygments.css rename to docs/_build/_static/pygments.css diff --git a/docs/_build/html/_static/searchtools.js b/docs/_build/_static/searchtools.js similarity index 100% rename from docs/_build/html/_static/searchtools.js rename to docs/_build/_static/searchtools.js diff --git a/docs/_build/html/_static/sphinx_highlight.js b/docs/_build/_static/sphinx_highlight.js similarity index 100% rename from docs/_build/html/_static/sphinx_highlight.js rename to docs/_build/_static/sphinx_highlight.js diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle deleted file mode 100644 index 9974001..0000000 Binary files a/docs/_build/doctrees/environment.pickle and /dev/null differ diff --git a/docs/_build/doctrees/jaxparrow.doctree b/docs/_build/doctrees/jaxparrow.doctree deleted file mode 100644 index af39952..0000000 Binary files a/docs/_build/doctrees/jaxparrow.doctree and /dev/null differ diff --git a/docs/_build/doctrees/jaxparrow.grid.cgrid.doctree b/docs/_build/doctrees/jaxparrow.grid.cgrid.doctree deleted file mode 100644 index 40da9ad..0000000 Binary files a/docs/_build/doctrees/jaxparrow.grid.cgrid.doctree and /dev/null differ diff --git a/docs/_build/doctrees/jaxparrow.grid.doctree b/docs/_build/doctrees/jaxparrow.grid.doctree deleted file mode 100644 index 805ef4f..0000000 Binary files a/docs/_build/doctrees/jaxparrow.grid.doctree and /dev/null differ diff --git a/docs/_build/html/genindex.html b/docs/_build/genindex.html similarity index 57% rename from docs/_build/html/genindex.html rename to docs/_build/genindex.html index 7655afd..1bd2a2f 100644 --- a/docs/_build/html/genindex.html +++ b/docs/_build/genindex.html @@ -39,36 +39,15 @@

Index

| M | N | R - | S

C

- + - @@ -164,25 +101,11 @@

J

-
  • - jaxparrow.grid - -
  • +
    -

    S

    - - - -
    - @@ -361,7 +230,7 @@

    Quick search