lsdb-gaia 0.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. lsdb_gaia-0.0.4/.copier-answers.yml +28 -0
  2. lsdb_gaia-0.0.4/.git_archival.txt +4 -0
  3. lsdb_gaia-0.0.4/.gitattributes +24 -0
  4. lsdb_gaia-0.0.4/.github/ISSUE_TEMPLATE/0-bug_report.md +30 -0
  5. lsdb_gaia-0.0.4/.github/ISSUE_TEMPLATE/1-feature_request.md +18 -0
  6. lsdb_gaia-0.0.4/.github/ISSUE_TEMPLATE/README.md +9 -0
  7. lsdb_gaia-0.0.4/.github/dependabot.yml +10 -0
  8. lsdb_gaia-0.0.4/.github/pull_request_template.md +13 -0
  9. lsdb_gaia-0.0.4/.github/workflows/README.md +9 -0
  10. lsdb_gaia-0.0.4/.github/workflows/pre-commit-ci.yml +42 -0
  11. lsdb_gaia-0.0.4/.github/workflows/publish-to-pypi.yml +40 -0
  12. lsdb_gaia-0.0.4/.github/workflows/smoke-test.yml +49 -0
  13. lsdb_gaia-0.0.4/.github/workflows/testing-and-coverage.yml +47 -0
  14. lsdb_gaia-0.0.4/.gitignore +151 -0
  15. lsdb_gaia-0.0.4/.pre-commit-config.yaml +87 -0
  16. lsdb_gaia-0.0.4/.setup_dev.sh +51 -0
  17. lsdb_gaia-0.0.4/AGENTS.md +3 -0
  18. lsdb_gaia-0.0.4/DEVELOPMENT_GUIDE.md +49 -0
  19. lsdb_gaia-0.0.4/LICENSE +21 -0
  20. lsdb_gaia-0.0.4/PKG-INFO +79 -0
  21. lsdb_gaia-0.0.4/README.md +50 -0
  22. lsdb_gaia-0.0.4/pyproject.toml +109 -0
  23. lsdb_gaia-0.0.4/requirements.txt +0 -0
  24. lsdb_gaia-0.0.4/setup.cfg +4 -0
  25. lsdb_gaia-0.0.4/src/lsdb_gaia/__init__.py +5 -0
  26. lsdb_gaia-0.0.4/src/lsdb_gaia/_version.py +24 -0
  27. lsdb_gaia-0.0.4/src/lsdb_gaia/dr4/__init__.py +7 -0
  28. lsdb_gaia-0.0.4/src/lsdb_gaia/dr4/catalog.py +72 -0
  29. lsdb_gaia-0.0.4/src/lsdb_gaia/dr4/gaia_source_hats/dataset/_common_metadata +0 -0
  30. lsdb_gaia-0.0.4/src/lsdb_gaia/dr4/gaia_source_hats/hats.properties +8 -0
  31. lsdb_gaia-0.0.4/src/lsdb_gaia/dr4/gaia_source_hats/partition_info.csv +1789 -0
  32. lsdb_gaia-0.0.4/src/lsdb_gaia/dr4/join.py +50 -0
  33. lsdb_gaia-0.0.4/src/lsdb_gaia/dr4/metadata.py +105 -0
  34. lsdb_gaia-0.0.4/src/lsdb_gaia/dr4/regions.py +33 -0
  35. lsdb_gaia-0.0.4/src/lsdb_gaia/dr4/storage.py +13 -0
  36. lsdb_gaia-0.0.4/src/lsdb_gaia/dr4/tables.py +147 -0
  37. lsdb_gaia-0.0.4/src/lsdb_gaia.egg-info/PKG-INFO +79 -0
  38. lsdb_gaia-0.0.4/src/lsdb_gaia.egg-info/SOURCES.txt +46 -0
  39. lsdb_gaia-0.0.4/src/lsdb_gaia.egg-info/dependency_links.txt +1 -0
  40. lsdb_gaia-0.0.4/src/lsdb_gaia.egg-info/requires.txt +13 -0
  41. lsdb_gaia-0.0.4/src/lsdb_gaia.egg-info/scm_file_list.json +42 -0
  42. lsdb_gaia-0.0.4/src/lsdb_gaia.egg-info/scm_version.json +8 -0
  43. lsdb_gaia-0.0.4/src/lsdb_gaia.egg-info/top_level.txt +1 -0
  44. lsdb_gaia-0.0.4/tests/lsdb_gaia/conftest.py +0 -0
  45. lsdb_gaia-0.0.4/tests/lsdb_gaia/dr4/test_metadata.py +14 -0
  46. lsdb_gaia-0.0.4/tests/lsdb_gaia/dr4/test_regions.py +30 -0
  47. lsdb_gaia-0.0.4/tests/lsdb_gaia/dr4/test_tables.py +35 -0
  48. lsdb_gaia-0.0.4/tests/lsdb_gaia/test_packaging.py +6 -0
@@ -0,0 +1,28 @@
1
+ # Changes here will be overwritten by Copier
2
+ _commit: v2.3.4
3
+ _src_path: gh:lincc-frameworks/python-project-template
4
+ author_email: lincc-frameworks-team@lists.lsst.org
5
+ author_name: LINCC Frameworks
6
+ create_example_module: false
7
+ custom_install: custom
8
+ enforce_style:
9
+ - ruff_lint
10
+ - ruff_format
11
+ failure_notification: []
12
+ include_benchmarks: false
13
+ include_cli_files: false
14
+ include_dev_guide: true
15
+ include_docs: false
16
+ mypy_type_checking: none
17
+ package_name: lsdb_gaia
18
+ project_description: Utilities for connecting Gaia DR4 with LSDB
19
+ project_license: MIT
20
+ project_name: lsdb_gaia
21
+ project_organization: astronomy-commons
22
+ python_versions:
23
+ - '3.11'
24
+ - '3.12'
25
+ - '3.13'
26
+ - '3.14'
27
+ - '3.15'
28
+ test_lowest_version: none
@@ -0,0 +1,4 @@
1
+ node: $Format:%H$
2
+ node-date: $Format:%cI$
3
+ describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
4
+ ref-names: $Format:%D$
@@ -0,0 +1,24 @@
1
+ # For explanation of this file and uses see
2
+ # https://git-scm.com/docs/gitattributes
3
+ # https://developer.lsst.io/git/git-lfs.html#using-git-lfs-enabled-repositories
4
+ # https://lincc-ppt.readthedocs.io/en/latest/practices/git-lfs.html
5
+ #
6
+ # Used by https://github.com/lsst/afwdata.git
7
+ # *.boost filter=lfs diff=lfs merge=lfs -text
8
+ # *.dat filter=lfs diff=lfs merge=lfs -text
9
+ # *.fits filter=lfs diff=lfs merge=lfs -text
10
+ # *.gz filter=lfs diff=lfs merge=lfs -text
11
+ #
12
+ # apache parquet files
13
+ # *.parq filter=lfs diff=lfs merge=lfs -text
14
+ #
15
+ # sqlite files
16
+ # *.sqlite3 filter=lfs diff=lfs merge=lfs -text
17
+ #
18
+ # gzip files
19
+ # *.gz filter=lfs diff=lfs merge=lfs -text
20
+ #
21
+ # png image files
22
+ # *.png filter=lfs diff=lfs merge=lfs -text
23
+
24
+ .git_archival.txt export-subst
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: Bug report
3
+ about: Tell us about a problem to fix
4
+ title: 'Short description'
5
+ labels: 'bug'
6
+ assignees: ''
7
+
8
+ ---
9
+ **Bug report**
10
+
11
+
12
+ **Environment Information**
13
+
14
+
15
+ <details>
16
+ <summary>Traceback</summary>
17
+
18
+ ```
19
+ FILL IN YOUR STACK TRACE HERE
20
+ ```
21
+
22
+ </details>
23
+
24
+ **Before submitting**
25
+ Please check the following:
26
+
27
+ - [ ] I have described the situation in which the bug arose, including what code was executed, and any applicable data others will need to reproduce the problem.
28
+ - [ ] I have included information about my environment, including the version of this package (e.g. `lsdb_gaia.__version__`)
29
+ - [ ] I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a description of what I expected instead.
30
+ - [ ] If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: 'Short description'
5
+ labels: 'enhancement'
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Feature request**
11
+
12
+
13
+ **Before submitting**
14
+ Please check the following:
15
+
16
+ - [ ] I have described the purpose of the suggested change, specifying what I need the enhancement to accomplish, i.e. what problem it solves.
17
+ - [ ] I have included any relevant links, screenshots, environment information, and data relevant to implementing the requested feature, as well as pseudocode for how I want to access the new functionality.
18
+ - [ ] If I have ideas for how the new feature could be implemented, I have provided explanations and/or pseudocode and/or task lists for the steps.
@@ -0,0 +1,9 @@
1
+ # Configurations
2
+
3
+ Templates for various different issue types are defined in this directory
4
+ and a pull request template is defined as ``../pull_request_template.md``. Adding,
5
+ removing, and modifying these templates to suit the needs of your project is encouraged.
6
+
7
+ For more information about these templates, look here: https://lincc-ppt.readthedocs.io/en/latest/practices/issue_pr_templating.html
8
+
9
+ Or if you still have questions contact us: https://lincc-ppt.readthedocs.io/en/latest/source/contact.html
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "monthly"
7
+ - package-ecosystem: "pip"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "monthly"
@@ -0,0 +1,13 @@
1
+ ## Change Description
2
+ <!---
3
+ Closes #???
4
+ -->
5
+
6
+ ## Solution Description
7
+
8
+
9
+ ## Code Quality
10
+ - [ ] I have read the Contribution Guide and agree to the Code of Conduct
11
+ - [ ] My code follows the code style of this project
12
+ - [ ] My code builds (or compiles) cleanly without any errors or warnings
13
+ - [ ] My code contains relevant comments and necessary documentation
@@ -0,0 +1,9 @@
1
+ # Workflows
2
+
3
+ The .yml files in this directory are used to define the various continuous
4
+ integration scripts that will be run on your behalf e.g. nightly as a smoke check,
5
+ or when you create a new PR.
6
+
7
+ For more information about CI and workflows, look here: https://lincc-ppt.readthedocs.io/en/latest/practices/ci.html
8
+
9
+ Or if you still have questions contact us: https://lincc-ppt.readthedocs.io/en/latest/source/contact.html
@@ -0,0 +1,42 @@
1
+
2
+ # This workflow runs pre-commit hooks on pushes and pull requests to main
3
+ # to enforce coding style. To ensure correct configuration, please refer to:
4
+ # https://lincc-ppt.readthedocs.io/en/latest/practices/ci_precommit.html
5
+ name: Run pre-commit hooks
6
+
7
+ on:
8
+ push:
9
+ branches: [ main ]
10
+ pull_request:
11
+ branches: [ main ]
12
+
13
+ permissions: {}
14
+
15
+ jobs:
16
+ pre-commit-ci:
17
+ runs-on: ubuntu-latest
18
+ permissions:
19
+ contents: read
20
+ steps:
21
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22
+ with:
23
+ fetch-depth: 0
24
+ persist-credentials: false
25
+ - name: Set up Python
26
+ uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
27
+ with:
28
+ python-version: '3.13'
29
+ - name: Install uv
30
+ uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
31
+ - name: Install dependencies
32
+ run: |
33
+ sudo apt-get update
34
+ uv pip install --system .[dev]
35
+ if [ -f requirements.txt ]; then uv pip install --system -r requirements.txt; fi
36
+ - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
37
+ with:
38
+ extra_args: --all-files --verbose
39
+ env:
40
+ SKIP: "check-lincc-frameworks-template-version,no-commit-to-branch,check-added-large-files,validate-pyproject,sphinx-build,pytest-check"
41
+ - uses: pre-commit-ci/lite-action@062bca0919bc9d6e66755cc05074b70c77e111fc # v1.2.0
42
+ if: failure() && github.event_name == 'pull_request' && github.event.pull_request.draft == false
@@ -0,0 +1,40 @@
1
+
2
+ # This workflow will upload a Python Package using Twine when a release is created
3
+ # For more information see: https://github.com/pypa/gh-action-pypi-publish#trusted-publishing
4
+
5
+ # This workflow uses actions that are not certified by GitHub.
6
+ # They are provided by a third-party and are governed by
7
+ # separate terms of service, privacy policy, and support
8
+ # documentation.
9
+
10
+ name: Upload Python Package
11
+
12
+ on:
13
+ release:
14
+ types: [published]
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ deploy:
21
+
22
+ runs-on: ubuntu-latest
23
+ permissions:
24
+ id-token: write
25
+ steps:
26
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
27
+ with:
28
+ persist-credentials: false
29
+ - name: Set up Python
30
+ uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
31
+ with:
32
+ python-version: '3.13'
33
+ - name: Install dependencies
34
+ run: |
35
+ python -m pip install --upgrade pip
36
+ pip install build
37
+ - name: Build package
38
+ run: python -m build
39
+ - name: Publish package
40
+ uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
@@ -0,0 +1,49 @@
1
+ # This workflow will run daily at 06:45.
2
+ # It will install Python dependencies and run tests with a variety of Python versions.
3
+ # See documentation for help debugging smoke test issues:
4
+ # https://lincc-ppt.readthedocs.io/en/latest/practices/ci_testing.html#version-culprit
5
+
6
+ name: Unit test smoke test
7
+
8
+ on:
9
+
10
+ # Runs this workflow automatically
11
+ schedule:
12
+ - cron: 45 6 * * 1-5
13
+
14
+ # Allows you to run this workflow manually from the Actions tab
15
+ workflow_dispatch:
16
+
17
+ permissions: {}
18
+
19
+ jobs:
20
+ build:
21
+
22
+ runs-on: ubuntu-latest
23
+ permissions:
24
+ contents: read
25
+ strategy:
26
+ matrix:
27
+ python-version: ['3.11', '3.12', '3.13', '3.14', '3.15']
28
+
29
+ steps:
30
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
31
+ with:
32
+ persist-credentials: false
33
+ - name: Set up Python ${{ matrix.python-version }}
34
+ uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
35
+ with:
36
+ python-version: ${{ matrix.python-version }}
37
+ - name: Install uv
38
+ uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
39
+ - name: Install dependencies
40
+ run: |
41
+ sudo apt-get update
42
+ uv pip install --system -e .[dev]
43
+ if [ -f requirements.txt ]; then uv pip install --system -r requirements.txt; fi
44
+ - name: List dependencies
45
+ run: |
46
+ pip list
47
+ - name: Run unit tests with pytest
48
+ run: |
49
+ python -m pytest -o log_cli=true -vv
@@ -0,0 +1,47 @@
1
+
2
+ # This workflow will install Python dependencies, run tests and report code coverage with a variety of Python versions
3
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
4
+
5
+ name: Unit test and code coverage
6
+
7
+ on:
8
+ push:
9
+ branches: [ main ]
10
+ pull_request:
11
+ branches: [ main ]
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ build:
18
+
19
+ runs-on: ubuntu-latest
20
+ permissions:
21
+ contents: read
22
+ strategy:
23
+ matrix:
24
+ python-version: ['3.11', '3.12', '3.13', '3.14', '3.15']
25
+
26
+ steps:
27
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
28
+ with:
29
+ persist-credentials: false
30
+ - name: Set up Python ${{ matrix.python-version }}
31
+ uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
32
+ with:
33
+ python-version: ${{ matrix.python-version }}
34
+ - name: Install uv
35
+ uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
36
+ - name: Install dependencies
37
+ run: |
38
+ sudo apt-get update
39
+ uv pip install --system -e .[dev]
40
+ if [ -f requirements.txt ]; then uv pip install --system -r requirements.txt; fi
41
+ - name: Run unit tests with pytest
42
+ run: |
43
+ python -m pytest -o log_cli=true -vv --cov=lsdb_gaia --cov-report=xml
44
+ - name: Upload coverage report to codecov
45
+ uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
46
+ with:
47
+ token: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,151 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+ _version.py
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py,cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+ _readthedocs/
75
+
76
+ # PyBuilder
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ .python-version
88
+
89
+ # pipenv
90
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
91
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
92
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
93
+ # install all needed dependencies.
94
+ #Pipfile.lock
95
+
96
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
97
+ __pypackages__/
98
+
99
+ # Celery stuff
100
+ celerybeat-schedule
101
+ celerybeat.pid
102
+
103
+ # SageMath parsed files
104
+ *.sage.py
105
+
106
+ # Environments
107
+ .env
108
+ .venv
109
+ env/
110
+ venv/
111
+ ENV/
112
+ env.bak/
113
+ venv.bak/
114
+
115
+ # Spyder project settings
116
+ .spyderproject
117
+ .spyproject
118
+
119
+ # Rope project settings
120
+ .ropeproject
121
+
122
+ # mkdocs documentation
123
+ /site
124
+
125
+ # mypy
126
+ .mypy_cache/
127
+ .dmypy.json
128
+ dmypy.json
129
+
130
+ # Pyre type checker
131
+ .pyre/
132
+
133
+ # vscode
134
+ .vscode/
135
+
136
+ # dask
137
+ dask-worker-space/
138
+
139
+ # tmp directory
140
+ tmp/
141
+
142
+ # Mac OS
143
+ .DS_Store
144
+
145
+ # Airspeed Velocity performance results
146
+ _results/
147
+ _html/
148
+
149
+ # Project initialization script
150
+ .initialize_new_project.sh
151
+
@@ -0,0 +1,87 @@
1
+
2
+ repos:
3
+ # Compare the local template version to the latest remote template version
4
+ # This hook should always pass. It will print a message if the local version
5
+ # is out of date.
6
+ - repo: https://github.com/lincc-frameworks/pre-commit-hooks
7
+ rev: 439dda8bd784f4aa721851ecec03877df286f6b5 # v0.2.2
8
+ hooks:
9
+ - id: check-lincc-frameworks-template-version
10
+ name: Check template version
11
+ description: Compare current template version against latest
12
+ verbose: true
13
+ # Clear output from jupyter notebooks so that only the input cells are committed.
14
+ - repo: local
15
+ hooks:
16
+ - id: jupyter-nb-clear-output
17
+ name: Clear output from Jupyter notebooks
18
+ description: Clear output from Jupyter notebooks.
19
+ files: \.ipynb$
20
+ exclude: ^docs/pre_executed
21
+ stages: [pre-commit]
22
+ language: system
23
+ entry: jupyter nbconvert --clear-output
24
+ # Run a series of standard precommit checks, including:
25
+ # - no commits to branches named 'main' and 'master'.
26
+ # - No large files (>= 500kb)
27
+ # - All YAML and TOML files are valid.
28
+ # - No outstanding merge conflict markers in the codebase.
29
+ - repo: https://github.com/pre-commit/pre-commit-hooks
30
+ rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0
31
+ hooks:
32
+ - id: no-commit-to-branch
33
+ name: Prevent main branch commits
34
+ description: Prevent the user from committing directly to the primary branch.
35
+ - id: check-added-large-files
36
+ name: Check for large files
37
+ description: Prevent the user from committing very large files.
38
+ args: ['--maxkb=500']
39
+ - id: check-toml
40
+ name: Validate TOML files
41
+ - id: check-yaml
42
+ args: [--allow-multiple-documents] # Allow multiple document format
43
+ name: Validate YAML files
44
+ - id: check-merge-conflict
45
+ name: Check for merge conflicts
46
+ # Verify that pyproject.toml is well formed
47
+ - repo: https://github.com/abravalheri/validate-pyproject
48
+ rev: 17e12779811926f000bdfa1795f9e3735dd71ac3 # v0.26
49
+ hooks:
50
+ - id: validate-pyproject
51
+ name: Validate pyproject.toml
52
+ description: Verify that pyproject.toml adheres to the established schema.
53
+ # Verify that GitHub workflows are well formed
54
+ - repo: https://github.com/python-jsonschema/check-jsonschema
55
+ rev: 0494aa7fa1314e98913a41227d8f0a515b2c1049 # v0.38.2
56
+ hooks:
57
+ - id: check-github-workflows
58
+ args: ["--verbose"]
59
+ - repo: https://github.com/astral-sh/ruff-pre-commit
60
+ # Ruff version.
61
+ rev: 44b5042edab9382aba712eed4f9c7bab7a3d6a3e # v0.17.0
62
+ hooks:
63
+ - id: ruff
64
+ name: Lint code using ruff; sort and organize imports
65
+ types_or: [ python, pyi ]
66
+ args: ["--fix"]
67
+ - repo: https://github.com/astral-sh/ruff-pre-commit
68
+ # Ruff version.
69
+ rev: 44b5042edab9382aba712eed4f9c7bab7a3d6a3e # v0.17.0
70
+ hooks:
71
+ - id: ruff-format
72
+ name: Format code using ruff
73
+ types_or: [ python, pyi, jupyter ]
74
+ # Run unit tests, verify that they pass. Note that coverage is run against
75
+ # the ./src directory here because that is what will be committed. In the
76
+ # github workflow script, the coverage is run against the installed package
77
+ # and uploaded to Codecov by calling pytest like so:
78
+ # `python -m pytest --cov=<package_name> --cov-report=xml`
79
+ - repo: local
80
+ hooks:
81
+ - id: pytest-check
82
+ name: Run unit tests
83
+ description: Run unit tests with pytest.
84
+ entry: bash -c "if python -m pytest --co -qq; then python -m pytest --cov=./src --cov-report=html; fi"
85
+ language: system
86
+ pass_filenames: false
87
+ always_run: true
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Bash Unofficial strict mode (http://redsymbol.net/articles/unofficial-bash-strict-mode/)
4
+ # and (https://disconnected.systems/blog/another-bash-strict-mode/)
5
+ set -o nounset # Any uninitialized variable is an error
6
+ set -o errexit # Exit the script on the failure of any command to execute without error
7
+ set -o pipefail # Fail command pipelines on the failure of any individual step
8
+ IFS=$'\n\t' #set internal field separator to avoid iteration errors
9
+ # Trap all exits and output something helpful
10
+ trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
11
+
12
+ # This script should be run by new developers to install this package in
13
+ # editable mode and configure their local environment
14
+
15
+ echo "Checking virtual environment"
16
+ if [ "${VIRTUAL_ENV:-missing}" = "missing" ] && [ "${CONDA_PREFIX:-missing}" = "missing" ]; then
17
+ echo 'No virtual environment detected: none of $VIRTUAL_ENV or $CONDA_PREFIX is set.'
18
+ echo
19
+ echo "=== This script is going to install the project in the system python environment ==="
20
+ echo "Proceed? [y/N]"
21
+ read -r RESPONCE
22
+ if [ "${RESPONCE}" != "y" ]; then
23
+ echo "See https://lincc-ppt.readthedocs.io/ for details."
24
+ echo "Exiting."
25
+ exit 1
26
+ fi
27
+
28
+ fi
29
+
30
+ echo "Checking pip version"
31
+ MINIMUM_PIP_VERSION=22
32
+ pipversion=( $(python -m pip --version | awk '{print $2}' | sed 's/\./\n\t/g') )
33
+ if let "${pipversion[0]}<${MINIMUM_PIP_VERSION}"; then
34
+ echo "Insufficient version of pip found. Requires at least version ${MINIMUM_PIP_VERSION}."
35
+ echo "See https://lincc-ppt.readthedocs.io/ for details."
36
+ exit 1
37
+ fi
38
+
39
+ echo "Installing package and runtime dependencies in local environment"
40
+ python -m pip install -e . > /dev/null
41
+
42
+ echo "Installing developer dependencies in local environment"
43
+ python -m pip install -e .'[dev]' > /dev/null
44
+ if [ -f docs/requirements.txt ]; then python -m pip install -r docs/requirements.txt > /dev/null; fi
45
+
46
+ echo "Installing pre-commit"
47
+ pre-commit install > /dev/null
48
+
49
+ #######################################################
50
+ # Include any additional configurations below this line
51
+ #######################################################
@@ -0,0 +1,3 @@
1
+ # Agent Instructions
2
+
3
+ Read [DEVELOPMENT_GUIDE.md](DEVELOPMENT_GUIDE.md) before making any changes. It is the canonical reference and may include information on design principles, core abstractions, API conventions, development workflow, and best-practices.
@@ -0,0 +1,49 @@
1
+ # lsdb_gaia Development Guide
2
+
3
+ This document provides a guide for contributing to the development of this project, and can include information such as design principles, core abstractions, API conventions, development workflow, and best-practices.
4
+
5
+ ## Design Goals and North Stars
6
+ **CRITICAL: Always keep these design principles in mind when making changes to the project.**
7
+
8
+ **Correctness is the Top Priority.** The code should include thorough tests. Any approximations should be clearly documented and communicated to the user.
9
+
10
+ **Code should be modular and use a few consistent APIs.**
11
+
12
+ **Make Easy Things Easy, Hard Things Possible.** Common use cases should require minimal configuration or set up, but users should also be able to perform complex work.
13
+
14
+ **Code should follow a standard format** with automatic formatting supported by `ruff`.
15
+
16
+ **Code should be documented.** Docstrings should provide sufficient API information, such as parameter explanations, for users to understand the code.
17
+
18
+
19
+
20
+ ## Common Commands
21
+
22
+ ```bash
23
+ # All tests
24
+ python -m pytest
25
+
26
+ # Parallel tests
27
+ python -m pytest -n auto
28
+
29
+ # Lint and format (let the linter fix style — do not hand-tune)
30
+ ruff check src/ tests/
31
+ ruff format src/ tests/
32
+ # Pre-commit (runs ruff lint/format, workflow/pyproject schema checks, pytest, etc.)
33
+ pre-commit run --all-files
34
+
35
+ ```
36
+
37
+ ## Repository Structure
38
+
39
+ ```
40
+ src/lsdb_gaia/ Main package
41
+ tests/lsdb_gaia/ Test suite
42
+ ```
43
+
44
+
45
+ ## Testing Conventions
46
+
47
+ - **File naming:** `tests/lsdb_gaia/<SUBDIR>/test_<name>.py`, mirroring the `src/lsdb_gaia/` layout.
48
+ - **Fixtures:** defined in `tests/conftest.py`. Use existing fixtures, do not duplicate test data.
49
+ - Default test run: `python -m pytest`