-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'open-atmos:main' into asian-option
- Loading branch information
Showing
5 changed files
with
172 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: pdoc | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
schedule: | ||
- cron: '0 13 * * 4' | ||
|
||
jobs: | ||
pdoc: | ||
strategy: | ||
matrix: | ||
platform: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
persist-credentials: false | ||
- uses: actions/setup-python@v5.2.0 | ||
with: | ||
python-version: 3.9 | ||
- env: | ||
JUPYTER_PLATFORM_DIRS: 1 | ||
run: | | ||
pip3 install pdoc nbformat | ||
pip install -e . -e ./examples | ||
python - <<EOF | ||
import glob, nbformat | ||
for notebook_path in glob.glob('examples/PyMPDATA_examples/*/*.ipynb'): | ||
with open(notebook_path, encoding="utf8") as fin: | ||
with open(notebook_path + ".badges.md", 'w') as fout: | ||
fout.write(nbformat.read(fin, nbformat.NO_CONVERT).cells[0].source) | ||
EOF | ||
PDOC_ALLOW_EXEC=1 python -We -m pdoc -o html PyMPDATA examples/PyMPDATA_examples -t docs/templates --math | ||
- if: ${{ github.ref == 'refs/heads/main' && matrix.platform == 'ubuntu-latest' }} | ||
uses: JamesIves/github-pages-deploy-action@4.1.1 | ||
with: | ||
branch: pdoc | ||
folder: html | ||
clean: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Add new issues and pull requests to project board | ||
|
||
on: | ||
issues: | ||
types: | ||
- opened | ||
pull_request_target: | ||
types: | ||
- opened | ||
|
||
jobs: | ||
add-to-project: | ||
name: Add to project | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/add-to-project@v1.0.2 | ||
with: | ||
project-url: https://github.com/orgs/open-atmos/projects/6 | ||
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: pypi | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
schedule: | ||
- cron: '0 13 * * 4' | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
dist: | ||
strategy: | ||
matrix: | ||
package-dir: [".", "examples"] | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 # https://github.com/pypa/setuptools_scm/issues/480 | ||
- uses: actions/setup-python@v5.2.0 | ||
with: | ||
python-version: "3.10" | ||
|
||
- run: pip install twine build | ||
|
||
- run: | | ||
unset CI | ||
cd ${{ matrix.package-dir }} | ||
python -m build 2>&1 | tee build.log | ||
exit `fgrep -v "warning: no previously-included files matching" buid.log | fgrep -i warning | wc -l` | ||
twine check --strict dist/* | ||
exit `tar tzf dist/*.tar.gz | fgrep ".ipynb" | wc -l` | ||
cd .. | ||
- if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
uses: pypa/gh-action-pypi-publish@release/v1.12 | ||
with: | ||
attestations: false | ||
repository_url: https://test.pypi.org/legacy/ | ||
packages-dir: ${{ matrix.package-dir }}/dist | ||
|
||
- if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@release/v1.12 | ||
with: | ||
attestations: false | ||
packages-dir: ${{ matrix.package-dir }}/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters