Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into add_download
Browse files Browse the repository at this point in the history
  • Loading branch information
yfukai committed Feb 4, 2024
2 parents 4b9e46c + e2a0446 commit cb1bb25
Show file tree
Hide file tree
Showing 10 changed files with 1,194 additions and 980 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pip==23.3.1
pip==23.3.2
nox==2023.4.22
nox-poetry==1.0.3
poetry==1.6.1
virtualenv==20.24.6
poetry==1.7.1
virtualenv==20.25.0
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fetch-depth: 2

- name: Set up Python
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.0.0
with:
python-version: "3.9"

Expand Down Expand Up @@ -57,18 +57,18 @@ jobs:
- name: Publish package on PyPI
if: steps.check-version.outputs.tag
uses: pypa/[email protected].10
uses: pypa/[email protected].11
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

- name: Publish package on TestPyPI
if: "! steps.check-version.outputs.tag"
uses: pypa/[email protected].10
uses: pypa/[email protected].11
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/[email protected]
Expand Down
35 changes: 19 additions & 16 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 @@ -38,7 +41,7 @@ jobs:
run: sudo apt-get install pandoc

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.0.0
with:
python-version: ${{ matrix.python-version }}

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 All @@ -75,7 +78,7 @@ jobs:
os.environ["GITHUB_OUTPUT"] = "result={}".format(result)
- name: Restore pre-commit cache
uses: actions/cache@v3.3.2
uses: actions/cache@v4.0.0
if: matrix.session == 'pre-commit'
with:
path: ~/.cache/pre-commit
Expand All @@ -88,15 +91,15 @@ 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
if: matrix.session == 'docs-build'
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.3.0
with:
name: docs
path: docs/_build
Expand All @@ -109,7 +112,7 @@ jobs:
uses: actions/[email protected]

- name: Set up Python 3.9
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.0.0
with:
python-version: 3.9

Expand All @@ -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 @@ -129,9 +132,9 @@ jobs:
nox --version
- name: Download coverage data
uses: actions/download-artifact@v3.0.2
uses: actions/download-artifact@v4.1.1
with:
name: coverage-data
name: coverage-data.3.11.ubuntu-latest

- name: Combine coverage data and display human readable report
run: |
Expand All @@ -142,4 +145,4 @@ jobs:
nox --force-color --session=coverage -- xml
- name: Upload coverage report
uses: codecov/codecov-action@v3.1.4
uses: codecov/codecov-action@v4.0.1
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,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

0 comments on commit cb1bb25

Please sign in to comment.