-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from ocefpaf/modernize_package
Modernize package
- Loading branch information
Showing
37 changed files
with
328 additions
and
358 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,11 @@ | ||
# See https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot | ||
|
||
version: 2 | ||
updates: | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
labels: | ||
- "Bot" |
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,51 @@ | ||
|
||
name: Documentation | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [master, main] | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-name: TEST | ||
init-shell: bash | ||
create-args: >- | ||
python=3 pip | ||
--file requirements.txt | ||
--file requirements-dev.txt | ||
--channel conda-forge | ||
- name: Install utide | ||
shell: bash -l {0} | ||
run: | | ||
pip install -e . --no-deps --force-reinstall | ||
- name: Build documentation | ||
shell: bash -l {0} | ||
run: | | ||
set -e | ||
pushd docs | ||
make clean html linkcheck | ||
popd | ||
- name: Deploy | ||
if: success() && github.event_name == 'release' | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/build/html |
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 |
---|---|---|
|
@@ -8,17 +8,7 @@ on: | |
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
env: | ||
FORCE_COLOR: "1" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- id: file_changes | ||
uses: trilom/[email protected] | ||
with: | ||
output: ' ' | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --files ${{ steps.file_changes.outputs.files}} | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- uses: pre-commit/[email protected] |
28 changes: 17 additions & 11 deletions
28
.github/workflows/publish.yml → .github/workflows/pypi.yml
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 |
---|---|---|
@@ -1,47 +1,53 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [master, main] | ||
release: | ||
types: | ||
- published | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
packages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Get tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
shell: bash | ||
|
||
- name: Install build tools | ||
run: | | ||
python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine pytest numpy scipy | ||
shell: bash | ||
python -m pip install --upgrade pip build | ||
- name: Build binary wheel | ||
- name: Build sdist and binary wheel | ||
run: python -m build --sdist --wheel . --outdir dist | ||
|
||
- name: CheckFiles | ||
run: | | ||
ls dist | ||
shell: bash | ||
python -m pip install --upgrade check-manifest | ||
check-manifest --verbose | ||
- name: Test wheels | ||
run: | | ||
cd dist && python -m pip install UTide*.whl | ||
cd dist && python -m pip install *.whl | ||
python -m pip install --upgrade twine | ||
python -m twine check * | ||
shell: bash | ||
- name: Publish a Python distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
if: success() && github.event_name == 'release' | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_PASSWORD }} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,3 +73,4 @@ doc/_build/ | |
.project | ||
.pydevproject | ||
.vscode/ | ||
utide/_version.py |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.