Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SP-1923: reorganize repo and fix initial build failures #1

Merged
merged 31 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3ade9f8
attempt to fix a linting issue
ameisner Feb 10, 2025
2590b75
attempt to remove trailing whitespace
ameisner Feb 10, 2025
0bcb247
try to pass version test
ameisner Feb 10, 2025
16486c1
attempt to remove docs upload step
ameisner Feb 10, 2025
126bafb
change directory structure
ameisner Feb 10, 2025
81ed713
continue directory structure reorganization
ameisner Feb 10, 2025
1580381
try to adjust package name
ameisner Feb 10, 2025
607900b
try to fix mypy tests invocation
ameisner Feb 10, 2025
41ba597
Update pyproject.toml
ameisner Feb 10, 2025
e3a615a
eliminate a residual appearance of 'rubinrag'
ameisner Feb 10, 2025
47de9d8
replace an residual appearance of rubinrag
ameisner Feb 10, 2025
47786ad
eliminate remaining appearances of rubinrag
ameisner Feb 10, 2025
3d8667f
add COPYRIGHT to mimic consdb repo
ameisner Feb 11, 2025
996a2e6
bring in setup.cfg from consdb (removing alembic)
ameisner Feb 11, 2025
58d623a
bring in setup.py from consdb
ameisner Feb 11, 2025
f3609b4
try to make linter happy
ameisner Feb 11, 2025
a841de0
delete this file to better match consdb contents
ameisner Feb 11, 2025
9ef8f68
reinstate CHANGELOG.md because deleting it apparently breaks the build
ameisner Feb 11, 2025
71ac817
add .ts_pre_commit_config.yaml to mimic consdb
ameisner Feb 11, 2025
a1702ce
delete file to match consdb
ameisner Feb 11, 2025
ebe50f8
remove a file to better match consdb
ameisner Feb 11, 2025
7f7778e
delete file to match consdb
ameisner Feb 11, 2025
537a58e
rename directory to match consdb
Feb 11, 2025
4e6e53c
fix toctree
ameisner Feb 11, 2025
6a8fd5b
delete file to match consdb
ameisner Feb 11, 2025
c930ce4
reinstate __init__.py file to un-break the build
ameisner Feb 11, 2025
c4362e8
rename src directory to python to match consdb
Feb 11, 2025
f49fe66
attempt to complete src to python dir rename
Feb 11, 2025
1bad34e
delete file to match consdb
ameisner Feb 11, 2025
4a263eb
try consdb-like __init__.py
ameisner Feb 11, 2025
d462d19
revert to sqrbot-style __init__.py that doesn't break the build
ameisner Feb 11, 2025
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
1 change: 0 additions & 1 deletion .github/CODE_OF_CONDUCT

This file was deleted.

16 changes: 0 additions & 16 deletions .github/CONTRIBUTING.md

This file was deleted.

11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions .ts_pre_commit_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
check-yaml: true
check-xml: true
black: true
flake8: true
isort: true
mypy: true
2 changes: 2 additions & 0 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -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:
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ rubin_rag is developed on GitHub at https://github.com/lsst-dm/rubin_rag.
User guide <user-guide/index>
API <api>
Change log <changelog>
Contributing <dev/index>
Contributing <developer-guide/index>
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
where = ["src"]
include = ["rubinrag*"]
where = ["python"]
include = ["rubin"]

[tool.black]
line-length = 79
Expand All @@ -62,10 +62,10 @@ target-version = ["py312"]
[tool.coverage.run]
parallel = true
branch = true
source = ["rubinrag"]
source = ["rubin"]

[tool.coverage.paths]
source = ["src", ".tox/*/site-packages"]
source = ["python", ".tox/*/site-packages"]

[tool.coverage.report]
show_missing = true
Expand Down Expand Up @@ -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]
Expand Down
5 changes: 5 additions & 0 deletions python/rubin/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""pkgutil-style namespace package."""

import pkgutil

__path__ = pkgutil.extend_path(__path__, __name__)
6 changes: 3 additions & 3 deletions src/rubinrag/__init__.py → python/rubin/rag/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
"""Rubin RAG-basd LLM Application"""
"""Rubin RAG-basd LLM Application."""

__all__ = ["__version__"]

from importlib.metadata import PackageNotFoundError, version

__version__: str
"""The version string of rubinrag
"""The version string of rubin.rag
(PEP 440 / SemVer compatible).
"""

try:
__version__ = version(__name__)
except PackageNotFoundError:
# package is not installed
__version__ = "0.0.0"
__version__ = "0.0.1"
4 changes: 2 additions & 2 deletions ruff-shared.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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/**" = [
Expand Down
10 changes: 10 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""Python setup."""

import setuptools
import setuptools_scm

setuptools.setup(version=setuptools_scm.get_version())
Empty file removed src/rubinrag/py.typed
Empty file.
2 changes: 1 addition & 1 deletion tests/version_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from rubinrag import __version__
from rubin.rag import __version__


def test_version() -> None:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ commands =
[testenv:typing]
description = Run mypy.
commands =
mypy src/rubinrag tests
mypy python/rubin tests

[testenv:lint]
description = Lint codebase by running pre-commit (Black, isort, Flake8).
Expand Down