hyrax 0.3__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 (111) hide show
  1. hyrax-0.3/.copier-answers.yml +24 -0
  2. hyrax-0.3/.git_archival.txt +4 -0
  3. hyrax-0.3/.gitattributes +24 -0
  4. hyrax-0.3/.github/ISSUE_TEMPLATE/0-general_issue.md +8 -0
  5. hyrax-0.3/.github/ISSUE_TEMPLATE/1-bug_report.md +17 -0
  6. hyrax-0.3/.github/ISSUE_TEMPLATE/2-feature_request.md +18 -0
  7. hyrax-0.3/.github/ISSUE_TEMPLATE/README.md +9 -0
  8. hyrax-0.3/.github/dependabot.yml +10 -0
  9. hyrax-0.3/.github/pull_request_template.md +24 -0
  10. hyrax-0.3/.github/workflows/README.md +9 -0
  11. hyrax-0.3/.github/workflows/asv-main.yml +68 -0
  12. hyrax-0.3/.github/workflows/asv-nightly.yml +72 -0
  13. hyrax-0.3/.github/workflows/asv-pr.yml +70 -0
  14. hyrax-0.3/.github/workflows/build-documentation.yml +39 -0
  15. hyrax-0.3/.github/workflows/pre-commit-ci.yml +36 -0
  16. hyrax-0.3/.github/workflows/publish-benchmarks-pr.yml +53 -0
  17. hyrax-0.3/.github/workflows/publish-to-pypi.yml +38 -0
  18. hyrax-0.3/.github/workflows/smoke-test.yml +42 -0
  19. hyrax-0.3/.github/workflows/testing-and-coverage.yml +38 -0
  20. hyrax-0.3/.gitignore +162 -0
  21. hyrax-0.3/.pre-commit-config.yaml +111 -0
  22. hyrax-0.3/.readthedocs.yml +23 -0
  23. hyrax-0.3/.setup_dev.sh +44 -0
  24. hyrax-0.3/LICENSE +21 -0
  25. hyrax-0.3/PKG-INFO +118 -0
  26. hyrax-0.3/README.md +47 -0
  27. hyrax-0.3/benchmarks/README.md +12 -0
  28. hyrax-0.3/benchmarks/__init__.py +0 -0
  29. hyrax-0.3/benchmarks/asv.conf.json +81 -0
  30. hyrax-0.3/benchmarks/benchmarks.py +16 -0
  31. hyrax-0.3/docs/Makefile +31 -0
  32. hyrax-0.3/docs/_static/umap_visualization.JPG +0 -0
  33. hyrax-0.3/docs/about.rst +49 -0
  34. hyrax-0.3/docs/architecture_overview.rst +32 -0
  35. hyrax-0.3/docs/conf.py +61 -0
  36. hyrax-0.3/docs/configuration.rst +153 -0
  37. hyrax-0.3/docs/data_set_splits.rst +106 -0
  38. hyrax-0.3/docs/dev_guide.rst +42 -0
  39. hyrax-0.3/docs/external_libraries.rst +108 -0
  40. hyrax-0.3/docs/index.rst +120 -0
  41. hyrax-0.3/docs/model_evaluation.rst +53 -0
  42. hyrax-0.3/docs/notebooks/README.md +1 -0
  43. hyrax-0.3/docs/notebooks.rst +7 -0
  44. hyrax-0.3/docs/pre_executed/README.md +16 -0
  45. hyrax-0.3/docs/pre_executed/mlflow_screenshot.JPG +0 -0
  46. hyrax-0.3/docs/pre_executed/mpr_demo.ipynb +1451 -0
  47. hyrax-0.3/docs/pre_executed/mpr_demo_plotting.py +96 -0
  48. hyrax-0.3/docs/pre_executed/tensorboard_screenshot.JPG +0 -0
  49. hyrax-0.3/docs/pre_executed/train_model.ipynb +366 -0
  50. hyrax-0.3/docs/pre_executed/umap_visualization.JPG +0 -0
  51. hyrax-0.3/docs/pre_executed/visualize.ipynb +615 -0
  52. hyrax-0.3/docs/requirements.txt +12 -0
  53. hyrax-0.3/docs/verbs.rst +96 -0
  54. hyrax-0.3/example_notebooks/GettingStartedDownloader.ipynb +104 -0
  55. hyrax-0.3/pyproject.toml +136 -0
  56. hyrax-0.3/setup.cfg +4 -0
  57. hyrax-0.3/src/hyrax/__init__.py +11 -0
  58. hyrax-0.3/src/hyrax/_version.py +21 -0
  59. hyrax-0.3/src/hyrax/config_utils.py +515 -0
  60. hyrax-0.3/src/hyrax/data_sets/__init__.py +13 -0
  61. hyrax-0.3/src/hyrax/data_sets/data_set_registry.py +248 -0
  62. hyrax-0.3/src/hyrax/data_sets/hsc_data_set.py +1045 -0
  63. hyrax-0.3/src/hyrax/data_sets/hyrax_cifar_data_set.py +32 -0
  64. hyrax-0.3/src/hyrax/data_sets/inference_dataset.py +316 -0
  65. hyrax-0.3/src/hyrax/download.py +526 -0
  66. hyrax-0.3/src/hyrax/downloadCutout/LINCC_README.md +4 -0
  67. hyrax-0.3/src/hyrax/downloadCutout/README.md +137 -0
  68. hyrax-0.3/src/hyrax/downloadCutout/downloadCutout.py +1572 -0
  69. hyrax-0.3/src/hyrax/download_stats.py +393 -0
  70. hyrax-0.3/src/hyrax/example_benchmarks.py +14 -0
  71. hyrax-0.3/src/hyrax/gpu_monitor.py +117 -0
  72. hyrax-0.3/src/hyrax/hyrax.py +214 -0
  73. hyrax-0.3/src/hyrax/hyrax_default_config.toml +236 -0
  74. hyrax-0.3/src/hyrax/infer.py +138 -0
  75. hyrax-0.3/src/hyrax/model_exporters.py +92 -0
  76. hyrax-0.3/src/hyrax/models/__init__.py +16 -0
  77. hyrax-0.3/src/hyrax/models/hsc_autoencoder.py +68 -0
  78. hyrax-0.3/src/hyrax/models/hsc_dcae.py +103 -0
  79. hyrax-0.3/src/hyrax/models/hsc_dcae_v2.py +137 -0
  80. hyrax-0.3/src/hyrax/models/hyrax_autoencoder.py +136 -0
  81. hyrax-0.3/src/hyrax/models/hyrax_cnn.py +67 -0
  82. hyrax-0.3/src/hyrax/models/model_registry.py +139 -0
  83. hyrax-0.3/src/hyrax/plugin_utils.py +112 -0
  84. hyrax-0.3/src/hyrax/prepare.py +21 -0
  85. hyrax-0.3/src/hyrax/pytorch_ignite.py +497 -0
  86. hyrax-0.3/src/hyrax/rebuild_manifest.py +31 -0
  87. hyrax-0.3/src/hyrax/train.py +124 -0
  88. hyrax-0.3/src/hyrax/vector_dbs/chromadb_impl.py +263 -0
  89. hyrax-0.3/src/hyrax/vector_dbs/vector_db_factory.py +19 -0
  90. hyrax-0.3/src/hyrax/vector_dbs/vector_db_interface.py +86 -0
  91. hyrax-0.3/src/hyrax/verbs/__init__.py +15 -0
  92. hyrax-0.3/src/hyrax/verbs/lookup.py +104 -0
  93. hyrax-0.3/src/hyrax/verbs/search.py +49 -0
  94. hyrax-0.3/src/hyrax/verbs/umap.py +161 -0
  95. hyrax-0.3/src/hyrax/verbs/verb_registry.py +82 -0
  96. hyrax-0.3/src/hyrax/verbs/visualize.py +351 -0
  97. hyrax-0.3/src/hyrax.egg-info/PKG-INFO +118 -0
  98. hyrax-0.3/src/hyrax.egg-info/SOURCES.txt +109 -0
  99. hyrax-0.3/src/hyrax.egg-info/dependency_links.txt +1 -0
  100. hyrax-0.3/src/hyrax.egg-info/entry_points.txt +2 -0
  101. hyrax-0.3/src/hyrax.egg-info/requires.txt +35 -0
  102. hyrax-0.3/src/hyrax.egg-info/top_level.txt +2 -0
  103. hyrax-0.3/src/hyrax_cli/main.py +70 -0
  104. hyrax-0.3/tests/hyrax/conftest.py +0 -0
  105. hyrax-0.3/tests/hyrax/test_config_utils.py +362 -0
  106. hyrax-0.3/tests/hyrax/test_data/test_default_config.toml +16 -0
  107. hyrax-0.3/tests/hyrax/test_data/test_user_config.toml +14 -0
  108. hyrax-0.3/tests/hyrax/test_data/test_user_config_repeated_keys.toml +20 -0
  109. hyrax-0.3/tests/hyrax/test_hsc_dataset.py +506 -0
  110. hyrax-0.3/tests/hyrax/test_plugin_utils.py +107 -0
  111. hyrax-0.3/tests/hyrax/test_splits.py +161 -0
@@ -0,0 +1,24 @@
1
+ # Changes here will be overwritten by Copier
2
+ _commit: v2.0.5
3
+ _src_path: gh:lincc-frameworks/python-project-template
4
+ author_email: mtauraso@uw.edu
5
+ author_name: LINCC Frameworks
6
+ create_example_module: false
7
+ custom_install: true
8
+ enforce_style:
9
+ - ruff_lint
10
+ - ruff_format
11
+ failure_notification: []
12
+ include_benchmarks: true
13
+ include_docs: true
14
+ include_notebooks: true
15
+ mypy_type_checking: none
16
+ package_name: hyrax
17
+ project_license: MIT
18
+ project_name: hyrax
19
+ project_organization: lincc-frameworks
20
+ python_versions:
21
+ - '3.9'
22
+ - '3.10'
23
+ - '3.11'
24
+ - '3.12'
@@ -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,8 @@
1
+ ---
2
+ name: General issue
3
+ about: Quickly create a general issue
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
@@ -0,0 +1,17 @@
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
+ **Before submitting**
13
+ Please check the following:
14
+
15
+ - [ ] I have described the situation in which the bug arose, including what code was executed, information about my environment, and any applicable data others will need to reproduce the problem.
16
+ - [ ] 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.
17
+ - [ ] 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,24 @@
1
+ <!--
2
+ Thank you for your contribution to the repo :)
3
+
4
+ Pull Request (PR) Instructions:
5
+ Provide a general summary of your changes in the Title above. Fill out each section of the template, and replace the space with an `x` in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help! Once you are satisfied with the pull request, click the "Create pull request" button to submit it for review.
6
+
7
+ Before submitting this PR, please ensure that your input and responses are entered in the designated space provided below each section to keep all project-related information organized and easily accessible.
8
+
9
+ How to link to a PR:
10
+ https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
11
+ -->
12
+
13
+ ## Change Description
14
+ <!---
15
+ Describe your changes in detail. In your description, you should answer questions like "Why is this change required? What problem does it solve?".
16
+
17
+ If it fixes an open issue, please link to the issue here. If this PR closes an issue, put the word 'closes' before the issue link to auto-close the issue when the PR is merged.
18
+ -->
19
+ - [ ] My PR includes a link to the issue that I am addressing
20
+
21
+
22
+
23
+ ## Solution Description
24
+ <!-- Please explain the technical solution that I have provided and how it addresses the issue or feature being implemented -->
@@ -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,68 @@
1
+ # This workflow will run benchmarks with airspeed velocity (asv),
2
+ # store the new results in the "benchmarks" branch and publish them
3
+ # to a dashboard on GH Pages.
4
+ name: Run ASV benchmarks for main
5
+
6
+ on:
7
+ push:
8
+ branches: [ main ]
9
+
10
+ env:
11
+ PYTHON_VERSION: "3.10"
12
+ ASV_VERSION: "0.6.4"
13
+ WORKING_DIR: ${{github.workspace}}/benchmarks
14
+
15
+ concurrency:
16
+ group: ${{github.workflow}}-${{github.ref}}
17
+ cancel-in-progress: true
18
+
19
+ jobs:
20
+ asv-main:
21
+ runs-on: ubuntu-latest
22
+ permissions:
23
+ contents: write
24
+ defaults:
25
+ run:
26
+ working-directory: ${{env.WORKING_DIR}}
27
+ steps:
28
+ - name: Set up Python ${{env.PYTHON_VERSION}}
29
+ uses: actions/setup-python@v5
30
+ with:
31
+ python-version: ${{env.PYTHON_VERSION}}
32
+ - name: Checkout main branch of the repository
33
+ uses: actions/checkout@v4
34
+ with:
35
+ fetch-depth: 0
36
+ - name: Install dependencies
37
+ run: pip install "asv[virtualenv]==${{env.ASV_VERSION}}"
38
+ - name: Configure git
39
+ run: |
40
+ git config user.name "github-actions[bot]"
41
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
42
+ - name: Create ASV machine config file
43
+ run: asv machine --machine gh-runner --yes
44
+ - name: Fetch previous results from the "benchmarks" branch
45
+ run: |
46
+ if git ls-remote --exit-code origin benchmarks > /dev/null 2>&1; then
47
+ git merge origin/benchmarks \
48
+ --allow-unrelated-histories \
49
+ --no-commit
50
+ mv ../_results .
51
+ fi
52
+ - name: Run ASV for the main branch
53
+ run: asv run ALL --skip-existing --verbose || true
54
+ - name: Submit new results to the "benchmarks" branch
55
+ uses: JamesIves/github-pages-deploy-action@v4
56
+ with:
57
+ branch: benchmarks
58
+ folder: ${{env.WORKING_DIR}}/_results
59
+ target-folder: _results
60
+ - name: Generate dashboard HTML
61
+ run: |
62
+ asv show
63
+ asv publish
64
+ - name: Deploy to Github pages
65
+ uses: JamesIves/github-pages-deploy-action@v4
66
+ with:
67
+ branch: gh-pages
68
+ folder: ${{env.WORKING_DIR}}/_html
@@ -0,0 +1,72 @@
1
+ # This workflow will run daily at 06:45.
2
+ # It will run benchmarks with airspeed velocity (asv)
3
+ # and compare performance with the previous nightly build.
4
+ name: Run benchmarks nightly job
5
+
6
+ on:
7
+ schedule:
8
+ - cron: 45 6 * * *
9
+ workflow_dispatch:
10
+
11
+ env:
12
+ PYTHON_VERSION: "3.10"
13
+ ASV_VERSION: "0.6.4"
14
+ WORKING_DIR: ${{github.workspace}}/benchmarks
15
+ NIGHTLY_HASH_FILE: nightly-hash
16
+
17
+ jobs:
18
+ asv-nightly:
19
+ runs-on: ubuntu-latest
20
+ defaults:
21
+ run:
22
+ working-directory: ${{env.WORKING_DIR}}
23
+ steps:
24
+ - name: Set up Python ${{env.PYTHON_VERSION}}
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: ${{env.PYTHON_VERSION}}
28
+ - name: Checkout main branch of the repository
29
+ uses: actions/checkout@v4
30
+ with:
31
+ fetch-depth: 0
32
+ - name: Install dependencies
33
+ run: pip install "asv[virtualenv]==${{env.ASV_VERSION}}"
34
+ - name: Configure git
35
+ run: |
36
+ git config user.name "github-actions[bot]"
37
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
38
+ - name: Create ASV machine config file
39
+ run: asv machine --machine gh-runner --yes
40
+ - name: Fetch previous results from the "benchmarks" branch
41
+ run: |
42
+ if git ls-remote --exit-code origin benchmarks > /dev/null 2>&1; then
43
+ git merge origin/benchmarks \
44
+ --allow-unrelated-histories \
45
+ --no-commit
46
+ mv ../_results .
47
+ fi
48
+ - name: Get nightly dates under comparison
49
+ id: nightly-dates
50
+ run: |
51
+ echo "yesterday=$(date -d yesterday +'%Y-%m-%d')" >> $GITHUB_OUTPUT
52
+ echo "today=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
53
+ - name: Use last nightly commit hash from cache
54
+ uses: actions/cache@v4
55
+ with:
56
+ path: ${{env.WORKING_DIR}}
57
+ key: nightly-results-${{steps.nightly-dates.outputs.yesterday}}
58
+ - name: Run comparison of main against last nightly build
59
+ run: |
60
+ HASH_FILE=${{env.NIGHTLY_HASH_FILE}}
61
+ CURRENT_HASH=${{github.sha}}
62
+ if [ -f $HASH_FILE ]; then
63
+ PREV_HASH=$(cat $HASH_FILE)
64
+ asv continuous $PREV_HASH $CURRENT_HASH --verbose || true
65
+ asv compare $PREV_HASH $CURRENT_HASH --sort ratio --verbose
66
+ fi
67
+ echo $CURRENT_HASH > $HASH_FILE
68
+ - name: Update last nightly hash in cache
69
+ uses: actions/cache@v4
70
+ with:
71
+ path: ${{env.WORKING_DIR}}
72
+ key: nightly-results-${{steps.nightly-dates.outputs.today}}
@@ -0,0 +1,70 @@
1
+ # This workflow will run benchmarks with airspeed velocity (asv) for pull requests.
2
+ # It will compare the performance of the main branch with the performance of the merge
3
+ # with the new changes. It then publishes a comment with this assessment by triggering
4
+ # the publish-benchmarks-pr workflow.
5
+ # Based on https://securitylab.github.com/research/github-actions-preventing-pwn-requests/.
6
+ name: Run benchmarks for PR
7
+
8
+ on:
9
+ pull_request:
10
+ branches: [ main ]
11
+ workflow_dispatch:
12
+
13
+ concurrency:
14
+ group: ${{github.workflow}}-${{github.ref}}
15
+ cancel-in-progress: true
16
+
17
+ env:
18
+ PYTHON_VERSION: "3.10"
19
+ ASV_VERSION: "0.6.4"
20
+ WORKING_DIR: ${{github.workspace}}/benchmarks
21
+ ARTIFACTS_DIR: ${{github.workspace}}/artifacts
22
+
23
+ jobs:
24
+ asv-pr:
25
+ runs-on: ubuntu-latest
26
+ defaults:
27
+ run:
28
+ working-directory: ${{env.WORKING_DIR}}
29
+ steps:
30
+ - name: Set up Python ${{env.PYTHON_VERSION}}
31
+ uses: actions/setup-python@v5
32
+ with:
33
+ python-version: ${{env.PYTHON_VERSION}}
34
+ - name: Checkout PR branch of the repository
35
+ uses: actions/checkout@v4
36
+ with:
37
+ fetch-depth: 0
38
+ - name: Display Workflow Run Information
39
+ run: |
40
+ echo "Workflow Run ID: ${{github.run_id}}"
41
+ - name: Install dependencies
42
+ run: pip install "asv[virtualenv]==${{env.ASV_VERSION}}" lf-asv-formatter
43
+ - name: Make artifacts directory
44
+ run: mkdir -p ${{env.ARTIFACTS_DIR}}
45
+ - name: Save pull request number
46
+ run: echo ${{github.event.pull_request.number}} > ${{env.ARTIFACTS_DIR}}/pr
47
+ - name: Get current job logs URL
48
+ uses: Tiryoh/gha-jobid-action@v1
49
+ id: jobs
50
+ with:
51
+ github_token: ${{secrets.GITHUB_TOKEN}}
52
+ job_name: ${{github.job}}
53
+ - name: Create ASV machine config file
54
+ run: asv machine --machine gh-runner --yes
55
+ - name: Save comparison of PR against main branch
56
+ run: |
57
+ git remote add upstream https://github.com/${{github.repository}}.git
58
+ git fetch upstream
59
+ asv continuous upstream/main HEAD --verbose || true
60
+ asv compare upstream/main HEAD --sort ratio --verbose | tee output
61
+ python -m lf_asv_formatter --asv_version "$(asv --version | awk '{print $2}')"
62
+ printf "\n\nClick [here]($STEP_URL) to view all benchmarks." >> output
63
+ mv output ${{env.ARTIFACTS_DIR}}
64
+ env:
65
+ STEP_URL: ${{steps.jobs.outputs.html_url}}#step:10:1
66
+ - name: Upload artifacts (PR number and benchmarks output)
67
+ uses: actions/upload-artifact@v4
68
+ with:
69
+ name: benchmark-artifacts
70
+ path: ${{env.ARTIFACTS_DIR}}
@@ -0,0 +1,39 @@
1
+
2
+ # This workflow will install Python dependencies, build the package and then build the documentation.
3
+
4
+ name: Build documentation
5
+
6
+
7
+ on:
8
+ push:
9
+ branches: [ main ]
10
+ pull_request:
11
+ branches: [ main ]
12
+
13
+ concurrency:
14
+ group: ${{ github.workflow }}-${{ github.ref }}
15
+ cancel-in-progress: true
16
+
17
+ jobs:
18
+ build:
19
+
20
+ runs-on: ubuntu-latest
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - name: Set up Python 3.10
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: '3.10'
28
+ - name: Install dependencies
29
+ run: |
30
+ sudo apt-get update
31
+ python -m pip install --upgrade pip
32
+ if [ -f docs/requirements.txt ]; then pip install -r docs/requirements.txt; fi
33
+ pip install .
34
+ - name: Install notebook requirements
35
+ run: |
36
+ sudo apt-get install pandoc
37
+ - name: Build docs
38
+ run: |
39
+ sphinx-build -T -E -b html -d docs/build/doctrees ./docs docs/build/html
@@ -0,0 +1,36 @@
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
+ jobs:
14
+ pre-commit-ci:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ with:
19
+ fetch-depth: 0
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: '3.10'
24
+ - name: Install dependencies
25
+ run: |
26
+ sudo apt-get update
27
+ python -m pip install --upgrade pip
28
+ pip install .[dev]
29
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
30
+ - uses: pre-commit/action@v3.0.1
31
+ with:
32
+ extra_args: --all-files --verbose
33
+ env:
34
+ SKIP: "check-lincc-frameworks-template-version,no-commit-to-branch,check-added-large-files,validate-pyproject,sphinx-build,pytest-check"
35
+ - uses: pre-commit-ci/lite-action@v1.1.0
36
+ if: failure() && github.event_name == 'pull_request' && github.event.pull_request.draft == false
@@ -0,0 +1,53 @@
1
+ # This workflow publishes a benchmarks comment on a pull request. It is triggered after the
2
+ # benchmarks are computed in the asv-pr workflow. This separation of concerns allows us limit
3
+ # access to the target repository private tokens and secrets, increasing the level of security.
4
+ # Based on https://securitylab.github.com/research/github-actions-preventing-pwn-requests/.
5
+ name: Publish benchmarks comment to PR
6
+
7
+ on:
8
+ workflow_run:
9
+ workflows: ["Run benchmarks for PR"]
10
+ types: [completed]
11
+
12
+ jobs:
13
+ upload-pr-comment:
14
+ runs-on: ubuntu-latest
15
+ if: >
16
+ github.event.workflow_run.event == 'pull_request' &&
17
+ github.event.workflow_run.conclusion == 'success'
18
+ permissions:
19
+ issues: write
20
+ pull-requests: write
21
+ steps:
22
+ - name: Display Workflow Run Information
23
+ run: |
24
+ echo "Workflow Run ID: ${{ github.event.workflow_run.id }}"
25
+ echo "Head SHA: ${{ github.event.workflow_run.head_sha }}"
26
+ echo "Head Branch: ${{ github.event.workflow_run.head_branch }}"
27
+ echo "Conclusion: ${{ github.event.workflow_run.conclusion }}"
28
+ echo "Event: ${{ github.event.workflow_run.event }}"
29
+ - name: Download artifact
30
+ uses: dawidd6/action-download-artifact@v9
31
+ with:
32
+ name: benchmark-artifacts
33
+ run_id: ${{ github.event.workflow_run.id }}
34
+ - name: Extract artifacts information
35
+ id: pr-info
36
+ run: |
37
+ printf "PR number: $(cat pr)\n"
38
+ printf "Output:\n$(cat output)"
39
+ printf "pr=$(cat pr)" >> $GITHUB_OUTPUT
40
+ - name: Find benchmarks comment
41
+ uses: peter-evans/find-comment@v3
42
+ id: find-comment
43
+ with:
44
+ issue-number: ${{ steps.pr-info.outputs.pr }}
45
+ comment-author: 'github-actions[bot]'
46
+ body-includes: view all benchmarks
47
+ - name: Create or update benchmarks comment
48
+ uses: peter-evans/create-or-update-comment@v4
49
+ with:
50
+ comment-id: ${{ steps.find-comment.outputs.comment-id }}
51
+ issue-number: ${{ steps.pr-info.outputs.pr }}
52
+ body-path: output
53
+ edit-mode: replace
@@ -0,0 +1,38 @@
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@v4
27
+ - name: Set up Python
28
+ uses: actions/setup-python@v5
29
+ with:
30
+ python-version: '3.10'
31
+ - name: Install dependencies
32
+ run: |
33
+ python -m pip install --upgrade pip
34
+ pip install build
35
+ - name: Build package
36
+ run: python -m build
37
+ - name: Publish package
38
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,42 @@
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 * * *
13
+
14
+ # Allows you to run this workflow manually from the Actions tab
15
+ workflow_dispatch:
16
+
17
+ jobs:
18
+ build:
19
+
20
+ runs-on: ubuntu-latest
21
+ strategy:
22
+ matrix:
23
+ python-version: ['3.9', '3.10', '3.11', '3.12']
24
+
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+ - name: Set up Python ${{ matrix.python-version }}
28
+ uses: actions/setup-python@v5
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+ - name: Install dependencies
32
+ run: |
33
+ sudo apt-get update
34
+ python -m pip install --upgrade pip
35
+ pip install -e .[dev]
36
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
37
+ - name: List dependencies
38
+ run: |
39
+ pip list
40
+ - name: Run unit tests with pytest
41
+ run: |
42
+ python -m pytest
@@ -0,0 +1,38 @@
1
+ # This workflow will install Python dependencies, run tests and report code coverage with a variety of Python versions
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
+
4
+ name: Unit test and code coverage
5
+
6
+ on:
7
+ push:
8
+ branches: [ main ]
9
+ pull_request:
10
+ branches: [ main ]
11
+
12
+ jobs:
13
+ build:
14
+
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ matrix:
18
+ python-version: ['3.9', '3.10', '3.11', '3.12']
19
+
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - name: Set up Python ${{ matrix.python-version }}
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+ - name: Install dependencies
27
+ run: |
28
+ sudo apt-get update
29
+ python -m pip install --upgrade pip
30
+ pip install -e .[dev]
31
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
32
+ - name: Run unit tests with pytest
33
+ run: |
34
+ python -m pytest --cov=hyrax --cov-report=xml
35
+ - name: Upload coverage report to codecov
36
+ uses: codecov/codecov-action@v5
37
+ with:
38
+ token: ${{ secrets.CODECOV_TOKEN }}