Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
  • Loading branch information
santacodes and Saransh-cpp authored Jul 24, 2024
1 parent cebcd8a commit 5afccee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
12 changes: 4 additions & 8 deletions {{cookiecutter.project_name}}/.github/workflows/test_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,14 @@ jobs:
run: uv pip install nox[uv]

- name: Test project units
run: |
nox -s generated-project-tests
run: nox -s generated-project-tests

- name: Test user tests
run: |
nox -s user-tests
run: nox -s user-tests

- name: Run coverage tests
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
run: python -m nox -s coverage
run: nox -s coverage

- name: Upload coverage report
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
Expand All @@ -76,8 +74,6 @@ jobs:
steps:
- name: Check out pybamm-cookiecutter repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -89,4 +85,4 @@ jobs:
run: python -m pip install nox

- name: Check if the documentation can be built
run: python -m nox -s docs
run: nox -s docs
7 changes: 3 additions & 4 deletions {{cookiecutter.project_name}}/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ def run_user_tests(session):
@nox.session(name="coverage")
def run_coverage(session):
"""Run the coverage tests and generate an XML report."""
session.install("setuptools", silent=False)
session.install("coverage", silent=False)
session.install("-e", ".[all,dev,jax]", silent=False)
session.run("pytest", "--cov=src/pybamm_cookiecutter", "--cov-report=xml", "tests/")
session.posargs.append("--cov=src/pybamm_cookiecutter")
session.posargs.append("--cov-report=xml")
run_user_tests(session)

@nox.session(name="dev")
def set_dev(session):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ from __future__ import annotations

version: str
version_tuple: tuple[int, int, int] | tuple[int, int, int, str, str]

version = "0.1.0"

0 comments on commit 5afccee

Please sign in to comment.