Skip to content
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

Updated coverage upload #394

Merged
merged 13 commits into from
Feb 4, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/

- name: Publish the release notes
uses: release-drafter/release-drafter@v5.25.0
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,21 @@ jobs:
include:
- { python-version: 3.9, os: ubuntu-latest, session: "pre-commit" }
- { python-version: 3.9, os: ubuntu-latest, session: "safety" }
- { python-version: "3.12", os: ubuntu-latest, session: "mypy" }
- { python-version: "3.11", os: ubuntu-latest, session: "mypy" }
- { python-version: "3.10", os: ubuntu-latest, session: "mypy" }
- { python-version: 3.9, os: ubuntu-latest, session: "mypy" }
- { python-version: 3.8, os: ubuntu-latest, session: "mypy" }
- { python-version: "3.12", os: ubuntu-latest, session: "tests" }
- { python-version: "3.11", os: ubuntu-latest, session: "tests" }
- { python-version: "3.10", os: ubuntu-latest, session: "tests" }
- { python-version: 3.9, os: ubuntu-latest, session: "tests" }
- { python-version: 3.8, os: ubuntu-latest, session: "tests" }
- { python-version: "3.10", os: windows-latest, session: "tests" }
- { python-version: "3.10", os: macos-latest, session: "tests" }
- { python-version: 3.9, os: ubuntu-latest, session: "typeguard" }
- { python-version: "3.10", os: ubuntu-latest, session: "docs-build" }
- { python-version: "3.12", os: windows-latest, session: "tests" }
- { python-version: "3.12", os: macos-latest, session: "tests" }
# since ray is still not available wiht 3.12
- { python-version: "3.11", os: ubuntu-latest, session: "typeguard" }
- { python-version: "3.12", os: ubuntu-latest, session: "docs-build" }

env:
NOXSESSION: ${{ matrix.session }}
Expand All @@ -49,7 +52,7 @@ jobs:

- name: Install Poetry
run: |
pip install --constraint=.github/workflows/constraints.txt poetry
pip install --constraint=.github/workflows/constraints.txt poetry poetry-plugin-export
poetry --version

- name: Install Nox
Expand Down Expand Up @@ -88,10 +91,10 @@ jobs:
nox --force-color --python=${{ matrix.python-version }}

- name: Upload coverage data
if: always() && matrix.session == 'tests'
uses: "actions/upload-artifact@v3.1.3"
if: matrix.session == 'tests'
uses: "actions/upload-artifact@v4.3.0"
with:
name: coverage-data
name: coverage-data.${{ matrix.python-version }}.${{ matrix.os }}
path: ".coverage.*"

- name: Upload documentation
Expand Down Expand Up @@ -120,7 +123,7 @@ jobs:

- name: Install Poetry
run: |
pip install --constraint=.github/workflows/constraints.txt poetry
pip install --constraint=.github/workflows/constraints.txt poetry poetry-plugin-export
poetry --version

- name: Install Nox
Expand All @@ -131,7 +134,7 @@ jobs:
- name: Download coverage data
uses: actions/download-artifact@v4.1.0
with:
name: coverage-data
name: coverage-data.3.11.ubuntu-latest

- name: Combine coverage data and display human readable report
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Requirements
------------

Python >= 3.8 is supported.
The software is tested against Python 3.8-3.11 in Ubuntu, and 3.10 in MacOS and Windows environments,
The software is tested against Python 3.8-3.12 in Ubuntu, and 3.12 in MacOS and Windows environments,
but the other combinations should also be fine. Please `file an issue`_ if you encounter any problem.

Installation
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/bright_spots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.1.0"
},
"vscode": {
"interpreter": {
Expand Down
13 changes: 9 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


package = "laptrack"
python_versions = ["3.11", "3.10", "3.9", "3.8"]
python_versions = ["3.12", "3.11", "3.10", "3.9", "3.8"]
safety_ignore = [44717, 44715, 44716, 51457] # ignore numpy 1.21 CVEs and py 1.11.0
nox.needs_version = ">= 2021.6.6"
nox.options.sessions = (
Expand Down Expand Up @@ -84,7 +84,12 @@ def mypy(session: Session) -> None:
def tests(session: Session) -> None:
"""Run the test suite."""
session.install(".")
session.install("coverage[toml]", "pytest", "pytest-datadir", "pygments", "ray")
session.install("coverage[toml]", "pytest", "pytest-datadir", "pygments")
try:
session.install("ray")
except nox.command.CommandFailed:
session.warn("Ray not installed, skipping ray tests")

try:
session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs)
finally:
Expand Down Expand Up @@ -113,7 +118,7 @@ def typeguard(session: Session) -> None:
session.run("pytest", f"--typeguard-packages={package}", *session.posargs)


@session(name="docs-build", python="3.10")
@session(name="docs-build", python=python_versions[0])
def docs_build(session: Session) -> None:
"""Build the documentation."""
args = session.posargs or ["docs", "docs/_build"]
Expand All @@ -126,7 +131,7 @@ def docs_build(session: Session) -> None:
session.run("sphinx-build", *args)


@session(python="3.10")
@session(python=python_versions[0])
def docs(session: Session) -> None:
"""Build and serve the documentation with live reloading on file changes."""
args = session.posargs or ["--open-browser", "docs", "docs/_build"]
Expand Down
Loading
Loading