Repository navigation
chore/tooling modernization #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nebay-abraha
wants to merge
21
commits into
main
Choose a base branch
from
chore/tooling-modernization
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+6,028
−2,162
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
0358362
build: migrate pyproject to PEP 621 / Poetry 2, require Python 3.10
nebay-abraha 05c9696
chore: add ruff, mypy and pre-commit config
nebay-abraha dbd387f
fix: avoid shared mutable default arguments in inv and eln
nebay-abraha f863a30
fix(inv)!: Sample.wherep() returns a list as documented
nebay-abraha 598073d
fix(inv)!: GridContainerPost sends cType GRID
nebay-abraha 6cfdc59
fix(inv): ListContainer.is_list() missing self
nebay-abraha f581c5b
fix: URL validator error message and bare except
nebay-abraha 8323263
fix(eln): include server error detail when an export job fails
nebay-abraha 8c991e4
style: apply ruff format and ruff check --fix
nebay-abraha bc82e3a
refactor: resolve remaining ruff findings and mypy errors
nebay-abraha 83036f8
ci: add lint job and unit test coverage gate
nebay-abraha 6326a72
ci: PyPI Trusted Publishing release workflow, Dependabot, simpler rel…
nebay-abraha 1213f8e
test(inv): stop asserting DataCite password is echoed back
nebay-abraha 45e1535
build: refresh poetry.lock for fsspec and universal-pathlib from main
nebay-abraha 32a8f3c
test(inv): skip DataCite tests when the server has real DataCite sett…
nebay-abraha ad8ce4f
test(eln): cover FAILED export-job errors; bump conda env to 3.12
nebay-abraha 3588123
docs: tighten changelog, developing guide and pyproject comments
nebay-abraha 2d54618
build: restore Python version classifiers
nebay-abraha 3173991
test(inv): cover filter leaking into later list/stream calls
nebay-abraha d51a87f
fix: address review comments on PR #69
nebay-abraha 0730ab5
test(inv): tighten DataCite test guard against real settings
nebay-abraha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,25 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "pip" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| groups: | ||
| python-dependencies: | ||
| patterns: | ||
| - "*" | ||
| # ruff and mypy get their own PRs: a new ruff can change formatter | ||
| # output, which needs a reformat that shouldn't hide in a grouped bump. | ||
| # .pre-commit-config.yaml runs these same pinned versions via Poetry. | ||
| exclude-patterns: | ||
| - "ruff" | ||
| - "mypy" | ||
|
|
||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| groups: | ||
| github-actions: | ||
| patterns: | ||
| - "*" | ||
This file contains hidden or 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 hidden or 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 hidden or 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,93 @@ | ||
| name: Release to PyPI | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
|
nebay-abraha marked this conversation as resolved.
Resolved
|
||
| - "v*" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build and verify | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 # full history, to check the tag is on main | ||
|
|
||
| - name: Check the tagged commit is on main | ||
| run: | | ||
| set -euo pipefail | ||
| git fetch --no-tags origin main | ||
| if ! git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then | ||
| echo "Tag $GITHUB_REF_NAME points at $GITHUB_SHA, which is not on main" | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.12" | ||
|
|
||
| - name: Install Poetry | ||
| uses: snok/install-poetry@v1 | ||
| with: | ||
| version: 2.4.1 | ||
| virtualenvs-create: true | ||
| virtualenvs-in-project: true | ||
|
|
||
| - name: Install dependencies | ||
| run: poetry install --no-interaction | ||
|
|
||
| - name: Ruff check | ||
| run: poetry run ruff check rspace_client examples | ||
|
|
||
| - name: Ruff format check | ||
| run: poetry run ruff format --check rspace_client examples | ||
|
|
||
| - name: mypy | ||
| run: poetry run mypy rspace_client | ||
|
|
||
| - name: Run unit tests | ||
| run: poetry run pytest -m "not integration" | ||
|
|
||
| - name: Check tag matches package version | ||
| run: | | ||
| set -euo pipefail | ||
| tag_version="${GITHUB_REF_NAME#v}" | ||
| pkg_version="$(poetry version --short)" | ||
| if [ "$tag_version" != "$pkg_version" ]; then | ||
| echo "Tag v$tag_version does not match pyproject.toml version $pkg_version" | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Build sdist and wheel | ||
| run: poetry build | ||
|
|
||
| - name: Upload build artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: dist | ||
| path: dist/ | ||
|
|
||
| publish: | ||
| name: Publish to PyPI | ||
| needs: build | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 10 | ||
| environment: pypi | ||
| permissions: | ||
| id-token: write # required for PyPI Trusted Publishing (OIDC) | ||
| steps: | ||
| - name: Download build artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: dist | ||
| path: dist/ | ||
|
|
||
| - name: Publish to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
This file contains hidden or 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,24 @@ | ||
| # The hooks run the ruff and mypy pinned in pyproject.toml (via Poetry), so the | ||
| # versions here, in CI and in Dependabot's updates are always the same. | ||
| repos: | ||
| - repo: local | ||
| hooks: | ||
| - id: ruff | ||
| name: ruff check | ||
| entry: poetry run ruff check --fix --force-exclude | ||
| language: system | ||
| types: [python] | ||
| files: ^(rspace_client|examples)/ | ||
| - id: ruff-format | ||
| name: ruff format | ||
| entry: poetry run ruff format --force-exclude | ||
| language: system | ||
| types: [python] | ||
| files: ^(rspace_client|examples)/ | ||
| - id: mypy | ||
| name: mypy | ||
| entry: poetry run mypy rspace_client | ||
| language: system | ||
| # also run when only the mypy settings in pyproject.toml change | ||
| files: ^(rspace_client/.*\.py|pyproject\.toml)$ | ||
| pass_filenames: false |
This file contains hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.