Skip to content

Commit

Permalink
merge 1 and 4
Browse files Browse the repository at this point in the history
  • Loading branch information
vadmbertr committed Oct 25, 2023
2 parents f90872d + 5fa68a5 commit dd55c8f
Show file tree
Hide file tree
Showing 61 changed files with 137 additions and 957 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/python-documentation.yml
Original file line number Diff line number Diff line change
@@ -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
42 changes: 42 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -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
33 changes: 33 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/.buildinfo → docs/_build/.buildinfo
Original file line number Diff line number Diff line change
@@ -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
Binary file added docs/_build/.doctrees/environment.pickle
Binary file not shown.
File renamed without changes.
Binary file added docs/_build/.doctrees/jaxparrow.doctree
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Subpackages
.. toctree::
:maxdepth: 4

jaxparrow.grid
jaxparrow.tools

Submodules
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file removed docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file removed docs/_build/doctrees/jaxparrow.doctree
Binary file not shown.
Binary file removed docs/_build/doctrees/jaxparrow.grid.cgrid.doctree
Binary file not shown.
Binary file removed docs/_build/doctrees/jaxparrow.grid.doctree
Binary file not shown.
137 changes: 3 additions & 134 deletions docs/_build/html/genindex.html → docs/_build/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,36 +39,15 @@ <h1 id="index">Index</h1>
| <a href="#M"><strong>M</strong></a>
| <a href="#N"><strong>N</strong></a>
| <a href="#R"><strong>R</strong></a>
| <a href="#S"><strong>S</strong></a>

</div>
<h2 id="C">C</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid">CGrid (class in jaxparrow.grid)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid">(class in jaxparrow.grid.cgrid)</a>
</li>
</ul></li>
<li><a href="jaxparrow.tools.html#jaxparrow.tools.compute_coriolis_factor">compute_coriolis_factor() (in module jaxparrow.tools)</a>

<ul>
<li><a href="jaxparrow.tools.tools.html#jaxparrow.tools.tools.compute_coriolis_factor">(in module jaxparrow.tools.tools)</a>
</li>
</ul></li>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid.compute_cyclogeostrophy">compute_cyclogeostrophy() (jaxparrow.grid.CGrid method)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid.compute_cyclogeostrophy">(jaxparrow.grid.cgrid.CGrid method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid.compute_geostrophy">compute_geostrophy() (jaxparrow.grid.CGrid method)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid.compute_geostrophy">(jaxparrow.grid.cgrid.CGrid method)</a>
</li>
</ul></li>
<li><a href="jaxparrow.tools.html#jaxparrow.tools.compute_spatial_step">compute_spatial_step() (in module jaxparrow.tools)</a>
Expand All @@ -77,6 +56,8 @@ <h2 id="C">C</h2>
<li><a href="jaxparrow.tools.tools.html#jaxparrow.tools.tools.compute_spatial_step">(in module jaxparrow.tools.tools)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="jaxparrow.html#jaxparrow.cyclogeostrophy">cyclogeostrophy() (in module jaxparrow)</a>

<ul>
Expand All @@ -93,50 +74,6 @@ <h2 id="G">G</h2>

<ul>
<li><a href="jaxparrow.geostrophy.html#jaxparrow.geostrophy.geostrophy">(in module jaxparrow.geostrophy)</a>
</li>
</ul></li>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid.get_ssh">get_ssh() (jaxparrow.grid.CGrid method)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid.get_ssh">(jaxparrow.grid.cgrid.CGrid method)</a>
</li>
</ul></li>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid.get_u">get_u() (jaxparrow.grid.CGrid method)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid.get_u">(jaxparrow.grid.cgrid.CGrid method)</a>
</li>
</ul></li>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid.get_u_cyclo">get_u_cyclo() (jaxparrow.grid.CGrid method)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid.get_u_cyclo">(jaxparrow.grid.cgrid.CGrid method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid.get_u_geos">get_u_geos() (jaxparrow.grid.CGrid method)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid.get_u_geos">(jaxparrow.grid.cgrid.CGrid method)</a>
</li>
</ul></li>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid.get_v">get_v() (jaxparrow.grid.CGrid method)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid.get_v">(jaxparrow.grid.cgrid.CGrid method)</a>
</li>
</ul></li>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid.get_v_cyclo">get_v_cyclo() (jaxparrow.grid.CGrid method)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid.get_v_cyclo">(jaxparrow.grid.cgrid.CGrid method)</a>
</li>
</ul></li>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid.get_v_geos">get_v_geos() (jaxparrow.grid.CGrid method)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid.get_v_geos">(jaxparrow.grid.cgrid.CGrid method)</a>
</li>
</ul></li>
</ul></td>
Expand Down Expand Up @@ -164,25 +101,11 @@ <h2 id="J">J</h2>

<ul>
<li><a href="jaxparrow.geostrophy.html#module-jaxparrow.geostrophy">module</a>
</li>
</ul></li>
<li>
jaxparrow.grid

<ul>
<li><a href="jaxparrow.grid.html#module-jaxparrow.grid">module</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li>
jaxparrow.grid.cgrid

<ul>
<li><a href="jaxparrow.grid.cgrid.html#module-jaxparrow.grid.cgrid">module</a>
</li>
</ul></li>
<li>
jaxparrow.tools

<ul>
Expand Down Expand Up @@ -219,10 +142,6 @@ <h2 id="M">M</h2>
<li><a href="jaxparrow.cyclogeostrophy.html#module-jaxparrow.cyclogeostrophy">jaxparrow.cyclogeostrophy</a>
</li>
<li><a href="jaxparrow.geostrophy.html#module-jaxparrow.geostrophy">jaxparrow.geostrophy</a>
</li>
<li><a href="jaxparrow.grid.html#module-jaxparrow.grid">jaxparrow.grid</a>
</li>
<li><a href="jaxparrow.grid.cgrid.html#module-jaxparrow.grid.cgrid">jaxparrow.grid.cgrid</a>
</li>
<li><a href="jaxparrow.tools.html#module-jaxparrow.tools">jaxparrow.tools</a>
</li>
Expand Down Expand Up @@ -258,56 +177,6 @@ <h2 id="R">R</h2>
</ul></td>
</tr></table>

<h2 id="S">S</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid.set_ssh">set_ssh() (jaxparrow.grid.CGrid method)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid.set_ssh">(jaxparrow.grid.cgrid.CGrid method)</a>
</li>
</ul></li>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid.set_u">set_u() (jaxparrow.grid.CGrid method)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid.set_u">(jaxparrow.grid.cgrid.CGrid method)</a>
</li>
</ul></li>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid.set_u_cyclo">set_u_cyclo() (jaxparrow.grid.CGrid method)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid.set_u_cyclo">(jaxparrow.grid.cgrid.CGrid method)</a>
</li>
</ul></li>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid.set_u_geos">set_u_geos() (jaxparrow.grid.CGrid method)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid.set_u_geos">(jaxparrow.grid.cgrid.CGrid method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid.set_v">set_v() (jaxparrow.grid.CGrid method)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid.set_v">(jaxparrow.grid.cgrid.CGrid method)</a>
</li>
</ul></li>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid.set_v_cyclo">set_v_cyclo() (jaxparrow.grid.CGrid method)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid.set_v_cyclo">(jaxparrow.grid.cgrid.CGrid method)</a>
</li>
</ul></li>
<li><a href="jaxparrow.grid.html#jaxparrow.grid.CGrid.set_v_geos">set_v_geos() (jaxparrow.grid.CGrid method)</a>

<ul>
<li><a href="jaxparrow.grid.cgrid.html#jaxparrow.grid.cgrid.CGrid.set_v_geos">(jaxparrow.grid.cgrid.CGrid method)</a>
</li>
</ul></li>
</ul></td>
</tr></table>



</div>
Expand Down Expand Up @@ -361,7 +230,7 @@ <h3 id="searchlabel">Quick search</h3>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2023, Victor Zaia, Vadim Bertrand.
&copy;2023, Victor Zaia, Vadim Bertrand, Emmanuel Cosme, Julien Le Sommer.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
7 changes: 0 additions & 7 deletions docs/_build/html/_sources/jaxparrow.grid.cgrid.rst.txt

This file was deleted.

18 changes: 0 additions & 18 deletions docs/_build/html/_sources/jaxparrow.grid.rst.txt

This file was deleted.

Loading

0 comments on commit dd55c8f

Please sign in to comment.