diff --git a/.github/workflows/docbuild.yml b/.github/workflows/docbuild.yml index 43a0825..bc8c533 100644 --- a/.github/workflows/docbuild.yml +++ b/.github/workflows/docbuild.yml @@ -85,7 +85,7 @@ jobs: - name: Update switcher.json with new version id: switcher run: | - python tools/update_switcher.py gh-pages-out/switcher.json \ + python trx/tools/update_switcher.py gh-pages-out/switcher.json \ --version "${{ steps.get_version.outputs.VERSION }}" \ --github-output "$GITHUB_OUTPUT" - name: Deploy all release docs in a single push @@ -160,7 +160,7 @@ jobs: esac done echo "Rebuilding switcher from:$args" - python tools/update_switcher.py gh-pages-out/switcher.json --rebuild $args + python trx/tools/update_switcher.py gh-pages-out/switcher.json --rebuild $args - name: Commit and push switcher.json run: | cd gh-pages-out diff --git a/docs/source/conf.py b/docs/source/conf.py index 7589615..417dc36 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -137,7 +137,7 @@ autoapi_type = 'python' autoapi_dirs = ['../../trx'] -autoapi_ignore = ['*test*', '*version*'] +autoapi_ignore = ['*test*', '*version*', '*tools*'] def _validate_reference_urls(urls, timeout=5): diff --git a/pyproject.toml b/pyproject.toml index fcf5e50..df1b89f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ dependencies = [ [project.optional-dependencies] utils = [ - "dipy", + "dipy >= 1.12", "fury >= 0.10.0, < 2.0.0" ] dev = [ @@ -92,6 +92,10 @@ trx_info = "trx.cli:info_cmd" packages = ["trx"] include-package-data = true +[tool.setuptools.package-data] +trx = ["tools/*.py"] + + [tool.setuptools_scm] write_to = "trx/_version.py" fallback_version = "0.0" diff --git a/trx/tests/test_update_switcher.py b/trx/tests/test_update_switcher.py index f45378d..972694e 100644 --- a/trx/tests/test_update_switcher.py +++ b/trx/tests/test_update_switcher.py @@ -8,7 +8,7 @@ import pytest -TOOLS_DIR = Path(__file__).resolve().parents[2] / "tools" +TOOLS_DIR = Path(__file__).resolve().parent.parent / "tools" SCRIPT = TOOLS_DIR / "update_switcher.py" diff --git a/tools/update_switcher.py b/trx/tools/update_switcher.py similarity index 100% rename from tools/update_switcher.py rename to trx/tools/update_switcher.py