roman-snpit-snappl 0.17.0__tar.gz → 0.18.0__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 (139) hide show
  1. {roman_snpit_snappl-0.17.0/roman_snpit_snappl.egg-info → roman_snpit_snappl-0.18.0}/PKG-INFO +1 -1
  2. roman_snpit_snappl-0.18.0/changes/87.docs.rst +1 -0
  3. roman_snpit_snappl-0.18.0/changes/89.feature.rst +2 -0
  4. roman_snpit_snappl-0.18.0/changes/91.feature.rst +3 -0
  5. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/docker/postgres/run_postgres.sh +2 -2
  6. roman_snpit_snappl-0.18.0/docs/api.rst +31 -0
  7. roman_snpit_snappl-0.18.0/docs/database_schema.rst +238 -0
  8. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/docs/index.rst +1 -0
  9. roman_snpit_snappl-0.18.0/docs/usage.rst +220 -0
  10. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0/roman_snpit_snappl.egg-info}/PKG-INFO +1 -1
  11. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/roman_snpit_snappl.egg-info/SOURCES.txt +5 -0
  12. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/_version.py +3 -3
  13. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/admin/load_snana_ou2024_diaobject.py +1 -0
  14. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/config.py +8 -8
  15. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/db/db.py +49 -24
  16. roman_snpit_snappl-0.18.0/snappl/db/migrations/20251017_objdetcount.sql +1 -0
  17. roman_snpit_snappl-0.18.0/snappl/db/migrations/schema_to_rst.py +71 -0
  18. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/db/webserver.py +155 -19
  19. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/dbclient.py +2 -0
  20. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/diaobject.py +149 -5
  21. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/image_simulator.py +3 -0
  22. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/imagecollection.py +6 -3
  23. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/provenance.py +41 -1
  24. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/utils.py +1 -1
  25. roman_snpit_snappl-0.17.0/docs/api.rst +0 -15
  26. roman_snpit_snappl-0.17.0/docs/usage.rst +0 -7
  27. roman_snpit_snappl-0.17.0/snappl/db/migrations/schema_to_rst.py +0 -56
  28. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/.cruft.json +0 -0
  29. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/.github/CODEOWNERS +0 -0
  30. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +0 -0
  31. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md +0 -0
  32. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/.github/ISSUE_TEMPLATE/PR_TEMPLATE.md +0 -0
  33. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/.github/dependabot.yml +0 -0
  34. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/.github/labeler.yml +0 -0
  35. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/.github/workflows/changelog.yml +0 -0
  36. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/.github/workflows/run_labeler.yml +0 -0
  37. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/.github/workflows/run_snappl_tests.yml +0 -0
  38. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/.github/workflows/sphinx-deploy.yml +0 -0
  39. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/.github/workflows/sub_package_update.yml +0 -0
  40. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/.gitignore +0 -0
  41. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/.pre-commit-config.yaml +0 -0
  42. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/CHANGES.rst +0 -0
  43. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/CITATION.cff +0 -0
  44. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/CODE_OF_CONDUCT.md +0 -0
  45. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/CONTRIBUTING.md +0 -0
  46. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/LICENSE +0 -0
  47. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/MANIFEST.in +0 -0
  48. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/README.rst +0 -0
  49. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/.gitkeep +0 -0
  50. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/10.snappl.rst +0 -0
  51. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/13.bugfix.rst +0 -0
  52. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/14.snappl.rst +0 -0
  53. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/15.feature.rst +0 -0
  54. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/16.feature.rst +0 -0
  55. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/18.feature.rst +0 -0
  56. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/20.bugfix.rst +0 -0
  57. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/23.snappl.rst +0 -0
  58. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/26.feature.rst +0 -0
  59. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/29.feature.rst +0 -0
  60. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/3.snappl.rst +0 -0
  61. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/31.feature.rst +0 -0
  62. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/35.snappl.rst +0 -0
  63. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/36.snappl.rst +0 -0
  64. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/37.snappl.rst +0 -0
  65. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/40.snappl.rst +0 -0
  66. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/41.snappl.rst +0 -0
  67. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/43.snappl.rst +0 -0
  68. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/47.feature.rst +0 -0
  69. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/49.docs.rst +0 -0
  70. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/5.snappl.rst +0 -0
  71. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/54.snappl.rst +0 -0
  72. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/57.snappl.rst +0 -0
  73. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/58.snappl.rst +0 -0
  74. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/61.bugfix.rst +0 -0
  75. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/62.snappl.rst +0 -0
  76. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/63.snappl.rst +0 -0
  77. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/65.bugfix.rst +0 -0
  78. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/68.feature.rst +0 -0
  79. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/72.snappl.rst +0 -0
  80. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/73.feature.rst +0 -0
  81. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/74.bugfix.rst +0 -0
  82. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/79.snappl.rst +0 -0
  83. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/8.snappl.rst +0 -0
  84. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/81.snappl.rst +0 -0
  85. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/82.snappl.rst +0 -0
  86. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/83.snappl.rst +0 -0
  87. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/84.feature.rst +0 -0
  88. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/85.feature.rst +0 -0
  89. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/changes/9.snappl.rst +0 -0
  90. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/codespell-ignore.txt +0 -0
  91. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/docker/postgres/Dockerfile +0 -0
  92. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/docker/postgres/postgresql.conf +0 -0
  93. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/docker/webserver/Dockerfile +0 -0
  94. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/docker/webserver/cert.pem +0 -0
  95. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/docker/webserver/config-test.yaml +0 -0
  96. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/docker/webserver/key.pem +0 -0
  97. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/docker/webserver/roman-snpit-server.py +0 -0
  98. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/docs/Makefile +0 -0
  99. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/docs/_static/logo_black_filled.png +0 -0
  100. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/docs/changes.rst +0 -0
  101. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/docs/conf.py +0 -0
  102. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/docs/installation.rst +0 -0
  103. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/docs/make.bat +0 -0
  104. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/experimentation/README.md +0 -0
  105. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/experimentation/ap_phot_simulated_images.py +0 -0
  106. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/experimentation/play_with_photutils.py +0 -0
  107. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/licenses/.DS_Store +0 -0
  108. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/licenses/LICENSE.rst +0 -0
  109. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/licenses/README.rst +0 -0
  110. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/licenses/TEMPLATE_LICENSE.rst +0 -0
  111. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/pyproject.toml +0 -0
  112. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/roman_snpit_snappl.egg-info/dependency_links.txt +0 -0
  113. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/roman_snpit_snappl.egg-info/not-zip-safe +0 -0
  114. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/roman_snpit_snappl.egg-info/requires.txt +0 -0
  115. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/roman_snpit_snappl.egg-info/top_level.txt +0 -0
  116. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/setup.cfg +0 -0
  117. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/setup.py +0 -0
  118. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/__init__.py +0 -0
  119. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/_dev/__init__.py +0 -0
  120. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/_dev/scm_version.py +0 -0
  121. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/admin/load_ou2024_l2images.py +0 -0
  122. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/data/README.rst +0 -0
  123. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/db/baseview.py +0 -0
  124. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/db/migrations/20251008_init.sql +0 -0
  125. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/db/migrations/apply_migrations.py +0 -0
  126. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/db/migrations/scorched_earth.py +0 -0
  127. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/db/migrations/wipe_all_data.py +0 -0
  128. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/db/static/romansnpit.css +0 -0
  129. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/db/static/romansnpit.js +0 -0
  130. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/db/static/romansnpit_start.js +0 -0
  131. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/db/templates/base.html +0 -0
  132. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/db/templates/romansnpitdb.html +0 -0
  133. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/http.py +0 -0
  134. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/image.py +0 -0
  135. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/logger.py +0 -0
  136. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/psf.py +0 -0
  137. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/sed.py +0 -0
  138. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/snappl/wcs.py +0 -0
  139. {roman_snpit_snappl-0.17.0 → roman_snpit_snappl-0.18.0}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: roman_snpit_snappl
3
- Version: 0.17.0
3
+ Version: 0.18.0
4
4
  Summary: General, database, and photometry utilities for the Roman SNPIT
5
5
  Author: Roman Supernova Project Infrastructure Team
6
6
  Maintainer-email: Roman SN PIT <raknop@lbl.gov>
@@ -0,0 +1 @@
1
+ Add info about dbclient, Config, Provenance to usage.rst in documentation.
@@ -0,0 +1,2 @@
1
+ DiaObject.save_object will now associate with existing objects when
2
+ saving objects, and not save new ones if there already is one close enough.
@@ -0,0 +1,3 @@
1
+ Allow loading and saving of diaobject positions from the database
2
+
3
+ Also cleans up some database interface issues (race conditions, parameter mismatches) in db.py
@@ -2,14 +2,14 @@
2
2
 
3
3
  if [ ! -f $POSTGRES_DATA_DIR/PG_VERSION ]; then
4
4
  echo "Running initdb in $POSTGRES_DATA_DIR"
5
- /usr/lib/postgresql/15/bin/initdb -U postgres --pwfile=/secrets/pgpasswd $POSTGRES_DATA_DIR
5
+ /usr/lib/postgresql/15/bin/initdb -U postgres --pwfile=${PGPASSWDFILE:-/secrets/pgpasswd} $POSTGRES_DATA_DIR
6
6
  /usr/lib/postgresql/15/bin/pg_ctl -D $POSTGRES_DATA_DIR start
7
7
  psql --command "CREATE DATABASE roman_snpit OWNER postgres"
8
8
  psql --command "CREATE EXTENSION q3c" roman_snpit
9
9
  psql --command "CREATE EXTENSION pgcrypto" roman_snpit
10
10
  psql --command "CREATE EXTENSION pg_hint_plan" roman_snpit
11
11
  # psql --command "CREATE EXTENSION pg_parquet" roman_snpit
12
- ropasswd=`cat /secrets/postgres_ro_password`
12
+ ropasswd=`cat ${PGPASSWDFILE_RO:-/secrets/postgres_ro_password}`
13
13
  psql --command "CREATE USER postgres_ro PASSWORD '${ropasswd}'"
14
14
  psql --command "GRANT CONNECT ON DATABASE roman_snpit TO postgres_ro"
15
15
  psql --command "GRANT USAGE ON SCHEMA public TO postgres_ro" roman_snpit
@@ -0,0 +1,31 @@
1
+ .. _api:
2
+
3
+ ==========
4
+ snappl API
5
+ ==========
6
+
7
+ .. contents::
8
+
9
+ .. automodapi:: snappl.config
10
+
11
+ .. automodapi:: snappl.logger
12
+
13
+ .. automodapi:: snappl.utils
14
+
15
+ .. automodapi:: snappl.dbclient
16
+
17
+ .. automodapi:: snappl.provenance
18
+
19
+ .. automodapi:: snappl.http
20
+
21
+ .. automodapi:: snappl.diaobject
22
+
23
+ .. automodapi:: snappl.imagecollection
24
+
25
+ .. automodapi:: snappl.image
26
+
27
+ .. automodapi:: snappl.wcs
28
+
29
+ .. automodapi:: snappl.psf
30
+
31
+ .. automodapi:: snappl.sed
@@ -0,0 +1,238 @@
1
+ ===============
2
+ Database Schema
3
+ ===============
4
+
5
+ These are the schema of the tables in the backend database. The databsae code is all in the ``db`` submodule of ``snappl``. Normally, you will not interact with these directly. Rather, you will call ``snappl`` library functions that contact the web API frontend to the database. You only really need to know about these if you're working on the backend.
6
+
7
+ Last updated 2025-10-17.
8
+
9
+ .. contents::
10
+
11
+
12
+
13
+ **Table:** ``provenance``
14
+ -------------------------
15
+
16
+
17
+ Data product provenance
18
+
19
+ =============== =========== ===== ======== ===============================================================
20
+ Column Type null? Default Comment
21
+ =============== =========== ===== ======== ===============================================================
22
+ ``id`` ``uuid`` NO ``None`` Unique hash of the provenance
23
+ ``environment`` ``integer`` YES ``None`` Environment; see snpit_utils.provenance.Provenance.environments
24
+ ``env_major`` ``integer`` YES ``None`` Semantic major version of environment for this provenance
25
+ ``env_minor`` ``integer`` YES ``None`` Semantic minor version of environment for this provenance
26
+ ``process`` ``text`` NO ``None`` Name of the process or code associated with this provenace
27
+ ``major`` ``integer`` NO ``None`` Semantic major version of code for this provenance
28
+ ``minor`` ``integer`` NO ``None`` Semantic minor version of code for this provenance
29
+ ``params`` ``jsonb`` YES ``None`` Parameters that define the process behavior for this provenance
30
+ =============== =========== ===== ======== ===============================================================
31
+
32
+
33
+ **Table:** ``provenance_upstream``
34
+ ----------------------------------
35
+
36
+
37
+ Upstream linkage table for provenance
38
+
39
+ ================= ======== ===== ======== =======
40
+ Column Type null? Default Comment
41
+ ================= ======== ===== ======== =======
42
+ ``downstream_id`` ``uuid`` NO ``None`` None
43
+ ``upstream_id`` ``uuid`` NO ``None`` None
44
+ ================= ======== ===== ======== =======
45
+
46
+
47
+ **Table:** ``provenance_tag``
48
+ -----------------------------
49
+
50
+
51
+ Human readable tags for collections of provenances
52
+
53
+ ================= ======== ===== ======== ======================================================================
54
+ Column Type null? Default Comment
55
+ ================= ======== ===== ======== ======================================================================
56
+ ``tag`` ``text`` NO ``None`` Human-readable tag
57
+ ``process`` ``text`` NO ``None`` process of the provenance; must match corresponding provenance process
58
+ ``provenance_id`` ``uuid`` NO ``None`` id of the provenance
59
+ ================= ======== ===== ======== ======================================================================
60
+
61
+
62
+ **Table:** ``l2image``
63
+ ----------------------
64
+
65
+
66
+ L2 image
67
+
68
+ ================= ==================== ===== =============== ===========================================
69
+ Column Type null? Default Comment
70
+ ================= ==================== ===== =============== ===========================================
71
+ ``id`` ``uuid`` NO ``None`` None
72
+ ``provenance_id`` ``uuid`` NO ``None`` None
73
+ ``pointing`` ``integer`` YES ``None`` Pointing of the exposure this image is from
74
+ ``sca`` ``integer`` YES ``None`` SCA of this image
75
+ ``filter`` ``text`` NO ``None`` None
76
+ ``ra`` ``double precision`` NO ``None`` None
77
+ ``dec`` ``double precision`` NO ``None`` None
78
+ ``ra_corner_00`` ``real`` NO ``None`` RA of pixel (0,0)
79
+ ``ra_corner_01`` ``real`` NO ``None`` RA of pixel (0,height-1)
80
+ ``ra_corner_10`` ``real`` NO ``None`` RA of pixel (width-1,0)
81
+ ``ra_corner_11`` ``real`` NO ``None`` RA of pixel (width-1,height-1)
82
+ ``dec_corner_00`` ``real`` NO ``None`` Dec of pixel (0,0)
83
+ ``dec_corner_01`` ``real`` NO ``None`` Dec of pixel (0,height-1)
84
+ ``dec_corner_10`` ``real`` NO ``None`` Dec of pixel (width-1,0)
85
+ ``dec_corner_11`` ``real`` NO ``None`` Dec of pixel (width-1,height-1)
86
+ ``filepath`` ``text`` NO ``None`` None
87
+ ``extension`` ``ARRAY`` YES ``None`` None
88
+ ``width`` ``smallint`` YES ``None`` None
89
+ ``height`` ``smallint`` YES ``None`` None
90
+ ``format`` ``smallint`` NO ``0`` 0=Unknown, 1=FITS, 2=Roman Datamodel
91
+ ``mjd_start`` ``double precision`` NO ``None`` None
92
+ ``exptime`` ``real`` NO ``None`` None
93
+ ``properties`` ``jsonb`` YES ``'{}'::jsonb`` None
94
+ ================= ==================== ===== =============== ===========================================
95
+
96
+
97
+ **Table:** ``summed_image``
98
+ ---------------------------
99
+
100
+
101
+ image that is a sum of L2 images
102
+
103
+ ================= ==================== ===== ======== =======
104
+ Column Type null? Default Comment
105
+ ================= ==================== ===== ======== =======
106
+ ``id`` ``uuid`` NO ``None`` None
107
+ ``provenance_id`` ``uuid`` NO ``None`` None
108
+ ``filter`` ``text`` NO ``None`` None
109
+ ``ra`` ``double precision`` NO ``None`` None
110
+ ``dec`` ``double precision`` NO ``None`` None
111
+ ``ra_corner_00`` ``real`` NO ``None`` None
112
+ ``ra_corner_01`` ``real`` NO ``None`` None
113
+ ``ra_corner_10`` ``real`` NO ``None`` None
114
+ ``ra_corner_11`` ``real`` NO ``None`` None
115
+ ``dec_corner_00`` ``real`` NO ``None`` None
116
+ ``dec_corner_01`` ``real`` NO ``None`` None
117
+ ``dec_corner_10`` ``real`` NO ``None`` None
118
+ ``dec_corner_11`` ``real`` NO ``None`` None
119
+ ``filepath`` ``text`` NO ``None`` None
120
+ ``extension`` ``ARRAY`` YES ``None`` None
121
+ ``width`` ``smallint`` YES ``None`` None
122
+ ``height`` ``smallint`` YES ``None`` None
123
+ ``format`` ``smallint`` NO ``None`` None
124
+ ``mjd_start`` ``double precision`` NO ``None`` None
125
+ ``mjd_end`` ``double precision`` NO ``None`` None
126
+ ``properties`` ``jsonb`` YES ``None`` None
127
+ ================= ==================== ===== ======== =======
128
+
129
+
130
+ **Table:** ``summed_image_component``
131
+ -------------------------------------
132
+
133
+
134
+ summed_image linkage table
135
+
136
+ =================== ======== ===== ======== =======
137
+ Column Type null? Default Comment
138
+ =================== ======== ===== ======== =======
139
+ ``summed_image_id`` ``uuid`` NO ``None`` None
140
+ ``l2image_id`` ``uuid`` NO ``None`` None
141
+ =================== ======== ===== ======== =======
142
+
143
+
144
+ **Table:** ``diaobject``
145
+ ------------------------
146
+
147
+
148
+ Known transients or simulated transients
149
+
150
+ ================= ==================== ===== ======== ==========================================================
151
+ Column Type null? Default Comment
152
+ ================= ==================== ===== ======== ==========================================================
153
+ ``id`` ``uuid`` NO ``None`` None
154
+ ``provenance_id`` ``uuid`` NO ``None`` None
155
+ ``name`` ``text`` YES ``None`` Name or id of the transient within its provenance.
156
+ ``iauname`` ``text`` YES ``None`` IAU/TNS name of the transient.
157
+ ``ra`` ``double precision`` YES ``None`` Approx (±1"ish) RA of object; ICRS decimal degrees
158
+ ``dec`` ``double precision`` YES ``None`` Approx (±1"ish) Dec of object; ICRS decimal degrees
159
+ ``mjd_discovery`` ``double precision`` YES ``None`` MJD of image where the transient was discovered
160
+ ``mjd_peak`` ``double precision`` YES ``None`` Approx. MJD where transient is at peak flux
161
+ ``mjd_start`` ``double precision`` YES ``None`` Approx. MJD where the transient lightcurve "starts"
162
+ ``mjd_end`` ``double precision`` YES ``None`` Approx. MJD where the transient lightcurve "ends"
163
+ ``properties`` ``jsonb`` YES ``None`` Collection-specific additional properties of the transient
164
+ ``ndetected`` ``integer`` NO ``1`` None
165
+ ================= ==================== ===== ======== ==========================================================
166
+
167
+
168
+ **Table:** ``diaobject_position``
169
+ ---------------------------------
170
+
171
+
172
+ Calculated positions for a diaobject
173
+
174
+ ================= ============================ ===== ========= =========================================
175
+ Column Type null? Default Comment
176
+ ================= ============================ ===== ========= =========================================
177
+ ``id`` ``uuid`` NO ``None`` None
178
+ ``diaobject_id`` ``uuid`` NO ``None`` None
179
+ ``provenance_id`` ``uuid`` NO ``None`` None
180
+ ``ra`` ``double precision`` YES ``None`` RA in ICRS decimal degrees
181
+ ``ra_err`` ``double precision`` YES ``None`` Uncertainty on RA
182
+ ``dec`` ``double precision`` YES ``None`` Dec in ICRS decimal degrees
183
+ ``dec_err`` ``double precision`` YES ``None`` Uncertainty on Dec
184
+ ``ra_dec_covar`` ``double precision`` YES ``None`` Covariance between RA and Dec
185
+ ``calculated_at`` ``timestamp with time zone`` YES ``now()`` Time when this position was calculculated
186
+ ================= ============================ ===== ========= =========================================
187
+
188
+
189
+ **Table:** ``lightcurve``
190
+ -------------------------
191
+
192
+
193
+ Transient object light curves; (provenance_id,diaobject_id,filter) is unique
194
+
195
+ ================= ============================ ===== ========= =======
196
+ Column Type null? Default Comment
197
+ ================= ============================ ===== ========= =======
198
+ ``id`` ``uuid`` NO ``None`` None
199
+ ``provenance_id`` ``uuid`` NO ``None`` None
200
+ ``diaobject_id`` ``uuid`` NO ``None`` None
201
+ ``filter`` ``text`` NO ``None`` None
202
+ ``filepath`` ``text`` NO ``None`` None
203
+ ``created_at`` ``timestamp with time zone`` YES ``now()`` None
204
+ ================= ============================ ===== ========= =======
205
+
206
+
207
+ **Table:** ``authuser``
208
+ -----------------------
209
+
210
+
211
+ Users
212
+
213
+ =============== ========= ===== ===================== ============================================
214
+ Column Type null? Default Comment
215
+ =============== ========= ===== ===================== ============================================
216
+ ``id`` ``uuid`` NO ``gen_random_uuid()`` None
217
+ ``username`` ``text`` NO ``None`` None
218
+ ``displayname`` ``text`` NO ``None`` None
219
+ ``email`` ``text`` NO ``None`` None
220
+ ``pubkey`` ``text`` YES ``None`` RSA public key
221
+ ``privkey`` ``jsonb`` YES ``None`` RSA private key encrypted with user password
222
+ =============== ========= ===== ===================== ============================================
223
+
224
+
225
+ **Table:** ``passwordlink``
226
+ ---------------------------
227
+
228
+
229
+ (no description)
230
+
231
+ =========== ============================ ===== ======== =======
232
+ Column Type null? Default Comment
233
+ =========== ============================ ===== ======== =======
234
+ ``id`` ``uuid`` NO ``None`` None
235
+ ``userid`` ``uuid`` NO ``None`` None
236
+ ``expires`` ``timestamp with time zone`` YES ``None`` None
237
+ =========== ============================ ===== ======== =======
238
+
@@ -23,6 +23,7 @@ the github package repository at https://github.com/Roman-Supernova-PIT/roman_sn
23
23
  usage.rst
24
24
  changes.rst
25
25
  api.rst
26
+ database_schema.rst
26
27
 
27
28
 
28
29
  Indices and tables
@@ -0,0 +1,220 @@
1
+ =====
2
+ Usage
3
+ =====
4
+
5
+ .. contents::
6
+
7
+
8
+ --------
9
+ Overview
10
+ --------
11
+
12
+ ``snappl`` has a set of utilities for the Roman SNPIT, including all the classes and functions necessary for communicating with the internal snpit database.
13
+
14
+ Things you need to understand:
15
+ * :ref:`connecting-to-the-database`
16
+ * :ref:`config`
17
+ * :ref:`provenance`
18
+
19
+
20
+ .. _connecting-to-the-database:
21
+
22
+ --------------------------
23
+ Connecting to the Database
24
+ --------------------------
25
+
26
+ To connect to the database, you need three things. First, you have to know the url of the web API front-end to the database. You must also have a username and a password for that web API. (NOTE: the config system is likely to change in the future, so exactly how this works may change.) If you're using :ref:`test_env`, then the test fixture ``dbclient`` configures a user with username ``test`` and password ``test_password``, and in that environment the url of the web API is ``https://webserver:8080/``.
27
+
28
+ You configure all of these things by setting the ``system.db.url``, ``system.db.username``, and either ``system.db.password`` or ``system.db.password_file`` in the configuration yaml files. (See :ref:`config` below.) For example, see the default `snpit_system_config.yaml <https://github.com/Roman-Supernova-PIT/environment/blob/main/snpit_system_config.yaml>`_ in the Roman SNPIT environment. *Do not save passwords to any git archive, and do not leave them sitting about in insecure places.* Of course, having to type it all the time is a pain. A reasonable compromise is to have a ``secrets`` directory under your home directory **that is not world-readable** (``chown 700 secrets``). Then you can create files in there. Put your password in a file, and set the location of that file in the ``system.db.password_file`` config. (Make ``system.db.password`` to be ``null`` so the password file will be used.) If you're using a docker container, of course you'll need to bind-mount your secrets directory.
29
+
30
+ Once you've configured these things, you should be able to connect to the database. You can get a connection object with::
31
+
32
+ from snappl.dbclient import SNPITDBClient
33
+
34
+ dbclient = SNPITDBClient()
35
+
36
+ Thereafter, you can pass this ``dbclient`` as an optional argument to any ``snappl`` function that accesses the database. (Lots of the examples below do not explicitly include this argument, but you could add it to them.) Most of the functions will create their own ``dbclient`` using the config info as necessary. However, you are logged in when you first create the object, so it's inefficient if every time you call a function it has to log you in (or, at least, verify that you're logged in). If you make a ``dbclient`` and then are careful to pass as a keyword argument to any function that accepts it, you avoid this inefficiency.
37
+
38
+
39
+ .. _config:
40
+
41
+ ------
42
+ Config
43
+ ------
44
+
45
+ `snappl` includes a config system whereby configuration files can be stored in yaml files. It has the ability to include other yaml files, and to override any of the config values on the command line, if properly used.
46
+
47
+ The Default Confg
48
+ =================
49
+
50
+ You can find an example/default config for the Roman SNPIT in two files in the `environment` github repo:
51
+
52
+ * `default_snpit_config.yaml <https://github.com/Roman-Supernova-PIT/environment/blob/main/default_snpit_config.yaml>`_
53
+ * `snpit_system_config.yaml <https://github.com/Roman-Supernova-PIT/environment/blob/main/snpit_system_config.yaml>`_
54
+
55
+ Notice that the first one includes the second one. In the standard Roman SNPIT docker image, these two files are present in the root directory (``/``).
56
+
57
+ Ideally, all config for every SNPIT application will be in this default config file, so we can all use the same config and be sure we know what we're doing. Of course, that's far too cumbersome for development, so during development you will want to make your own config file with just the things you need in it.
58
+
59
+ By convention, everything underneath the ``system`` top level key are the things that you might have to change when moving from one cluster to another cluster, but that don't change the behavior of the code. This includes paths for where to find things, configurations as to where the database is, login credentials, and the like. Everything that is _not_ under ``system`` should be things that define the behavior of your code. These are the things that are the same every you run on different inputs. It should _not_ include things like the specific images or diaobjects you're currently working on. Ideally, everything that's _not_ in system, if it stays the same, will give the same outputs on the same inputs when run anywhere.
60
+
61
+ Using Config
62
+ ============
63
+
64
+ To use config, you first have to set the environment variable ``SNIPIT_CONFIG`` to the location of the top-level config file. If you're using the default config and working in the roman snpit docker image, you can do this with::
65
+
66
+ export SNPIT_CONFIG=/default_snpit_config.yaml
67
+
68
+ Then, in your code, to get access to the config, you can just run::
69
+
70
+ from snappl.config import Config
71
+
72
+ ...
73
+
74
+ cfg = Config.get()
75
+ tmpdir = Config.value( 'system.paths.temp_dir` )
76
+
77
+ ``Config.get()`` gets you a config object. Then, just call that object's ``value`` method to get the actual config values. Separate different levels of dictionaries in the config with periods, as in the example. (Look at ``default_snpit_config.yaml`` to see how the config file corresponds to the value in the example above.)
78
+
79
+ There are more complicated uses of Config (including reading different, custom config files, modifying the config at runtime, understanding how the config files and all the possible modes of including other files are composed). Read the docstring on ``snappl.config.Config`` for more information.
80
+
81
+ Overriding Parameters on the Command Line
82
+ -----------------------------------------
83
+
84
+ At runtime, if you set things up properly, you can override some of the parameters from the config file with command-line arguments. To accomplish this, you must be using python's ``argparse`` package. When you're ready to parse your arguments, write the following code::
85
+
86
+ configparser = argarse.ArgumentParser( add_help=False )
87
+ configparser.add_argument( '-c', '--config-file', default=None,
88
+ help=( "Location of the .yaml config file; defaults to the value of the "
89
+ "SNPIT_CONFIG environment varaible." ) )
90
+ args, leftovers = configparser.parse_known_args()
91
+
92
+ try:
93
+ cfg = Config.get( args.config_file, setdefault=True )
94
+ except RuntimeError as e:
95
+ if str(e) == 'No default config defined yet; run Config.init(configfile)':
96
+ sys.stderr.write( "Error, no configuration file defined.\n"
97
+ "Either run <your application name> with -c <configfile>\n"
98
+ "or set the SNPIT_CONFIG environment variable.\n" )
99
+ sys.exit(1)
100
+ else:
101
+ raise
102
+
103
+ parser = argparse.ArgumentParser()
104
+ # Put in the config_file argument, even though it will never be found, so it shows up in help
105
+ parser.add_argument( '-c', '--config-file', help="Location of the .yaml config file" )
106
+
107
+ After that, put all of the ``parser.add_argument`` lines that you need for the command-line arguments to your code. Then, at the bottom, after you're done with all of your ``parser.add_argument`` calls, put in the code::
108
+
109
+ cfg.augment_argparse( parser )
110
+ args = parser.parse_args( leftovers )
111
+ cfg.parse_args( args )
112
+
113
+ At this point in your code, you can get access to the command line arguments you specified with the ``args`` variable as usual. However, the running config (that you get with ``Config.get()``) will _also_ have been updated with any changes made on the command line.
114
+
115
+ If you've set your code up like this, run it with ``--help``. You will see the help on the arguments you defined, but you will also see optional arguments for everything that is in the config file.
116
+
117
+ TODO : make it so you can only include some of the top-level keys from the config file in what gets overridden on the command line, to avoid things getting far too cluttered with irrelevant options.
118
+
119
+
120
+ .. _provenance:
121
+
122
+ ----------
123
+ Provenance
124
+ ----------
125
+
126
+ Everything stored in the internal Roman SNPIT database has a *Provenance* associated with it. The purpose of Provenance is twofold:
127
+
128
+ * It allows us to store multiple versions of the same thing in the database. (E.g., suppose you wanted to build a lightcurve for an object using two different configurations of your photometry software. If the database just stored "the lightcurve for this object", it wouldn't be possible to store both. However, in this case, the two lightcurves would have different provenances, so both can be stored.)
129
+
130
+ * It keeps track of the code and the configuration used to create the thing stored in the database. Ideally, this includes all of the parameters (see below) for the code, in addition to the code and code version, as well as (optionally) information about the environment in which the code should be run, such that we could reproduce the output files by running the same code with the same configuration again.
131
+
132
+ A provenance is defined by:
133
+
134
+ * The ``process`` : this is usually the name of the code that produced the thing saved to the database.
135
+ * The ``major`` and ``minor`` version of the process; Roman SNPIT code should use `semantic versioning <https://semver.org>`_.
136
+ * ``params``, The parameters of the process (see below)
137
+ * Optionally: the ``environment``, and ``env_major`` and ``env_minor``, the major and minor versions of the environment. (By default, these three are all None.)
138
+ * ``upstreams``, the immediate upstream provenances (see below).
139
+
140
+ An id is generated from the provenance based on a hash of all the information in the provenance, available in the ``id`` property of a Provenance object. This id is a ``UUID`` (sort of), and will be something ugly like ``f76f39a2-edcf-4e31-ba6b-e3d4335cc972``. Crucially, every time you create a provenance with all the same information, you will always get exactly the same id.
141
+
142
+
143
+ .. _provenance_tags:
144
+
145
+ Provenance Tags
146
+ ===============
147
+
148
+ Provenances hold all the necessary information, and as such are cumbersome. Provenance IDs are 128-bit numbers, and are not very human readable. For this reason, we have *provenance tags*, which are human readable, and also allow us to collect together the provenances of a bunch of different processes into a coherent set of data products.
149
+
150
+ A provenance tag is defined by a human-readable string ``tag``, and by the ``process`` (which is the same as the ``process`` of a Provenance.) For a given (``tag``, ``process``) pair, there can only be one Provenance. That means that you can uniquely define a Provenance by its tag and its process.
151
+
152
+ We should be careful not to create tags willy-nilly. Ideally, we will have a small number of provenance tags in the database that correspond to sets of runs through the entire pipeline.
153
+
154
+
155
+ Getting Provenances from the Database
156
+ =====================================
157
+
158
+ If, somehow, you got your hands on a ``provenance_id`` (the ugly 128-bit number), and you want to get the full ``Provenance`` object for it, you can accomplish that with::
159
+
160
+ from snappl.provenance import Provenance
161
+
162
+ prov = Provenance.get_by_id( provenance_id )
163
+
164
+ You will find provenance ids in the ``provenance_id`` field of things you pulled out of the database. For example, if you have a ``DiaObject`` object (call it ``obj``) that you got with ``DiaObject.get_object`` or ``DiaObject.find_objects``, then you can find the id of the provenance of that DiaObject in ``obj.provenance_id``.
165
+
166
+ If, instead, you know (e.g. because the user passed this on the command line) that you want to work on the objects that we have chosen to tag with the provenance tag ``realtime``, and the process ``rapid_alerts`` (for instance, these may be objects we learned about from the RAPID alert stream), then you could get the provenance with::
167
+
168
+ prov = Provenance.get_provs_for_tag( 'realtime', 'rapid_alerts' )
169
+
170
+
171
+ .. _provenance_parameters:
172
+
173
+ Parameters
174
+ ==========
175
+
176
+ The ``params`` field of a Provenance is a dictionary that should include everything necessary for the specified version of your code to produce the same output on the same input. It should *not* include things like input filenames. The idea is that the *same* Provenance will apply to everything that is part of a given run. Only when you are changing the configuration, or when you are getting input files from an earlier part of the pipeline, should the Provenance change.
177
+
178
+ If you are using the :ref:`config` system, and you've put all of these parameters (but no system-specific, like base paths, and no input files) in the config ``yaml`` file, then you can get a suitable ``params`` with::
179
+
180
+ cfg = Config.get()
181
+ params = cfg.dump_to_dict_for_params( keepkeys=[ 'photometry.phrosty' ], omitkeys=None )
182
+
183
+ The list in ``keepkeys`` are the keys (including the full substructure below that key) from the config that you want to include in the dictionary. This allows you to select out the parts of the config that are relevant to your code. ``system`` and anything starting with ``system.`` should never be in ``keepkeys``.
184
+
185
+ .. _provenance_upstreams:
186
+
187
+ Upstreams
188
+ =========
189
+
190
+ The upstream provenances are the ones that created the input files you use. For example, campari has three basic types of inputs: a *diaobject*, the supernova it's running on; a *diaobject_position*, an updated position of the object; and *images*, the images it's fitting its model to. Thus, it would have three upstream provenances, one for each of these things.
191
+
192
+ It can figure out these upstreams by just looking at the ``provenance_id`` field of the objects its using. Again, for example, campari will have (somehow) obtained a ``snappl.diaobject.DiaObject`` object; call that ``diaobj``. It can get the diaobject provenance by just looking at ``diaobj.provenance_id``. (To actually get the full Provenance object from the id, run ``snappl.provenance.Provenance.get_by_id( provenance_id )``.)
193
+
194
+ Upstreams is part of the provenance because even if you run your code with all the same parameters, if you're taking input files that were from a differently configured process earlier in the pipline, you expect different outputs. Upstreams basically specify which sorts of input files are valid for this provenance.
195
+
196
+
197
+ Creating a Provenance
198
+ =====================
199
+
200
+ Just create a provenance with::
201
+
202
+ from snappl.provenance import Provenance
203
+
204
+ prov = Provenance( process, major, minor, params=<params>, upstreams=<upstreams> )
205
+
206
+ In this call, ``process`` is a string, ``major`` and ``minor`` are integers, ``params`` is a dictionary (see :ref:`provenance_parameters`), and ``upstreams`` is a list of ``Provenance`` objects (see :ref:`provenance_upstreams`).
207
+
208
+ If this is a totally new Provenance— you've never made it before— then save it to the database with::
209
+
210
+ prov.save_to_db( tag=<tag> )
211
+
212
+ Here, ``<tag>`` is the :ref:`provenance tag <provenance_tags>` that you want to tag this provenance with. If the provenance already exists in the database, or if another provenance from the same process is already tagged with this tag, you will get an error. If the provenance you're trying to save already exists, that's fine; it won't resave it, it will just notice that it's there. So, this is safe to call even if you aren't sure if you've saved it before or not. If, for some reason, you really want this to be a new provenance, add ``exists=False`` to the call. In that case, if the provenance already exists, an exception will be raised.
213
+
214
+ .. _test_env:
215
+
216
+ --------------------------------
217
+ The Roman SNPIT Test Environment
218
+ --------------------------------
219
+
220
+ (This is currently a bit of a mess, and I haven't figured out how to get this to work on Perlmutter. However, if you're on a desktop or laptop with an ``x86_64`` architecture, then you should be able to get this running on your machine using Docker. Read all the comments at the top of `this file in the environment repo <https://github.com/Roman-Supernova-PIT/environment/blob/main/test-docker-environment/docker-compose.yaml>`_.)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: roman_snpit_snappl
3
- Version: 0.17.0
3
+ Version: 0.18.0
4
4
  Summary: General, database, and photometry utilities for the Roman SNPIT
5
5
  Author: Roman Supernova Project Infrastructure Team
6
6
  Maintainer-email: Roman SN PIT <raknop@lbl.gov>
@@ -63,7 +63,10 @@ changes/82.snappl.rst
63
63
  changes/83.snappl.rst
64
64
  changes/84.feature.rst
65
65
  changes/85.feature.rst
66
+ changes/87.docs.rst
67
+ changes/89.feature.rst
66
68
  changes/9.snappl.rst
69
+ changes/91.feature.rst
67
70
  docker/postgres/Dockerfile
68
71
  docker/postgres/postgresql.conf
69
72
  docker/postgres/run_postgres.sh
@@ -76,6 +79,7 @@ docs/Makefile
76
79
  docs/api.rst
77
80
  docs/changes.rst
78
81
  docs/conf.py
82
+ docs/database_schema.rst
79
83
  docs/index.rst
80
84
  docs/installation.rst
81
85
  docs/make.bat
@@ -118,6 +122,7 @@ snappl/db/baseview.py
118
122
  snappl/db/db.py
119
123
  snappl/db/webserver.py
120
124
  snappl/db/migrations/20251008_init.sql
125
+ snappl/db/migrations/20251017_objdetcount.sql
121
126
  snappl/db/migrations/apply_migrations.py
122
127
  snappl/db/migrations/schema_to_rst.py
123
128
  snappl/db/migrations/scorched_earth.py
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.17.0'
32
- __version_tuple__ = version_tuple = (0, 17, 0)
31
+ __version__ = version = '0.18.0'
32
+ __version_tuple__ = version_tuple = (0, 18, 0)
33
33
 
34
- __commit_id__ = commit_id = 'gde6e5cc0b'
34
+ __commit_id__ = commit_id = 'g70ce0fe7e'
@@ -33,6 +33,7 @@ def load_snana_ou2024_diaobject( provid, pqf, dbcon=None ):
33
33
  'mjd_peak': float(row.peak_mjd),
34
34
  'mjd_start': float(row.start_mjd),
35
35
  'mjd_end': float(row.end_mjd),
36
+ 'ndetected': 2,
36
37
  'properties': simplejson.dumps(
37
38
  { 'healpix': healpix,
38
39
  'host_id': int(row.host_id),