Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/_build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
TAG=${GITHUB_REF#refs/*/}
sed -i -e "s/0.0.0/${TAG#v}/" pyproject.toml
echo "Version detected as ${TAG#v}"
fi

- name: Build package
Expand Down Expand Up @@ -74,7 +75,7 @@ jobs:
path: |
dist/prolif-*.whl
dist/prolif-*.tar.gz
key: prolif-${{ runner.os }}-${{ github.sha }}
key: prolif-${{ runner.os }}-${{ github.sha }}-${{ github.ref_type }}

- name: Expose package as artifact
if: inputs.upload-package
Expand Down Expand Up @@ -114,7 +115,7 @@ jobs:
path: |
dist/prolif-*.whl
dist/prolif-*.tar.gz
key: prolif-${{ runner.os }}-${{ github.sha }}
key: prolif-${{ runner.os }}-${{ github.sha }}-${{ github.ref_type }}

- name: Install from tar.gz
run: |
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,22 @@ jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: [build]
steps:

- name: Retrieve cached package
uses: actions/cache/restore@v3
id: cache-prolif
with:
path: |
dist/prolif-*.whl
dist/prolif-*.tar.gz
key: prolif-${{ runner.os }}-${{ github.sha }}
key: prolif-${{ runner.os }}-${{ github.sha }}-${{ github.ref_type }}
fail-on-cache-miss: true

- name: List output
run: |
ls -lah dist/*

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/formatting_linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Code formatting
uses: astral-sh/ruff-action@v2
with:
version: 0.9.10
version: 0.11.2
args: "format --diff"

- name: Notebook formatting
Expand All @@ -30,5 +30,5 @@ jobs:
- name: Code linting
uses: astral-sh/ruff-action@v2
with:
version: 0.9.10
version: 0.11.2
args: "check --preview --diff"
2 changes: 1 addition & 1 deletion prolif/_version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import importlib.metadata

try:
__version__ = importlib.metadata.version(__name__)
__version__ = importlib.metadata.version("prolif")
except importlib.metadata.PackageNotFoundError:
__version__ = "0.0.0"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ type-check = [
"types-networkx",
]
dev = [
"ruff==0.11.2",
"ruff==0.11.2", # keep synced with formatting_linting.yml
"black[jupyter]",
"poethepoet>=0.33.0",
{ include-group = "tests" },
Expand Down
Loading