From 68f93e244b8d6db6d4bb6bb3177beb080ac16067 Mon Sep 17 00:00:00 2001 From: Ariel Rokem Date: Tue, 27 Jan 2026 20:44:14 -0800 Subject: [PATCH 1/4] Import version string into top-level namespace. --- trx/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/trx/__init__.py b/trx/__init__.py index e69de29..7df9f7a 100644 --- a/trx/__init__.py +++ b/trx/__init__.py @@ -0,0 +1 @@ +from ._version import __version__ \ No newline at end of file From e3cddfe4b81ddaa10cc24df7162ee75dc4c4be06 Mon Sep 17 00:00:00 2001 From: Ariel Rokem Date: Tue, 27 Jan 2026 20:46:17 -0800 Subject: [PATCH 2/4] Lint the __init__ file --- trx/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trx/__init__.py b/trx/__init__.py index 7df9f7a..3a8d6d5 100644 --- a/trx/__init__.py +++ b/trx/__init__.py @@ -1 +1 @@ -from ._version import __version__ \ No newline at end of file +from ._version import __version__ # noqa: F401 From c309dd97672cb5d1f468ed843a3fb6c1716c5df0 Mon Sep 17 00:00:00 2001 From: Ariel Rokem Date: Tue, 27 Jan 2026 20:51:28 -0800 Subject: [PATCH 3/4] Explicitly ignore the _version module. --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index a05264e..4590e54 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -129,7 +129,7 @@ autoapi_type = 'python' autoapi_dirs = ['../../trx'] -autoapi_ignore = ['*test*', '*version*'] +autoapi_ignore = ['*test*', '*version*', "trx._version"] # Sphinx gallery configuration sphinx_gallery_conf = { From e3c50e1948d4c4fe74c2af4818ebf42eb0c6b5a3 Mon Sep 17 00:00:00 2001 From: Ariel Rokem Date: Tue, 27 Jan 2026 20:58:22 -0800 Subject: [PATCH 4/4] Back off shortened version string. --- .github/workflows/publish-to-test-pypi.yml | 2 +- docs/source/conf.py | 2 +- trx/__init__.py | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index bc03a51..5c7144f 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -41,7 +41,7 @@ jobs: run: python -c "import sys; print(sys.version)" - name: Install sdist without optional dependencies run: pip install dist/*.tar.gz - - run: python -c 'import trx; print(trx.__version__)' + - run: python -c 'import trx; print(trx._version.__version__)' - name: Install pytest run: pip install pytest - name: Run tests diff --git a/docs/source/conf.py b/docs/source/conf.py index 4590e54..a05264e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -129,7 +129,7 @@ autoapi_type = 'python' autoapi_dirs = ['../../trx'] -autoapi_ignore = ['*test*', '*version*', "trx._version"] +autoapi_ignore = ['*test*', '*version*'] # Sphinx gallery configuration sphinx_gallery_conf = { diff --git a/trx/__init__.py b/trx/__init__.py index 3a8d6d5..e69de29 100644 --- a/trx/__init__.py +++ b/trx/__init__.py @@ -1 +0,0 @@ -from ._version import __version__ # noqa: F401