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
96 changes: 19 additions & 77 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,108 +13,50 @@ jobs:
name: checks
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.13"
- name: "install"
run: pip install .[dev]
run: pip install ".[dev]"
- name: "mypy"
run: make test_mypy
- name: "flake8"
run: make test_flake8

run_tests:
name: ${{ matrix.os }} with Python ${{ matrix.python-version }}
name: ${{ matrix.os }} ${{ matrix.environment }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python-version: ["3.7", "3.10"]
environment: ["py310-min-deps", "py313-latest-deps"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.8.8
with:
python-version: ${{ matrix.python-version }}
name: "setup python"
- name: "install"
run: pip install .[dev]
- name: "run tests"
run: make test_coverage
- uses: codecov/codecov-action@v2
if: success()
name: "upload coverage to CodeCov"

run_tests_ubuntu_old_dependencies:
name: "Ubuntu with Python 3.7 min dependencies"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.7"
name: "setup python"
- name: "install tox"
run: pip install tox
- name: "run tests"
run: tox -e py37-old

run_tests_with_nimare_installed:
name: "Ubuntu with Python 3.8 and NiMARE"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
name: "setup python"
- name: "install tox"
run: pip install tox
pixi-version: v0.41.3
environments: ${{ matrix.environment }}
frozen: true
- name: "run tests"
run: tox -e py38-nimare

run_test_plugin:
name: "Test plugin"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
name: "setup python"
- name: "install tox"
run: pip install tox
- name: "run tests"
run: make test_plugin

run_compare_query_vs_pmcid_list:
name: "Compare query vs PMCID list"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
name: "setup python"
- name: "install"
run: pip install .[dev]
- name: "run check"
run: make compare_query_vs_pmcid_list
run: pixi run -e ${{ matrix.environment }} test
- name: "upload coverage to CodeCov"
uses: codecov/codecov-action@v5.4.3

build_doc:
name: "build documentation"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.13"
- name: "install"
run: pip install .[dev]
run: pip install ".[dev]"
- name: "build"
run: make doc
- name: "store doc artifact"
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: documentation
path: doc_build/pubget.html
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pubget_version := $(shell cat src/pubget/_data/VERSION)
test_all: test_mypy test_flake8 test_coverage_strict test test_plugin test_pylint

test:
tox
pytest tests

test_coverage_strict:
pytest --cov=pubget --cov-report=xml --cov-report=term --cov-fail-under=100 tests
Expand All @@ -28,8 +28,7 @@ test_pylint:
pylint ./src

test_plugin:
tox -e run_plugin
tox -c docs/example_plugin/tox.ini
pixi run run_plugin

run_full_pipeline:
python tests/run_full_pipeline.py -o /tmp/
Expand Down Expand Up @@ -58,4 +57,4 @@ clean:
rm -rf doc_build build dist htmlcov .coverage .coverage.*

clean_all: clean
rm -rf .mypy_cache .pytest_cache .tox
rm -rf .mypy_cache .pytest_cache
22 changes: 20 additions & 2 deletions docs/example_plugin/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "pubget_example_plugin"
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
"pandas",
"matplotlib",
"pubget",
]

[project.optional-dependencies]
dev = [
"pytest",
]

[project.entry-points."pubget.plugin_actions"]
get_pubget_actions = "pubget_example_plugin:get_pubget_actions"
9 changes: 0 additions & 9 deletions docs/example_plugin/tox.ini

This file was deleted.

Loading
Loading