ctao-calibpipe 0.1.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.

Potentially problematic release.


This version of ctao-calibpipe might be problematic. Click here for more details.

Files changed (163) hide show
  1. ctao_calibpipe-0.1.0/.dockerignore +4 -0
  2. ctao_calibpipe-0.1.0/.gitattributes +1 -0
  3. ctao_calibpipe-0.1.0/.gitignore +92 -0
  4. ctao_calibpipe-0.1.0/.gitlab/issue_templates/Bug.md +28 -0
  5. ctao_calibpipe-0.1.0/.gitlab/issue_templates/Discussion.md +15 -0
  6. ctao_calibpipe-0.1.0/.gitlab/issue_templates/default.md +19 -0
  7. ctao_calibpipe-0.1.0/.gitlab/merge_request_templates/default.md +36 -0
  8. ctao_calibpipe-0.1.0/.gitlab-ci.yml +155 -0
  9. ctao_calibpipe-0.1.0/.gitmodules +3 -0
  10. ctao_calibpipe-0.1.0/.pre-commit-config.yaml +46 -0
  11. ctao_calibpipe-0.1.0/AUTHORS.md +13 -0
  12. ctao_calibpipe-0.1.0/CHANGES.rst +0 -0
  13. ctao_calibpipe-0.1.0/CONTRIBUTING.md +91 -0
  14. ctao_calibpipe-0.1.0/Dockerfile +37 -0
  15. ctao_calibpipe-0.1.0/LICENSE +21 -0
  16. ctao_calibpipe-0.1.0/PKG-INFO +86 -0
  17. ctao_calibpipe-0.1.0/README.md +34 -0
  18. ctao_calibpipe-0.1.0/aiv-config-dependencies.yml +3 -0
  19. ctao_calibpipe-0.1.0/aiv-config.yml +14 -0
  20. ctao_calibpipe-0.1.0/docs/Makefile +35 -0
  21. ctao_calibpipe-0.1.0/docs/source/AUTHORS.md +13 -0
  22. ctao_calibpipe-0.1.0/docs/source/FAQ.rst +7 -0
  23. ctao_calibpipe-0.1.0/docs/source/_static/FD.png +0 -0
  24. ctao_calibpipe-0.1.0/docs/source/_templates/autosummary/base.rst +2 -0
  25. ctao_calibpipe-0.1.0/docs/source/_templates/autosummary/class.rst +2 -0
  26. ctao_calibpipe-0.1.0/docs/source/_templates/autosummary/module.rst +2 -0
  27. ctao_calibpipe-0.1.0/docs/source/bibliography.rst +2 -0
  28. ctao_calibpipe-0.1.0/docs/source/changelog.rst +7 -0
  29. ctao_calibpipe-0.1.0/docs/source/changes/README.md +22 -0
  30. ctao_calibpipe-0.1.0/docs/source/changes/template.rst +43 -0
  31. ctao_calibpipe-0.1.0/docs/source/conf.py +158 -0
  32. ctao_calibpipe-0.1.0/docs/source/development/CONTRIBUTING.md +91 -0
  33. ctao_calibpipe-0.1.0/docs/source/development/index.rst +7 -0
  34. ctao_calibpipe-0.1.0/docs/source/examples/atmosphere/configuration/calculate_macobac.yaml +5 -0
  35. ctao_calibpipe-0.1.0/docs/source/examples/atmosphere/configuration/create_molecular_atmospheric_model.yaml +13 -0
  36. ctao_calibpipe-0.1.0/docs/source/examples/atmosphere/configuration/create_molecular_density_profile.yaml +13 -0
  37. ctao_calibpipe-0.1.0/docs/source/examples/atmosphere/configuration/select_reference_atmospheric_model.yaml +13 -0
  38. ctao_calibpipe-0.1.0/docs/source/examples/index.rst +10 -0
  39. ctao_calibpipe-0.1.0/docs/source/examples/molecularprofiles.rst +79 -0
  40. ctao_calibpipe-0.1.0/docs/source/examples/throughput/configurations/throughput_configuration.yaml +182 -0
  41. ctao_calibpipe-0.1.0/docs/source/examples/utils/configuration/db_config.yaml +7 -0
  42. ctao_calibpipe-0.1.0/docs/source/examples/utils/configuration/metadata_db.yaml +40 -0
  43. ctao_calibpipe-0.1.0/docs/source/examples/utils/configuration/optical_throughput_db.yaml +9 -0
  44. ctao_calibpipe-0.1.0/docs/source/examples/utils/configuration/upload_atmospheric_model_data_db_intermediate.yaml +15 -0
  45. ctao_calibpipe-0.1.0/docs/source/examples/utils/configuration/upload_atmospheric_model_data_db_summer.yaml +15 -0
  46. ctao_calibpipe-0.1.0/docs/source/examples/utils/configuration/upload_atmospheric_model_data_db_winter.yaml +15 -0
  47. ctao_calibpipe-0.1.0/docs/source/examples/utils/configuration/upload_common_metadata_db.yaml +58 -0
  48. ctao_calibpipe-0.1.0/docs/source/examples/utils/configuration/upload_observatory_data_db.yaml +51 -0
  49. ctao_calibpipe-0.1.0/docs/source/getting_started/index.rst +92 -0
  50. ctao_calibpipe-0.1.0/docs/source/index.rst +27 -0
  51. ctao_calibpipe-0.1.0/docs/source/introduction/diagrams/camera_calibration.mmd +27 -0
  52. ctao_calibpipe-0.1.0/docs/source/introduction/diagrams/legend.mmd +21 -0
  53. ctao_calibpipe-0.1.0/docs/source/introduction/diagrams/molecular_atmosphere.mmd +32 -0
  54. ctao_calibpipe-0.1.0/docs/source/introduction/diagrams/muon_calibration.mmd +19 -0
  55. ctao_calibpipe-0.1.0/docs/source/introduction/diagrams/puppeteer-config.json +5 -0
  56. ctao_calibpipe-0.1.0/docs/source/introduction/index.rst +9 -0
  57. ctao_calibpipe-0.1.0/docs/source/introduction/introduction.rst +90 -0
  58. ctao_calibpipe-0.1.0/pyproject.toml +199 -0
  59. ctao_calibpipe-0.1.0/report/inspection.tex +0 -0
  60. ctao_calibpipe-0.1.0/report/manual_testing.tex +39 -0
  61. ctao_calibpipe-0.1.0/report/performance_verification.tex +0 -0
  62. ctao_calibpipe-0.1.0/report/preamble.tex +18 -0
  63. ctao_calibpipe-0.1.0/setup.cfg +4 -0
  64. ctao_calibpipe-0.1.0/sonar-project.properties +9 -0
  65. ctao_calibpipe-0.1.0/src/calibpipe/__init__.py +5 -0
  66. ctao_calibpipe-0.1.0/src/calibpipe/_dev_version/__init__.py +9 -0
  67. ctao_calibpipe-0.1.0/src/calibpipe/_version.py +21 -0
  68. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/__init__.py +1 -0
  69. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/atmosphere_containers.py +109 -0
  70. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/meteo_data_handlers.py +485 -0
  71. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/README.md +14 -0
  72. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/__init__.py +1 -0
  73. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/macobac.ecsv +23 -0
  74. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_MDPs/__init__.py +1 -0
  75. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_MDPs/ref_density_at_15km_ctao-north_intermediate.ecsv +8 -0
  76. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_MDPs/ref_density_at_15km_ctao-north_summer.ecsv +8 -0
  77. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_MDPs/ref_density_at_15km_ctao-north_winter.ecsv +8 -0
  78. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_MDPs/ref_density_at_15km_ctao-south_summer.ecsv +8 -0
  79. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_MDPs/ref_density_at_15km_ctao-south_winter.ecsv +8 -0
  80. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_atmospheres/__init__.py +1 -0
  81. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_atmospheres/reference_atmo_model_v0_ctao-north_intermediate.ecsv +73 -0
  82. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_atmospheres/reference_atmo_model_v0_ctao-north_summer.ecsv +73 -0
  83. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_atmospheres/reference_atmo_model_v0_ctao-north_winter.ecsv +73 -0
  84. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_atmospheres/reference_atmo_model_v0_ctao-south_summer.ecsv +73 -0
  85. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_atmospheres/reference_atmo_model_v0_ctao-south_winter.ecsv +73 -0
  86. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_rayleigh_scattering_profiles/__init__.py +1 -0
  87. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_rayleigh_scattering_profiles/reference_rayleigh_extinction_profile_v0_ctao-north_intermediate.ecsv +857 -0
  88. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_rayleigh_scattering_profiles/reference_rayleigh_extinction_profile_v0_ctao-north_summer.ecsv +857 -0
  89. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_rayleigh_scattering_profiles/reference_rayleigh_extinction_profile_v0_ctao-north_winter.ecsv +857 -0
  90. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_rayleigh_scattering_profiles/reference_rayleigh_extinction_profile_v0_ctao-south_summer.ecsv +857 -0
  91. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/models/reference_rayleigh_scattering_profiles/reference_rayleigh_extinction_profile_v0_ctao-south_winter.ecsv +857 -0
  92. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/templates/request_templates/__init__.py +1 -0
  93. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/templates/request_templates/copernicus.json +11 -0
  94. ctao_calibpipe-0.1.0/src/calibpipe/atmosphere/templates/request_templates/gdas.json +12 -0
  95. ctao_calibpipe-0.1.0/src/calibpipe/core/__init__.py +39 -0
  96. ctao_calibpipe-0.1.0/src/calibpipe/core/common_metadata_containers.py +195 -0
  97. ctao_calibpipe-0.1.0/src/calibpipe/core/exceptions.py +87 -0
  98. ctao_calibpipe-0.1.0/src/calibpipe/database/__init__.py +24 -0
  99. ctao_calibpipe-0.1.0/src/calibpipe/database/adapter/__init__.py +23 -0
  100. ctao_calibpipe-0.1.0/src/calibpipe/database/adapter/adapter.py +80 -0
  101. ctao_calibpipe-0.1.0/src/calibpipe/database/adapter/database_containers/__init__.py +61 -0
  102. ctao_calibpipe-0.1.0/src/calibpipe/database/adapter/database_containers/atmosphere.py +199 -0
  103. ctao_calibpipe-0.1.0/src/calibpipe/database/adapter/database_containers/common_metadata.py +148 -0
  104. ctao_calibpipe-0.1.0/src/calibpipe/database/adapter/database_containers/container_map.py +59 -0
  105. ctao_calibpipe-0.1.0/src/calibpipe/database/adapter/database_containers/observatory.py +61 -0
  106. ctao_calibpipe-0.1.0/src/calibpipe/database/adapter/database_containers/table_version_manager.py +39 -0
  107. ctao_calibpipe-0.1.0/src/calibpipe/database/adapter/database_containers/version_control.py +17 -0
  108. ctao_calibpipe-0.1.0/src/calibpipe/database/connections/__init__.py +28 -0
  109. ctao_calibpipe-0.1.0/src/calibpipe/database/connections/calibpipe_database.py +60 -0
  110. ctao_calibpipe-0.1.0/src/calibpipe/database/connections/postgres_utils.py +97 -0
  111. ctao_calibpipe-0.1.0/src/calibpipe/database/connections/sql_connection.py +103 -0
  112. ctao_calibpipe-0.1.0/src/calibpipe/database/connections/user_confirmation.py +19 -0
  113. ctao_calibpipe-0.1.0/src/calibpipe/database/interfaces/__init__.py +71 -0
  114. ctao_calibpipe-0.1.0/src/calibpipe/database/interfaces/hashable_row_data.py +54 -0
  115. ctao_calibpipe-0.1.0/src/calibpipe/database/interfaces/queries.py +180 -0
  116. ctao_calibpipe-0.1.0/src/calibpipe/database/interfaces/sql_column_info.py +67 -0
  117. ctao_calibpipe-0.1.0/src/calibpipe/database/interfaces/sql_metadata.py +6 -0
  118. ctao_calibpipe-0.1.0/src/calibpipe/database/interfaces/sql_table_info.py +131 -0
  119. ctao_calibpipe-0.1.0/src/calibpipe/database/interfaces/table_handler.py +351 -0
  120. ctao_calibpipe-0.1.0/src/calibpipe/database/interfaces/types.py +96 -0
  121. ctao_calibpipe-0.1.0/src/calibpipe/tests/data/atmosphere/molecular_atmosphere/__init__.py +0 -0
  122. ctao_calibpipe-0.1.0/src/calibpipe/tests/data/atmosphere/molecular_atmosphere/contemporary_MDP.ecsv +34 -0
  123. ctao_calibpipe-0.1.0/src/calibpipe/tests/data/atmosphere/molecular_atmosphere/macobac.csv +852 -0
  124. ctao_calibpipe-0.1.0/src/calibpipe/tests/data/atmosphere/molecular_atmosphere/macobac.ecsv +23 -0
  125. ctao_calibpipe-0.1.0/src/calibpipe/tests/data/atmosphere/molecular_atmosphere/merged_file.ecsv +1082 -0
  126. ctao_calibpipe-0.1.0/src/calibpipe/tests/data/atmosphere/molecular_atmosphere/meteo_data_copernicus.ecsv +1082 -0
  127. ctao_calibpipe-0.1.0/src/calibpipe/tests/data/atmosphere/molecular_atmosphere/meteo_data_gdas.ecsv +66 -0
  128. ctao_calibpipe-0.1.0/src/calibpipe/tests/data/atmosphere/molecular_atmosphere/observatory_configurations.json +71 -0
  129. ctao_calibpipe-0.1.0/src/calibpipe/tests/data/utils/__init__.py +0 -0
  130. ctao_calibpipe-0.1.0/src/calibpipe/tests/data/utils/meteo_data_winter_and_summer.ecsv +12992 -0
  131. ctao_calibpipe-0.1.0/src/calibpipe/tests/unittests/atmosphere/astral_testing.py +107 -0
  132. ctao_calibpipe-0.1.0/src/calibpipe/tests/unittests/atmosphere/test_meteo_data_handler.py +775 -0
  133. ctao_calibpipe-0.1.0/src/calibpipe/tests/unittests/atmosphere/test_molecular_atmosphere.py +327 -0
  134. ctao_calibpipe-0.1.0/src/calibpipe/tests/unittests/database/test_table_handler.py +66 -0
  135. ctao_calibpipe-0.1.0/src/calibpipe/tests/unittests/database/test_types.py +38 -0
  136. ctao_calibpipe-0.1.0/src/calibpipe/tests/unittests/test_bootstrap_db.py +79 -0
  137. ctao_calibpipe-0.1.0/src/calibpipe/tests/unittests/utils/test_observatory.py +309 -0
  138. ctao_calibpipe-0.1.0/src/calibpipe/tools/atmospheric_base_tool.py +78 -0
  139. ctao_calibpipe-0.1.0/src/calibpipe/tools/atmospheric_model_db_loader.py +181 -0
  140. ctao_calibpipe-0.1.0/src/calibpipe/tools/basic_tool_with_db.py +38 -0
  141. ctao_calibpipe-0.1.0/src/calibpipe/tools/contemporary_mdp_producer.py +87 -0
  142. ctao_calibpipe-0.1.0/src/calibpipe/tools/init_db.py +37 -0
  143. ctao_calibpipe-0.1.0/src/calibpipe/tools/macobac_calculator.py +82 -0
  144. ctao_calibpipe-0.1.0/src/calibpipe/tools/molecular_atmospheric_model_producer.py +197 -0
  145. ctao_calibpipe-0.1.0/src/calibpipe/tools/observatory_data_db_loader.py +71 -0
  146. ctao_calibpipe-0.1.0/src/calibpipe/tools/reference_atmospheric_model_selector.py +201 -0
  147. ctao_calibpipe-0.1.0/src/calibpipe/utils/__init__.py +10 -0
  148. ctao_calibpipe-0.1.0/src/calibpipe/utils/observatory.py +486 -0
  149. ctao_calibpipe-0.1.0/src/calibpipe/utils/observatory_containers.py +26 -0
  150. ctao_calibpipe-0.1.0/src/calibpipe/version.py +24 -0
  151. ctao_calibpipe-0.1.0/src/ctao_calibpipe.egg-info/PKG-INFO +86 -0
  152. ctao_calibpipe-0.1.0/src/ctao_calibpipe.egg-info/SOURCES.txt +161 -0
  153. ctao_calibpipe-0.1.0/src/ctao_calibpipe.egg-info/dependency_links.txt +1 -0
  154. ctao_calibpipe-0.1.0/src/ctao_calibpipe.egg-info/entry_points.txt +8 -0
  155. ctao_calibpipe-0.1.0/src/ctao_calibpipe.egg-info/requires.txt +45 -0
  156. ctao_calibpipe-0.1.0/src/ctao_calibpipe.egg-info/top_level.txt +1 -0
  157. ctao_calibpipe-0.1.0/workflows/atmosphere/uc-120-1.2-calculate-macobac.cwl +31 -0
  158. ctao_calibpipe-0.1.0/workflows/atmosphere/uc-120-1.3-select-reference-atmospheric-model.cwl +51 -0
  159. ctao_calibpipe-0.1.0/workflows/atmosphere/uc-120-1.7-create-contemporary-atmospheric-model.cwl +53 -0
  160. ctao_calibpipe-0.1.0/workflows_cfgs/atmosphere/uc-120-1.2-calculate-macobac.cfg +4 -0
  161. ctao_calibpipe-0.1.0/workflows_cfgs/atmosphere/uc-120-1.3-select-reference-atmospheric-model.cfg +9 -0
  162. ctao_calibpipe-0.1.0/workflows_cfgs/atmosphere/uc-120-1.7-create-contemporary-atmospheric-model.cfg +12 -0
  163. ctao_calibpipe-0.1.0/workflows_test/test_run_workflows.py +71 -0
@@ -0,0 +1,4 @@
1
+ **/__pycache__
2
+ **/*.pyc
3
+ **/*.egg-info
4
+ **/build
@@ -0,0 +1 @@
1
+ *.simtel.gz filter=lfs diff=lfs merge=lfs -text
@@ -0,0 +1,92 @@
1
+ .pytest_cache
2
+ *.log
3
+
4
+ # Compiled files
5
+ *.py[co]
6
+ *.a
7
+ *.o
8
+ *.so
9
+ __pycache__
10
+ *.svg
11
+ *.png
12
+
13
+ # ignore version cache file (generated automatically when setup.py is run)
14
+ src/calibpipe/_version.py
15
+
16
+ # Ignore .c files by default to avoid including generated code. If you want to
17
+ # add a non-generated .c extension, use `git add -f filename.c`.
18
+ *.c
19
+
20
+ # Other generated files
21
+ */cython_version.py
22
+ htmlcov
23
+ .coverage*
24
+ MANIFEST
25
+
26
+ # Sphinx
27
+ docs/source/calibpipe_api
28
+ docs/_build
29
+
30
+ # Editors and IDEs
31
+
32
+ # Visual Studio Code
33
+ .vscode
34
+ # Eclipse
35
+ .project
36
+ .pydevproject
37
+ .settings
38
+ # Pycharm
39
+ .idea
40
+ # KDevelop
41
+ *kdev4
42
+
43
+ # Packages/installer info
44
+ *.egg
45
+ *.eggs
46
+ *.egg-info
47
+ dist
48
+ build
49
+ eggs
50
+ parts
51
+ bin
52
+ var
53
+ sdist
54
+ develop-eggs
55
+ .installed.cfg
56
+ distribute-*.tar.gz
57
+
58
+ # Other
59
+ .*.swp
60
+ *~
61
+ \#*
62
+ .\#*
63
+
64
+ # Mac OSX
65
+ .DS_Store
66
+
67
+ # Rope refactoring data:
68
+ .ropeproject
69
+
70
+ # ipython notebook checkpoints
71
+ .ipynb_checkpoints
72
+ .cache*
73
+ .cache
74
+
75
+ *.out
76
+
77
+ #sonarlint command-line output
78
+ .sonarlint
79
+
80
+ # output files (should not be stored in git)
81
+ *.h5
82
+ *.hdf5
83
+ *.fits
84
+ *.fits.gz
85
+ *.grib2
86
+
87
+ *.pstats
88
+ target
89
+ .mypy_cache
90
+
91
+ examples/notebooks/*.html
92
+ examples/notebooks/*.png
@@ -0,0 +1,28 @@
1
+ ### Summary
2
+ <!--- Summarize the bug encountered concisely -->
3
+
4
+
5
+ ### Steps to reproduce
6
+ <!--- How one can reproduce the issue - this is very important -->
7
+
8
+
9
+ ### What is the expected correct behavior?
10
+ <!--- What you should see instead -->
11
+
12
+
13
+ ### Relevant logs and/or screenshots
14
+ <!--- Paste any relevant logs - please use code blocks (```) to format -->
15
+ <!--- console output, logs, and code as it's very hard to read otherwise -->
16
+
17
+
18
+ ### Environment
19
+
20
+ - Version used:
21
+ - Operation System:
22
+
23
+
24
+ <!--- ### Possible fixes -->
25
+ <!--- If you can, link to the line of code that might be responsible for the problem -->
26
+
27
+
28
+ /label ~bug
@@ -0,0 +1,15 @@
1
+ ### Summary
2
+ <!--- Summarize what you would like to discuss -->
3
+ <!--- and what is the actual behavior -->
4
+
5
+
6
+ ### What is the expected correct behavior?
7
+ <!--- What you should see instead -->
8
+
9
+
10
+ ### Relevant logs and/or screenshots
11
+ <!--- Paste any relevant logs - please use code blocks (```) to format -->
12
+ <!--- console output, logs, and code as it's very hard to read otherwise -->
13
+
14
+
15
+ /label ~discussion
@@ -0,0 +1,19 @@
1
+ ### Summary
2
+ <!--- Summarize the new feature you would like to add concisely -->
3
+ <!--- and describe the actual behavior -->
4
+
5
+
6
+ ### What is the expected correct behavior?
7
+ <!--- What you should see instead -->
8
+
9
+
10
+ ### Relevant logs and/or screenshots
11
+ <!--- Paste any relevant logs - please use code blocks (```) to format -->
12
+ <!--- console output, logs, and code as it's very hard to read otherwise -->
13
+
14
+
15
+ <!--- ### Possible fixes -->
16
+ <!--- If you can, provide a code snippet which may implement the requested feature -->
17
+
18
+
19
+ /label ~enhancement
@@ -0,0 +1,36 @@
1
+ ## Description
2
+ <!--- Describe your changes in detail -->
3
+
4
+ ### Commits
5
+ %{all_commits}
6
+
7
+ ## Related Issue
8
+ <!--- This project only accepts pull requests related to open issues -->
9
+ <!--- If suggesting a new feature or change, please discuss it in an issue first -->
10
+ <!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
11
+ <!--- If addressing multiple issues, comment on their relation if needed -->
12
+ <!--- Please link issues accordgin to the automation rules: -->
13
+ <!--- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
14
+
15
+ ## How Has This Been Tested?
16
+ <!--- Please describe in detail how you tested your changes. -->
17
+ <!--- Include details of your testing environment, and the tests you ran to -->
18
+ <!--- see how your change affects other areas of the code, etc. -->
19
+
20
+ <!--- ## Screenshots (if appropriate): -->
21
+
22
+ ## Types of changes
23
+ <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
24
+ - [ ] Bug fix (non-breaking change which fixes an issue)
25
+ - [ ] New feature (non-breaking change which adds functionality)
26
+ - [ ] Breaking change (fix or feature that would cause existing functionality to change)
27
+
28
+ ## Checklist:
29
+ <!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
30
+ <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
31
+ - [ ] My code follows the code style of this project.
32
+ - [ ] My change requires a change to the documentation.
33
+ - [ ] I have updated the documentation accordingly.
34
+ - [ ] I have read the **CONTRIBUTING** document.
35
+ - [ ] I have added tests to cover my changes.
36
+ - [ ] All new and existing tests passed.
@@ -0,0 +1,155 @@
1
+ #
2
+ include:
3
+ - project: 'cta-computing/dpps/aiv/dpps-aiv-toolkit'
4
+ ref: dd87c1aaf379ece916a8e11c069e79d07b521b56
5
+ file: 'ci-functions.yml'
6
+
7
+ - 'aiv-config.yml'
8
+
9
+ variables:
10
+ CHART_LOCATION: chart
11
+ CHART_NAME: calibpipe
12
+ CHART_EXTRA_VALUES: "--set dev.client_image_tag=${DOCKER_TAG}"
13
+ DPPS_AIV_TOOLKIT_DIR: dpps-aiv-toolkit
14
+ CONDA_IMAGE: "quay.io/condaforge/miniforge3:24.11.3-0"
15
+
16
+ stages:
17
+ - prepare
18
+ - lint
19
+ - build
20
+ - tests
21
+ - sonarqube
22
+ - report
23
+ - doc
24
+ - publish
25
+
26
+ default:
27
+ image: harbor.cta-observatory.org/proxy_cache/python:3.12
28
+
29
+ variables:
30
+ CTAPIPE_VERSION: 'latest'
31
+ #
32
+ # Anchors definition
33
+ #
34
+ .env_template: &env_setup
35
+ before_script:
36
+ - apt-get install git
37
+ - pip install pylint pylint-exit anybadge
38
+ - |-
39
+ if [ "$CTAPIPE_VERSION" = "nightly" ]; then
40
+ pip install git+https://github.com/cta-observatory/ctapipe.git
41
+ fi
42
+ - echo -n $RDAMS_TOKEN > rdams_token.txt
43
+ - >
44
+ echo "url: https://cds.climate.copernicus.eu/api" > ~/.cdsapirc
45
+ - >
46
+ echo "key: $CDS_KEY" >> ~/.cdsapirc
47
+ - cp ~/.cdsapirc ./
48
+
49
+ .unittest_template:
50
+ stage: tests
51
+ needs: []
52
+ <<: *env_setup
53
+ script:
54
+ - pip install .[test]
55
+ - pytest -v --cov=calibpipe --junitxml=report.xml -m "not gdas and not db and not integration"
56
+ artifacts:
57
+ when: always
58
+ reports:
59
+ junit: report.xml
60
+
61
+ #
62
+ # Jobs
63
+ #
64
+ pylint:
65
+ stage: lint
66
+ needs: []
67
+ <<: *env_setup
68
+ script:
69
+ - pip install .[test]
70
+ - mkdir ./pylint
71
+ - pylint --fail-under 5.0 ./src/calibpipe/ --output-format=json2:pylint.json,colorized | tee ./pylint/pylint.log || pylint-exit $?
72
+ - PYLINT_SCORE=$(sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' ./pylint/pylint.log)
73
+ - anybadge --label=Pylint --file=pylint/pylint.svg --value=$PYLINT_SCORE 2=red 4=orange 8=yellow 10=green
74
+ - echo "Pylint score is $PYLINT_SCORE"
75
+ artifacts:
76
+ paths:
77
+ - ./pylint/
78
+ - pylint.json
79
+
80
+ unittests:
81
+ parallel:
82
+ matrix:
83
+ - PYTHON_VERSION: ["3.10", "3.11", "3.12", latest]
84
+ CTAPIPE_VERSION: [nightly, latest]
85
+ image: harbor.cta-observatory.org/proxy_cache/python:$PYTHON_VERSION
86
+ rules:
87
+ - if: '$PYTHON_VERSION == "latest" && $CTAPIPE_VERSION == "latest"'
88
+ allow_failure: true
89
+ - if: '$CTAPIPE_VERSION == "nightly"'
90
+ allow_failure: true
91
+ - if: '$CTAPIPE_VERSION'
92
+ allow_failure: false
93
+ - if: '$PYTHON_VERSION == "latest"'
94
+ allow_failure: true
95
+ - if: '$PYTHON_VERSION'
96
+ allow_failure: false
97
+ extends: [.unittest_template]
98
+
99
+ test:
100
+ stage: tests
101
+ <<: *env_setup
102
+ services:
103
+ - name: harbor.cta-observatory.org/proxy_cache/postgres:17
104
+ alias: postgres
105
+ variables:
106
+ POSTGRES_DB: TEST_CALIBPIPE_DB
107
+ POSTGRES_USER: TEST_CALIBPIPE_DB_USER
108
+ POSTGRES_PASSWORD: DUMMY_PSWRD
109
+ POSTGRES_HOST_AUTH_METHOD: trust
110
+ script:
111
+ - pip install -e .[test]
112
+ - pip install coverage-badge
113
+ - mkdir -pv test
114
+ - pytest -v --cov=calibpipe --junitxml=test/report.xml --cov-report=xml:test/coverage.xml
115
+ - coverage-badge
116
+ coverage: '/TOTAL.+ ([0-9]{1,3}%)/'
117
+ artifacts:
118
+ when: always
119
+ reports:
120
+ junit: test/report.xml
121
+ paths:
122
+ - test/coverage.xml
123
+ - test/report.xml
124
+ - "*.ecsv"
125
+ - "*.log"
126
+
127
+ build-docs:
128
+ before_script:
129
+ - apt-get install -y curl
130
+ - curl -fsSL https://deb.nodesource.com/setup_current.x | bash -
131
+ - apt-get install -y nodejs
132
+ - apt-get install -y --no-install-recommends chromium libnss3
133
+ - npm install -g playwright
134
+ - npm install -g @mermaid-js/mermaid-cli
135
+ - export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
136
+ - export PUPPETEER_EXECUTABLE_PATH=$(which chromium-browser)
137
+ - python --version
138
+ - pip install .[doc]
139
+
140
+ publish-chart:
141
+ rules:
142
+ - when: never
143
+
144
+ collect-test-artifacts:
145
+ needs:
146
+ - job: unittests
147
+ artifacts: true
148
+ - job: test
149
+ artifacts: true
150
+ - job: collect-manual-tests
151
+ artifacts: true
152
+
153
+ k8s-integration-tests:
154
+ rules:
155
+ - when: never
@@ -0,0 +1,3 @@
1
+ [submodule "dpps-aiv-toolkit"]
2
+ path = dpps-aiv-toolkit
3
+ url = ../../aiv/dpps-aiv-toolkit.git
@@ -0,0 +1,46 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.5.0 # Use the ref you want to point at
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ exclude: ".*\\.fits(\\.fz)?"
7
+ - id: check-added-large-files
8
+ - id: check-case-conflict
9
+ - id: check-merge-conflict
10
+ exclude: ".*\\.fits(\\.fz)?"
11
+ - id: end-of-file-fixer
12
+ exclude: '(.*\.fits(\.fz)?)|(.*.patch.*)|(chart\/.*README.md)$'
13
+
14
+
15
+ - repo: https://github.com/codespell-project/codespell
16
+ rev: v2.2.4
17
+ hooks:
18
+ - id: codespell
19
+ additional_dependencies:
20
+ - tomli
21
+
22
+ - repo: https://github.com/astral-sh/ruff-pre-commit
23
+ rev: v0.2.1
24
+ hooks:
25
+ - id: ruff
26
+ args: [ --fix, --show-fixes ]
27
+ - id: ruff-format
28
+
29
+ - repo: local
30
+ hooks:
31
+ - id: CI yaml check
32
+ args: [ dpps-aiv-toolkit ]
33
+ name: CI yaml check
34
+ description: CI yaml check
35
+ language: script
36
+ entry: dpps-aiv-toolkit/cicheck.sh
37
+ pass_filenames: false
38
+ always_run: true
39
+
40
+
41
+ - repo: https://github.com/norwoodj/helm-docs
42
+ rev: "v1.14.2"
43
+ hooks:
44
+ - id: helm-docs-built
45
+ args:
46
+ - "--chart-search-root=chart"
@@ -0,0 +1,13 @@
1
+ # CONTRIBUTORS
2
+
3
+ ## Current team members
4
+ - Leonid Burmistrov
5
+ - Mykhailo Dalchenko
6
+ - Tjark Miener
7
+ - Georgios Voutsinas
8
+
9
+ ## Former team members
10
+ - Gabriel Emery
11
+ - Antonio Di Pilato
12
+ - Gregoire Uhlrich
13
+ - Vadym Voitsekhovskyi
File without changes
@@ -0,0 +1,91 @@
1
+ # Contributing to DPPS CalibPipe
2
+
3
+ As main contributors are affiliated with the University of Geneva, we respect its [Code of Conduct][coc] and ask you to do the same.
4
+
5
+ ## Questions, Bugs, Features
6
+
7
+ ### Found an Issue or Bug?
8
+
9
+ If you find a bug in the source code, you can help us by submitting a Bug Report to our [GitLab Repository][gitlab-issues]. Even better, you can submit a Merge Request with a fix.
10
+
11
+ ### Missing a Feature?
12
+
13
+ You can request a new feature by submitting an issue to our [GitLab Repository][gitlab-issues]. If you would like to implement a new feature, it should be discussed first in a [GitLab issue][gitlab-issues] that clearly outlines the changes and benefits of the feature.
14
+
15
+ ### Want a Doc Fix?
16
+
17
+ If you have a suggestion for the documentation, you can open an issue and outline the problem or improvement you have. Creating the doc fix yourself is even better! For large fixes, please build and test the documentation before submitting the PR to ensure you haven't introduced any layout or formatting issues. Make sure your commit message follows the [Commit Message Guidelines][developers-commits].
18
+
19
+ ## Issue Submission Guidelines
20
+
21
+ Before you submit your issue, search the archive to see if your question was already answered. If your issue appears to be a bug and hasn't been reported, open a new issue. Help us maximize the effort we can spend fixing issues and adding new features by not reporting duplicate issues.
22
+
23
+ The "[new issue][gitlab-new-issue]" form contains a number of predefined templates under the **Description** drop-down. Please select the relevant issue template and fill it out to simplify the understanding and proper treatment of the issue. Please add one of the following labels to your issue: `bug`, `suggestion`, `enhancement`, `discussion`, `documentation`, `question`. Do not add other labels or assign developers; this will be done by the project management.
24
+
25
+ ## Merge Request Submission Guidelines
26
+
27
+ Before you submit your merge request, consider the following guidelines:
28
+
29
+ 1. Search [GitLab][gitlab-merge-requests] for an open or closed Merge Request that relates to your submission to avoid duplicating effort.
30
+ <!-- 2. Create the [development environment](../getting_started/index.rst#development_setup). -->
31
+ 2. Create the development environment following the instructions in {ref}`development_setup`.
32
+ 3. Make your changes in a new git branch:
33
+ ```shell
34
+ git checkout -b my-fix-branch main
35
+ ```
36
+ - You do not need to fork the repository; instead, create a new branch in the central repository.
37
+ - The branch name should follow the regular expression `(feature|bugfix|cleanup)/*` and be meaningful.
38
+ 4. Create your patch commit, including appropriate test cases.
39
+ - If it's your first commit in this repository, add yourself to the `AUTHORS` file.
40
+ 5. Follow our Code Style Guidelines (they are enforced by the precommit hooks, don't forget to install them!):
41
+ - [PEP8][pep8] standard for python code.
42
+ - [numpydoc][numpydoc] for the documentation.
43
+ 6. If the changes affect public APIs, change or add relevant documentation.
44
+ 7. Commit your changes using a descriptive commit message that follows our [commit message conventions][developers-commits].
45
+ ```shell
46
+ git add <list of files you have modified>
47
+ git commit
48
+ ```
49
+ Note: Do not add binary files, libraries, build artifacts, etc., to your commit.
50
+ 8. Push your branch to GitLab:
51
+ ```shell
52
+ git push origin my-fix-branch
53
+ ```
54
+ 9. Test your code following the testing instructions.
55
+ 10. In GitLab, open a merge request to `calibPipe:main` and fill out the merge request template.
56
+ 11. If we suggest changes:
57
+ - Make the required updates.
58
+ - Re-run all applicable tests.
59
+ - Commit your changes to your branch (e.g., `my-fix-branch`).
60
+ - Push the updated branch to the GitLab repository (this will update your Merge Request).
61
+ - You can also amend the initial commits and force push them to the branch:
62
+ ```shell
63
+ git rebase main -i
64
+ git push origin my-fix-branch -f
65
+ ```
66
+
67
+ ## After Your Merge Request is Merged
68
+
69
+ After your merge request is merged, the branch you created will be automatically deleted from the central repository.
70
+
71
+ 1. Check out the main branch:
72
+ ```shell
73
+ git checkout main -f
74
+ ```
75
+ 2. Delete the local branch:
76
+ ```shell
77
+ git branch -D my-fix-branch
78
+ ```
79
+ 3. Update your main with the latest upstream version:
80
+ ```shell
81
+ git pull --ff origin main
82
+ ```
83
+
84
+ [coc]: https://www.unige.ch/ethique/charter/
85
+ [gitlab]: https://gitlab.cta-observatory.org/cta-computing/dpps/calibrationpipeline/calibpipe
86
+ [gitlab-issues]: https://gitlab.cta-observatory.org/cta-computing/dpps/calibrationpipeline/calibpipe/-/issues
87
+ [gitlab-merge-requests]: https://gitlab.cta-observatory.org/cta-computing/dpps/calibrationpipeline/calibpipe/-/merge_requests
88
+ [developers-commits]: https://chris.beams.io/posts/git-commit/
89
+ [gitlab-new-issue]: https://gitlab.cta-observatory.org/cta-computing/dpps/calibrationpipeline/calibpipe/-/issues/new
90
+ [pep8]: https://www.python.org/dev/peps/pep-0008/
91
+ [numpydoc]: https://numpydoc.readthedocs.io/en/latest/
@@ -0,0 +1,37 @@
1
+ # See https://testdriven.io/blog/docker-best-practices/ for recommendations
2
+ # on writing dockerfiles for python projects.
3
+
4
+ # We use a build stage to build a wheel which we then copy and install
5
+ # in the second stage to minimize image size. This is mostly needed
6
+ # because setuptools_scm needs the full version info from git and git
7
+ # itself but including that in the final image would bloat its size.
8
+
9
+ # we are using the official python image with just a version tag here
10
+ # it comes with many tools needed to build and compile python packages
11
+ # which increases it's size but is helpful for building
12
+ FROM harbor.cta-observatory.org/proxy_cache/python:3.12 AS builder
13
+
14
+
15
+ # Copy full repo, needed for setuptools_scm to properly report version
16
+ COPY . /repo/
17
+
18
+ # build the wheel
19
+ RUN python -m pip install --no-cache-dir build && cd repo && python -m build --wheel
20
+
21
+
22
+ # second stage, copy and install wheel
23
+ # We are using the official python 3.11 image
24
+ # as base image in the slim variant to reduce image size.
25
+ FROM harbor.cta-observatory.org/proxy_cache/python:3.12-slim
26
+ COPY --from=builder /repo/dist /tmp/dist
27
+
28
+ RUN apt-get update && \
29
+ apt-get -y install gcc mono-mcs && \
30
+ apt-get -y install libeccodes-dev && \
31
+ rm -rf /var/lib/apt/lists/*
32
+
33
+ RUN python -m pip install --no-cache-dir /tmp/dist/* \
34
+ && rm -r /tmp/dist
35
+
36
+ RUN addgroup --system ctao && adduser --system --group ctao
37
+ USER ctao
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright 2022 CTA DPPS Calibration Pipeline Authors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,86 @@
1
+ Metadata-Version: 2.4
2
+ Name: ctao-calibpipe
3
+ Version: 0.1.0
4
+ Author: Leonid Burmistrov, Mykhailo Dalchenko, Antonio Di Pilato, Gabriel Emery, Tjark Miener, Gregoire Uhlrich, Georgios Voutsinas, Vadym Voitsekhovskyi
5
+ Classifier: License :: OSI Approved :: MIT License
6
+ Requires-Python: >=3.10
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ License-File: AUTHORS.md
10
+ Requires-Dist: astral
11
+ Requires-Dist: astropy
12
+ Requires-Dist: cdsapi
13
+ Requires-Dist: ctapipe>=0.18
14
+ Requires-Dist: h5py
15
+ Requires-Dist: molecularprofiles>=2.1.0
16
+ Requires-Dist: numpy
17
+ Requires-Dist: pandas
18
+ Requires-Dist: psycopg[binary]
19
+ Requires-Dist: pygrib
20
+ Requires-Dist: pyrdams>=3.0.1
21
+ Requires-Dist: requests>=2.27
22
+ Requires-Dist: requests
23
+ Requires-Dist: sqlalchemy>=2.0.1
24
+ Requires-Dist: traitlets
25
+ Provides-Extra: test
26
+ Requires-Dist: black>=22.5; extra == "test"
27
+ Requires-Dist: coverage-badge; extra == "test"
28
+ Requires-Dist: cwltool; extra == "test"
29
+ Requires-Dist: pylint>=2.15; extra == "test"
30
+ Requires-Dist: pytest-cov; extra == "test"
31
+ Requires-Dist: pytest-order; extra == "test"
32
+ Requires-Dist: pytest; extra == "test"
33
+ Requires-Dist: pyyaml; extra == "test"
34
+ Requires-Dist: pytest-requirements; extra == "test"
35
+ Provides-Extra: doc
36
+ Requires-Dist: linkify-it-py; extra == "doc"
37
+ Requires-Dist: myst-parser; extra == "doc"
38
+ Requires-Dist: nbsphinx; extra == "doc"
39
+ Requires-Dist: numpydoc; extra == "doc"
40
+ Requires-Dist: ctao-sphinx-theme; extra == "doc"
41
+ Requires-Dist: sphinx-argparse; extra == "doc"
42
+ Requires-Dist: sphinx-paramlinks; extra == "doc"
43
+ Requires-Dist: sphinx>=8.2.1; extra == "doc"
44
+ Requires-Dist: sphinx-changelog; extra == "doc"
45
+ Provides-Extra: dev
46
+ Requires-Dist: setuptools_scm; extra == "dev"
47
+ Requires-Dist: towncrier; extra == "dev"
48
+ Requires-Dist: pre-commit; extra == "dev"
49
+ Provides-Extra: all
50
+ Requires-Dist: ctao-calibpipe[dev,doc,test]; extra == "all"
51
+ Dynamic: license-file
52
+
53
+ # DPPS Calibration Pipeline
54
+
55
+ Welcome to `calibpipe` project. The project provides a selection of calibration tools
56
+ for CTA raw data calibration. For full details see [project documentation][calibpipe-doc].
57
+
58
+ ## Installation
59
+
60
+ ### Installation for users
61
+
62
+ Currently the package is under active development. First, create and activate a fresh conda environment:
63
+
64
+ ```
65
+ mamba create -n calibpipe -c conda-forge python==3.12 ctapipe
66
+ mamba activate calibpipe
67
+ ```
68
+ and then install `calibpipe` using `pip` and TestPyPI:
69
+
70
+ ```
71
+ pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ calibpipe
72
+ ```
73
+
74
+ ### Installation for developers
75
+
76
+ ## Contributing
77
+
78
+ If you would like to contribute to this project please start from reading the [Contributing Guidelines][contributing].
79
+ Then you can configure the project locally for development as outlined in the [Development Instructions][developing], and start to contribute.
80
+ If you develop a new tool, don't forget to add a corresponding record to the `[project.scripts]` section of `pyproject.toml`
81
+
82
+ Enjoy!
83
+
84
+ [contributing]:http://cta-computing.gitlab-pages.cta-observatory.org/dpps/calibrationpipeline/calibpipe/latest/development/index.html
85
+ [developing]:http://cta-computing.gitlab-pages.cta-observatory.org/dpps/calibrationpipeline/calibpipe/latest/getting_started/index.html#development-setup
86
+ [calibpipe-doc]:http://cta-computing.gitlab-pages.cta-observatory.org/dpps/calibrationpipeline/calibpipe/latest/index.html