From 3ade9f8bd55c28ca6e848f3bfded4c053affa65d Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Mon, 10 Feb 2025 12:46:46 -0700 Subject: [PATCH 01/31] attempt to fix a linting issue --- src/rubinrag/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rubinrag/__init__.py b/src/rubinrag/__init__.py index 5526e9e6..ecf9400d 100644 --- a/src/rubinrag/__init__.py +++ b/src/rubinrag/__init__.py @@ -1,4 +1,4 @@ -"""Rubin RAG-basd LLM Application""" +"""Rubin RAG-basd LLM Application.""" __all__ = ["__version__"] From 2590b752fb9b3c926f28500fb306ce5815538d99 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Mon, 10 Feb 2025 12:53:10 -0700 Subject: [PATCH 02/31] attempt to remove trailing whitespace --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4614932b..8dcdec0d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -97,7 +97,7 @@ jobs: github.event_name != 'merge_group' && (github.event_name != 'pull_request' || startsWith(github.head_ref, 'tickets/')) - + test-packaging: name: Test packaging From 0bcb247f6ae918160f059e10854e386d93e2f722 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Mon, 10 Feb 2025 12:58:08 -0700 Subject: [PATCH 03/31] try to pass version test --- src/rubinrag/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rubinrag/__init__.py b/src/rubinrag/__init__.py index ecf9400d..7cc68c20 100644 --- a/src/rubinrag/__init__.py +++ b/src/rubinrag/__init__.py @@ -13,4 +13,4 @@ __version__ = version(__name__) except PackageNotFoundError: # package is not installed - __version__ = "0.0.0" + __version__ = "0.0.1" From 16486c11b006eeb6d76908283968945c2d13ae14 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Mon, 10 Feb 2025 14:40:32 -0700 Subject: [PATCH 04/31] attempt to remove docs upload step --- .github/workflows/ci.yaml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8dcdec0d..e38852fe 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -82,22 +82,6 @@ jobs: # tox-envs: "docs,docs-linkcheck" tox-plugins: tox-uv - # Only attempt documentation uploads for tagged releases and pull - # requests from ticket branches in the same repository. This avoids - # version clutter in the docs and failures when a PR doesn't have access - # to secrets. - - name: Upload to LSST the Docs - uses: lsst-sqre/ltd-upload@v1 - with: - project: "rubin_rag" - dir: "docs/_build/html" - username: ${{ secrets.LTD_USERNAME }} - password: ${{ secrets.LTD_PASSWORD }} - if: > - github.event_name != 'merge_group' - && (github.event_name != 'pull_request' - || startsWith(github.head_ref, 'tickets/')) - test-packaging: name: Test packaging From 126bafbfa58ba9abffdc5e770e370971d34a1fa6 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Mon, 10 Feb 2025 21:56:13 +0000 Subject: [PATCH 05/31] change directory structure --- src/{ => rubin}/rubinrag/py.typed | 0 src/rubinrag/__init__.py | 16 ---------------- 2 files changed, 16 deletions(-) rename src/{ => rubin}/rubinrag/py.typed (100%) delete mode 100644 src/rubinrag/__init__.py diff --git a/src/rubinrag/py.typed b/src/rubin/rubinrag/py.typed similarity index 100% rename from src/rubinrag/py.typed rename to src/rubin/rubinrag/py.typed diff --git a/src/rubinrag/__init__.py b/src/rubinrag/__init__.py deleted file mode 100644 index 7cc68c20..00000000 --- a/src/rubinrag/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Rubin RAG-basd LLM Application.""" - -__all__ = ["__version__"] - -from importlib.metadata import PackageNotFoundError, version - -__version__: str -"""The version string of rubinrag -(PEP 440 / SemVer compatible). -""" - -try: - __version__ = version(__name__) -except PackageNotFoundError: - # package is not installed - __version__ = "0.0.1" From 81ed713b8b8822795a72d1cbdf5b7cd4f1026d74 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Mon, 10 Feb 2025 22:56:30 +0000 Subject: [PATCH 06/31] continue directory structure reorganization --- src/rubin/__init__.py | 5 +++++ src/rubin/rag/__init__.py | 16 ++++++++++++++++ src/rubin/{rubinrag => rag}/py.typed | 0 3 files changed, 21 insertions(+) create mode 100644 src/rubin/__init__.py create mode 100644 src/rubin/rag/__init__.py rename src/rubin/{rubinrag => rag}/py.typed (100%) diff --git a/src/rubin/__init__.py b/src/rubin/__init__.py new file mode 100644 index 00000000..186da415 --- /dev/null +++ b/src/rubin/__init__.py @@ -0,0 +1,5 @@ +"""pkgutil-style namespace package.""" + +import pkgutil + +__path__ = pkgutil.extend_path(__path__, __name__) diff --git a/src/rubin/rag/__init__.py b/src/rubin/rag/__init__.py new file mode 100644 index 00000000..7cc68c20 --- /dev/null +++ b/src/rubin/rag/__init__.py @@ -0,0 +1,16 @@ +"""Rubin RAG-basd LLM Application.""" + +__all__ = ["__version__"] + +from importlib.metadata import PackageNotFoundError, version + +__version__: str +"""The version string of rubinrag +(PEP 440 / SemVer compatible). +""" + +try: + __version__ = version(__name__) +except PackageNotFoundError: + # package is not installed + __version__ = "0.0.1" diff --git a/src/rubin/rubinrag/py.typed b/src/rubin/rag/py.typed similarity index 100% rename from src/rubin/rubinrag/py.typed rename to src/rubin/rag/py.typed From 15803814ee08c3f05c3d2fbf705732ac7d7e78c4 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Mon, 10 Feb 2025 16:03:00 -0700 Subject: [PATCH 07/31] try to adjust package name --- tests/version_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/version_test.py b/tests/version_test.py index 8caf3b4f..2abb1713 100644 --- a/tests/version_test.py +++ b/tests/version_test.py @@ -2,7 +2,7 @@ from __future__ import annotations -from rubinrag import __version__ +from rubin.rag import __version__ def test_version() -> None: From 607900b345744e7797119bbcecda6ca3fd63d00d Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Mon, 10 Feb 2025 16:09:53 -0700 Subject: [PATCH 08/31] try to fix mypy tests invocation --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 724d5475..a3e15fd7 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,7 @@ commands = [testenv:typing] description = Run mypy. commands = - mypy src/rubinrag tests + mypy src/rubin tests [testenv:lint] description = Lint codebase by running pre-commit (Black, isort, Flake8). From 41ba5977c2f40fa1cc237cd8cf1fa5f1befa51d5 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Mon, 10 Feb 2025 16:18:35 -0700 Subject: [PATCH 09/31] Update pyproject.toml --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 432316c4..4a14bcfb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] # https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html where = ["src"] -include = ["rubinrag*"] +include = ["rubin"] [tool.black] line-length = 79 @@ -62,7 +62,7 @@ target-version = ["py312"] [tool.coverage.run] parallel = true branch = true -source = ["rubinrag"] +source = ["rubin"] [tool.coverage.paths] source = ["src", ".tox/*/site-packages"] From e3a615a370018d0ff2e6674dcc96abd6c01b1b51 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Mon, 10 Feb 2025 16:26:01 -0700 Subject: [PATCH 10/31] eliminate a residual appearance of 'rubinrag' --- src/rubin/rag/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rubin/rag/__init__.py b/src/rubin/rag/__init__.py index 7cc68c20..6e57652e 100644 --- a/src/rubin/rag/__init__.py +++ b/src/rubin/rag/__init__.py @@ -5,7 +5,7 @@ from importlib.metadata import PackageNotFoundError, version __version__: str -"""The version string of rubinrag +"""The version string of rubin.rag (PEP 440 / SemVer compatible). """ From 47de9d8d9fdb5d9788008b1f7f58826675d0d1ce Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Mon, 10 Feb 2025 16:37:11 -0700 Subject: [PATCH 11/31] replace an residual appearance of rubinrag --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4a14bcfb..c4c43ca9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,7 +116,7 @@ python_files = ["tests/*.py", "tests/*/*.py"] extend = "ruff-shared.toml" [tool.ruff.lint.isort] -known-first-party = ["rubinrag", "tests"] +known-first-party = ["rubin.rag", "tests"] split-on-trailing-comma = false [tool.scriv] From 47786ad7a999d7081342d7d514b469682f9daaa5 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Mon, 10 Feb 2025 16:42:27 -0700 Subject: [PATCH 12/31] eliminate remaining appearances of rubinrag --- docs/api.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index e5cb9a28..aebf6a82 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -1,8 +1,8 @@ -:og:description: Comprehensive API documentation for rubinrag. +:og:description: Comprehensive API documentation for rubin.rag. #################### Python API reference #################### -.. automodapi:: rubinrag +.. automodapi:: rubin.rag :include-all-objects: From 3d8667f919c80bbda091386a0f906f52577e003b Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 12:05:57 -0700 Subject: [PATCH 13/31] add COPYRIGHT to mimic consdb repo --- COPYRIGHT | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 COPYRIGHT diff --git a/COPYRIGHT b/COPYRIGHT new file mode 100644 index 00000000..f0a95ad3 --- /dev/null +++ b/COPYRIGHT @@ -0,0 +1,2 @@ +Copyright 2023 Association of Universities for Research in Astronomy, Inc. (AURA) +Copyright 2023 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory From 996a2e6a21fc25ac8dbde161458a81dd9209ad2b Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 12:12:13 -0700 Subject: [PATCH 14/31] bring in setup.cfg from consdb (removing alembic) --- setup.cfg | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..373dc0c1 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,10 @@ +[flake8] +max-line-length = 110 +max-doc-length = 79 +ignore = E133, E226, E228, N802, N803, N806, N812, N813, N815, N816, W503 +exclude = + bin, + doc, + **/*/__init__.py, + **/*/version.py, + tests/.tests From 58d623a8f7f257247f9bb2e2bfafe1046ddcadca Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 12:15:25 -0700 Subject: [PATCH 15/31] bring in setup.py from consdb --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..c840151c --- /dev/null +++ b/setup.py @@ -0,0 +1,4 @@ +import setuptools +import setuptools_scm + +setuptools.setup(version=setuptools_scm.get_version()) From f3609b40cd7e0e6e7992ded9ab0d6552ea656ced Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 12:18:12 -0700 Subject: [PATCH 16/31] try to make linter happy --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index c840151c..7b4fb1d9 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,5 @@ +"""Python setup.""" + import setuptools import setuptools_scm From a841de056a8768b222b8b79d3a7a3f4709f1b45e Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 12:23:54 -0700 Subject: [PATCH 17/31] delete this file to better match consdb contents --- CHANGELOG.md | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 428ba810..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Change log - -rubin_rag is versioned with [semver](https://semver.org/). - -Find changes for the upcoming release in the project's [changelog.d directory](https://github.com/lsst-dm/rubin_rag/tree/main/changelog.d/). - - From 9ef8f681d83eef4627e68785c242994bc6bfc8e4 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 12:27:18 -0700 Subject: [PATCH 18/31] reinstate CHANGELOG.md because deleting it apparently breaks the build --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..428ba810 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# Change log + +rubin_rag is versioned with [semver](https://semver.org/). + +Find changes for the upcoming release in the project's [changelog.d directory](https://github.com/lsst-dm/rubin_rag/tree/main/changelog.d/). + + From 71ac8173479f1cb1a541315788fabf2656fc4a2d Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 12:30:10 -0700 Subject: [PATCH 19/31] add .ts_pre_commit_config.yaml to mimic consdb --- .ts_pre_commit_config.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .ts_pre_commit_config.yaml diff --git a/.ts_pre_commit_config.yaml b/.ts_pre_commit_config.yaml new file mode 100644 index 00000000..94895824 --- /dev/null +++ b/.ts_pre_commit_config.yaml @@ -0,0 +1,6 @@ +check-yaml: true +check-xml: true +black: true +flake8: true +isort: true +mypy: true From a1702ce14c1a3c53a92ecbb5916374178ce9218a Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 12:38:51 -0700 Subject: [PATCH 20/31] delete file to match consdb --- .github/CODE_OF_CONDUCT | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .github/CODE_OF_CONDUCT diff --git a/.github/CODE_OF_CONDUCT b/.github/CODE_OF_CONDUCT deleted file mode 100644 index bdc7248b..00000000 --- a/.github/CODE_OF_CONDUCT +++ /dev/null @@ -1 +0,0 @@ -Please see the [Team Culture and Conduct Standards](https://developer.lsst.io/team/code-of-conduct.html) for LSST Data Management. From ebe50f8420b5763420016d71df23b98c652c6967 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 13:34:38 -0700 Subject: [PATCH 21/31] remove a file to better match consdb --- .github/CONTRIBUTING.md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .github/CONTRIBUTING.md diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index ffdcf0a2..00000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,16 +0,0 @@ -Thanks for contributing to rubin_rag. - -## Support - -If you are a Rubin Observatory staff member, please reach out of us on Slack in the #dm-square channel or create a Jira ticket. - -If you are a community member, feel free to create a GitHub issue and we'll do our best to help you. - -## Pull requests - -Since rubin_rag is built for the Vera C. Rubin Observatory and Legacy Survey of Space and Time, community contributions can only be accepted if they align with the Rubin Observatory's mission. -For that reason, it's a good idea to propose changes with a new GitHub issue before investing time in making a pull request. - -* * * - -See also our [Code of Conduct](./CODE_OF_CONDUCT). From 7f7778e8148d6d392acb45f18660b7c61b5c3c65 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 13:38:34 -0700 Subject: [PATCH 22/31] delete file to match consdb --- .github/dependabot.yml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 696b5d7b..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" - - - package-ecosystem: "pip" - directory: "/" - schedule: - interval: "weekly" From 537a58e37c7ca8d5a4a2d6f6972b6700c04ed907 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 14:16:51 -0700 Subject: [PATCH 23/31] rename directory to match consdb --- docs/{dev => developer-guide}/development.rst | 0 docs/{dev => developer-guide}/index.rst | 0 docs/{dev => developer-guide}/release.rst | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename docs/{dev => developer-guide}/development.rst (100%) rename docs/{dev => developer-guide}/index.rst (100%) rename docs/{dev => developer-guide}/release.rst (100%) diff --git a/docs/dev/development.rst b/docs/developer-guide/development.rst similarity index 100% rename from docs/dev/development.rst rename to docs/developer-guide/development.rst diff --git a/docs/dev/index.rst b/docs/developer-guide/index.rst similarity index 100% rename from docs/dev/index.rst rename to docs/developer-guide/index.rst diff --git a/docs/dev/release.rst b/docs/developer-guide/release.rst similarity index 100% rename from docs/dev/release.rst rename to docs/developer-guide/release.rst From 4e6e53cae80e755757fd431f0234b37759bf4688 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 14:21:10 -0700 Subject: [PATCH 24/31] fix toctree --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index da207882..6bf4c520 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -21,4 +21,4 @@ rubin_rag is developed on GitHub at https://github.com/lsst-dm/rubin_rag. User guide API Change log - Contributing + Contributing From 6a8fd5b0a3496b999a7c6aa5bdb490d53767dc74 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 15:08:02 -0700 Subject: [PATCH 25/31] delete file to match consdb --- tests/__init__.py | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 tests/__init__.py diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index d8c4dfb0..00000000 --- a/tests/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -"""Tests and test support modules.""" - -# This __init__.py file enables test modules to import support code -# inside tests/ From c930ce4aadcf237464b6e0dcf6253e91612681a4 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 15:11:07 -0700 Subject: [PATCH 26/31] reinstate __init__.py file to un-break the build --- tests/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tests/__init__.py diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 00000000..d8c4dfb0 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1,4 @@ +"""Tests and test support modules.""" + +# This __init__.py file enables test modules to import support code +# inside tests/ From c4362e8aa03b872754aec8702e14ee09b9506fc2 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 15:17:01 -0700 Subject: [PATCH 27/31] rename src directory to python to match consdb --- {src => python}/rubin/__init__.py | 0 {src => python}/rubin/rag/__init__.py | 0 {src => python}/rubin/rag/py.typed | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename {src => python}/rubin/__init__.py (100%) rename {src => python}/rubin/rag/__init__.py (100%) rename {src => python}/rubin/rag/py.typed (100%) diff --git a/src/rubin/__init__.py b/python/rubin/__init__.py similarity index 100% rename from src/rubin/__init__.py rename to python/rubin/__init__.py diff --git a/src/rubin/rag/__init__.py b/python/rubin/rag/__init__.py similarity index 100% rename from src/rubin/rag/__init__.py rename to python/rubin/rag/__init__.py diff --git a/src/rubin/rag/py.typed b/python/rubin/rag/py.typed similarity index 100% rename from src/rubin/rag/py.typed rename to python/rubin/rag/py.typed From f49fe66122bc27929ddd1d2b776a7dd2da5c383f Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 15:21:51 -0700 Subject: [PATCH 28/31] attempt to complete src to python dir rename --- pyproject.toml | 4 ++-- ruff-shared.toml | 4 ++-- tox.ini | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c4c43ca9..ac966fd6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] # https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html -where = ["src"] +where = ["python"] include = ["rubin"] [tool.black] @@ -65,7 +65,7 @@ branch = true source = ["rubin"] [tool.coverage.paths] -source = ["src", ".tox/*/site-packages"] +source = ["python", ".tox/*/site-packages"] [tool.coverage.report] show_missing = true diff --git a/ruff-shared.toml b/ruff-shared.toml index 4e89f3f4..934e62ae 100644 --- a/ruff-shared.toml +++ b/ruff-shared.toml @@ -96,10 +96,10 @@ select = ["ALL"] "noxfile.py" = [ "T201", # print makes sense as output from nox rules ] -"src/*/handlers/**" = [ +"python/*/handlers/**" = [ "D103", # FastAPI handlers should not have docstrings ] -"*/src/*/handlers/**" = [ +"*/python/*/handlers/**" = [ "D103", # FastAPI handlers should not have docstrings ] "tests/**" = [ diff --git a/tox.ini b/tox.ini index a3e15fd7..f81bde1c 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,7 @@ commands = [testenv:typing] description = Run mypy. commands = - mypy src/rubin tests + mypy python/rubin tests [testenv:lint] description = Lint codebase by running pre-commit (Black, isort, Flake8). From 1bad34e45d6187aaaa4b744de09a84da756eef03 Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 15:33:01 -0700 Subject: [PATCH 29/31] delete file to match consdb --- python/rubin/rag/py.typed | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 python/rubin/rag/py.typed diff --git a/python/rubin/rag/py.typed b/python/rubin/rag/py.typed deleted file mode 100644 index e69de29b..00000000 From 4a263ebad83de10515e1878f1df3f500b39abeaf Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 15:38:33 -0700 Subject: [PATCH 30/31] try consdb-like __init__.py --- python/rubin/rag/__init__.py | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/python/rubin/rag/__init__.py b/python/rubin/rag/__init__.py index 6e57652e..5c027b2a 100644 --- a/python/rubin/rag/__init__.py +++ b/python/rubin/rag/__init__.py @@ -1,16 +1,22 @@ -"""Rubin RAG-basd LLM Application.""" +# This file is part of rubin_rag. +# +# Developed for the LSST Data Management System. +# This product includes software developed by the LSST Project +# (https://www.lsst.org). +# See the COPYRIGHT file at the top-level directory of this distribution +# for details of code ownership. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . -__all__ = ["__version__"] - -from importlib.metadata import PackageNotFoundError, version - -__version__: str -"""The version string of rubin.rag -(PEP 440 / SemVer compatible). -""" - -try: - __version__ = version(__name__) -except PackageNotFoundError: - # package is not installed - __version__ = "0.0.1" +# from .version import * From d462d19e61946da462097964bf57f595934acfcb Mon Sep 17 00:00:00 2001 From: Aaron Meisner Date: Tue, 11 Feb 2025 15:41:03 -0700 Subject: [PATCH 31/31] revert to sqrbot-style __init__.py that doesn't break the build --- python/rubin/rag/__init__.py | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/python/rubin/rag/__init__.py b/python/rubin/rag/__init__.py index 5c027b2a..6e57652e 100644 --- a/python/rubin/rag/__init__.py +++ b/python/rubin/rag/__init__.py @@ -1,22 +1,16 @@ -# This file is part of rubin_rag. -# -# Developed for the LSST Data Management System. -# This product includes software developed by the LSST Project -# (https://www.lsst.org). -# See the COPYRIGHT file at the top-level directory of this distribution -# for details of code ownership. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +"""Rubin RAG-basd LLM Application.""" -# from .version import * +__all__ = ["__version__"] + +from importlib.metadata import PackageNotFoundError, version + +__version__: str +"""The version string of rubin.rag +(PEP 440 / SemVer compatible). +""" + +try: + __version__ = version(__name__) +except PackageNotFoundError: + # package is not installed + __version__ = "0.0.1"