-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* cicd * try to speed up tests * cancel previous runs on push * lower tol for windows * change name for pypi * metadata update * readme updates
- Loading branch information
Showing
10 changed files
with
108 additions
and
19 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,46 @@ | ||
name: deploy | ||
|
||
on: | ||
workflow_run: | ||
branches: | ||
- master | ||
workflows: | ||
- "tests" | ||
- "mypy" | ||
- "ruff" | ||
types: | ||
- completed | ||
|
||
jobs: | ||
deploy: | ||
name: deploy-to-pypi | ||
runs-on: ubuntu-latest | ||
# only run if previous workflows were a success | ||
# AND the commit starts with v (meaning it's a tag) | ||
if: ${{ github.event.workflow_run.conclusion == 'success' && startsWith(github.event.workflow_run.head_commit.message, 'v') }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: install | ||
run: | | ||
git tag | ||
pip install -U pip | ||
pip install -U build twine | ||
python -m build | ||
twine check dist/* | ||
ls -lh dist | ||
- name: build and publish | ||
run: twine upload dist/* | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }} | ||
|
||
- uses: softprops/action-gh-release@v2 | ||
with: | ||
generate_release_notes: 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: ruff | ||
|
||
on: [push] | ||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
|
@@ -10,6 +10,11 @@ jobs: | |
python-version: ["3.11"] | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
|
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,6 +1,6 @@ | ||
name: mypy | ||
|
||
on: [push] | ||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
|
@@ -10,6 +10,11 @@ jobs: | |
python-version: ["3.11"] | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
|
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,15 +1,30 @@ | ||
name: tests | ||
|
||
on: [push] | ||
on: | ||
pull_request: | ||
schedule: | ||
- cron: "0 12 * * 1" # monday at noon GMT | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: ${{ matrix.platform }} | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.11"] | ||
python-version: | ||
- '3.11' | ||
platform: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
|
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 |
---|---|---|
|
@@ -3,14 +3,19 @@ requires = ["setuptools >= 61.0", "setuptools-scm"] | |
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "meteor" | ||
name = "meteor-maps" | ||
description = "denoise crystallographic difference maps" | ||
dynamic = ["version"] | ||
authors = [ | ||
{ name = "Alisia Fadini", email = "[email protected]" }, | ||
{ name = "Thomas Lane", email = "thomas.lane@desy.de" } | ||
{ name = "Thomas Lane", email = "thomas.joseph.lane@gmail.com" } | ||
] | ||
requires-python = ">=3.11" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
] | ||
dependencies = [ | ||
"numpy >= 1.26", | ||
"scipy >= 1.14.0", | ||
|
@@ -24,15 +29,23 @@ dependencies = [ | |
tests = [ | ||
"pytest", | ||
"pytest-cov", | ||
"pytest-xdist", | ||
] | ||
|
||
[project.scripts] | ||
"meteor.diffmap" = "meteor.scripts.compute_difference_map:main" | ||
"meteor.phaseboost" = "meteor.scripts.compute_iterative_tv_map:main" | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/rs-station/meteor" | ||
Issues = "https://github.com/rs-station/meteor/issues" | ||
|
||
[tool.setuptools_scm] | ||
version_file = "meteor/_version.py" | ||
|
||
[tool.pytest.ini_options] | ||
addopts = "-n 4 --cov=meteor --cov-report=xml" | ||
|
||
[tool.mypy] | ||
disallow_untyped_calls = true | ||
disallow_untyped_defs = true | ||
|
@@ -101,6 +114,3 @@ exclude = [ | |
|
||
[tool.ruff.lint.pydocstyle] | ||
convention = "numpy" | ||
|
||
[tool.pytest.ini_options] | ||
addopts = "--cov=meteor --cov-report=xml" |
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
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