Skip to content

Commit

Permalink
drop kinfitr tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bilgelm committed Sep 12, 2024
1 parent a507eb1 commit d17a319
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 41 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- { python: "3.11", os: "ubuntu-latest", session: "mypy" }
- { python: "3.11", os: "ubuntu-latest", session: "tests" }
- { python: "3.11", os: "ubuntu-latest", session: "xdoctest" }
- { python: "3.12", os: "ubuntu-latest", session: "docs-build" }
- { python: "3.12", os: "windows-latest", session: "pre-commit" }
- { python: "3.12", os: "windows-latest", session: "safety" }
- { python: "3.12", os: "windows-latest", session: "mypy" }
Expand All @@ -45,21 +46,6 @@ jobs:
- name: Check out the repository
uses: actions/checkout@v4

- name: Set up R if on MacOS
if: matrix.os == 'macos-latest'
uses: r-lib/actions/setup-r@v2

- name: Install remotes R package if on MacOS
if: matrix.os == 'macos-latest'
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: remotes

- name: Install kinfitr if on MacOS
if: matrix.os == 'macos-latest'
run: |
Rscript -e "remotes::install_url('https://github.com/mathesong/kinfitr/archive/refs/tags/v0.8.0.tar.gz')"
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -127,14 +113,14 @@ jobs:
include-hidden-files: true

- name: Upload documentation
if: matrix.session == 'docs-build' && matrix.os == 'macos-latest'
if: matrix.session == 'docs-build'
uses: actions/upload-artifact@v3
with:
name: docs
path: docs/_build

coverage:
runs-on: macos-latest
runs-on: ubuntu-latest
needs: tests
steps:
- name: Check out the repository
Expand Down
30 changes: 6 additions & 24 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,7 @@ def safety(session: Session) -> None:
def mypy(session: Session) -> None:
"""Type-check using mypy."""
args = session.posargs or ["src", "tests", "docs/conf.py"]
if os.getenv("GITHUB_ACTIONS") and os.name != "nt":
session.install(".[kinfitr]")
else:
session.install(".")
session.install(".")
session.install("mypy", "pytest", "pytest-mock", "requests", "types-requests")
session.run("mypy", *args)
if not session.posargs:
Expand All @@ -170,10 +167,7 @@ def mypy(session: Session) -> None:
@session(python=python_versions)
def tests(session: Session) -> None:
"""Run the test suite."""
if os.getenv("GITHUB_ACTIONS") and os.name != "nt":
session.install(".[kinfitr]")
else:
session.install(".")
session.install(".")
session.install("coverage[toml]", "pytest", "pytest-mock", "pygments", "requests")
try:
session.run("coverage", "run", "-p", "-m", "pytest", *session.posargs)
Expand All @@ -198,10 +192,7 @@ def coverage(session: Session) -> None:
@session(python=python_versions[0])
def typeguard(session: Session) -> None:
"""Runtime type checking using Typeguard."""
if os.getenv("GITHUB_ACTIONS") and os.name != "nt":
session.install(".[kinfitr]")
else:
session.install(".")
session.install(".")
session.install("pytest", "pytest-mock", "typeguard", "pygments", "requests")
session.run("pytest", f"--typeguard-packages={package}", *session.posargs)

Expand All @@ -216,10 +207,7 @@ def xdoctest(session: Session) -> None:
if "FORCE_COLOR" in os.environ:
args.append("--colored=1")

if os.getenv("GITHUB_ACTIONS") and os.name != "nt":
session.install(".[kinfitr]")
else:
session.install(".")
session.install(".")
session.install("xdoctest[colors]")
session.run("python", "-m", "xdoctest", *args)

Expand All @@ -231,10 +219,7 @@ def docs_build(session: Session) -> None:
if not session.posargs and "FORCE_COLOR" in os.environ:
args.insert(0, "--color")

if os.getenv("GITHUB_ACTIONS") and os.name != "nt":
session.install(".[kinfitr]")
else:
session.install(".")
session.install(".")
session.install("sphinx-click", "furo", "myst_nb", "matplotlib", "nilearn")

build_dir = Path("docs", "_build")
Expand All @@ -252,10 +237,7 @@ def docs_build(session: Session) -> None:
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"]
if os.getenv("GITHUB_ACTIONS") and os.name != "nt":
session.install(".[kinfitr]")
else:
session.install(".")
session.install(".")
session.install(
"sphinx-autobuild", "sphinx-click", "furo", "myst_nb", "matplotlib", "nilearn"
)
Expand Down

0 comments on commit d17a319

Please sign in to comment.