ptr-editor 0.4.3__tar.gz → 1.0.0a2__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 (253) hide show
  1. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/.gitignore +15 -2
  2. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/PKG-INFO +67 -35
  3. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/README.md +38 -22
  4. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/pyproject.toml +74 -54
  5. ptr_editor-1.0.0a2/src/agm_attitude/__init__.py +115 -0
  6. ptr_editor-1.0.0a2/src/agm_attitude/block_attitude.py +360 -0
  7. ptr_editor-1.0.0a2/src/agm_attitude/boresights.py +292 -0
  8. ptr_editor-1.0.0a2/src/agm_attitude/directions.py +240 -0
  9. ptr_editor-1.0.0a2/src/agm_attitude/kinematics.py +201 -0
  10. ptr_editor-1.0.0a2/src/agm_attitude/offsets.py +447 -0
  11. ptr_editor-1.0.0a2/src/agm_attitude/phase_angles.py +301 -0
  12. ptr_editor-1.0.0a2/src/agm_attitude/slew.py +271 -0
  13. ptr_editor-1.0.0a2/src/agm_attitude/solvers/__init__.py +27 -0
  14. ptr_editor-1.0.0a2/src/agm_attitude/solvers/offpointing.py +549 -0
  15. ptr_editor-1.0.0a2/src/agm_attitude/solvers/ptwrapper_bracket.py +494 -0
  16. ptr_editor-1.0.0a2/src/agm_attitude/timeline.py +228 -0
  17. ptr_editor-1.0.0a2/src/juice_jsoc/__init__.py +15 -0
  18. ptr_editor-1.0.0a2/src/juice_jsoc/_base.py +318 -0
  19. ptr_editor-1.0.0a2/src/juice_jsoc/_html.py +384 -0
  20. ptr_editor-1.0.0a2/src/juice_jsoc/_schema.py +44 -0
  21. ptr_editor-1.0.0a2/src/juice_jsoc/_timeline.py +208 -0
  22. ptr_editor-1.0.0a2/src/juice_jsoc/_types.py +191 -0
  23. ptr_editor-1.0.0a2/src/juice_jsoc/apl/__init__.py +29 -0
  24. ptr_editor-1.0.0a2/src/juice_jsoc/apl/elements.py +349 -0
  25. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/juice_jsoc/diffing.py +27 -19
  26. ptr_editor-1.0.0a2/src/juice_jsoc/instruments.py +86 -0
  27. ptr_editor-1.0.0a2/src/juice_jsoc/itl/__init__.py +33 -0
  28. ptr_editor-1.0.0a2/src/juice_jsoc/itl/elements.py +223 -0
  29. ptr_editor-1.0.0a2/src/juice_jsoc/opl/__init__.py +38 -0
  30. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/juice_jsoc/opl/csv.py +15 -16
  31. ptr_editor-1.0.0a2/src/juice_jsoc/opl/elements.py +193 -0
  32. ptr_editor-1.0.0a2/src/juice_jsoc/soc_schemas/SOURCES.toml +99 -0
  33. ptr_editor-1.0.0a2/src/juice_jsoc/soc_schemas/__init__.py +87 -0
  34. ptr_editor-1.0.0a2/src/juice_jsoc/soc_schemas/jsoc-apl-schema-v01.json +153 -0
  35. ptr_editor-1.0.0a2/src/juice_jsoc/soc_schemas/jsoc-apl-schema-v03.json +199 -0
  36. ptr_editor-1.0.0a2/src/juice_jsoc/soc_schemas/jsoc-itl-schema-v01.json +343 -0
  37. ptr_editor-1.0.0a2/src/juice_jsoc/soc_schemas/jsoc-itl-schema-v02.json +341 -0
  38. ptr_editor-1.0.0a2/src/juice_jsoc/soc_schemas/jsoc-itl-schema-v03.json +424 -0
  39. ptr_editor-0.4.3/src/juice_jsoc/itl/jsoc-itl-schema.json → ptr_editor-1.0.0a2/src/juice_jsoc/soc_schemas/jsoc-itl-schema-v04.json +16 -42
  40. ptr_editor-1.0.0a2/src/juice_jsoc/soc_schemas/jsoc-opl-schema-v01.json +203 -0
  41. ptr_editor-1.0.0a2/src/juice_jsoc/soc_schemas/jsoc-opl-schema-v02.json +205 -0
  42. ptr_editor-1.0.0a2/src/juice_jsoc/soc_schemas/jsoc-opl-schema-v03.json +349 -0
  43. ptr_editor-1.0.0a2/src/juice_jsoc/soc_schemas/jsoc-opl-schema-v04.json +346 -0
  44. ptr_editor-0.4.3/src/juice_jsoc/opl/jsoc-opl-schema.json → ptr_editor-1.0.0a2/src/juice_jsoc/soc_schemas/jsoc-opl-schema-v05.json +1 -4
  45. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/__init__.py +32 -73
  46. ptr_editor-1.0.0a2/src/ptr_editor/agm/__init__.py +24 -0
  47. ptr_editor-0.4.3/src/ptr_editor/agm_config/agm_config.py → ptr_editor-1.0.0a2/src/ptr_editor/agm/configuration.py +88 -106
  48. ptr_editor-0.4.3/src/ptr_editor/elements/agm_config.py → ptr_editor-1.0.0a2/src/ptr_editor/agm/definitions.py +12 -20
  49. {ptr_editor-0.4.3/src/ptr_editor/agm_config → ptr_editor-1.0.0a2/src/ptr_editor/agm}/html.py +0 -38
  50. ptr_editor-1.0.0a2/src/ptr_editor/agm/names.py +209 -0
  51. ptr_editor-1.0.0a2/src/ptr_editor/agm/params.py +163 -0
  52. ptr_editor-0.4.3/src/ptr_editor/agm_config/agm_utils.py → ptr_editor-1.0.0a2/src/ptr_editor/agm/predefined.py +11 -10
  53. ptr_editor-1.0.0a2/src/ptr_editor/agm/scan_timing.py +271 -0
  54. ptr_editor-1.0.0a2/src/ptr_editor/cli/__init__.py +33 -0
  55. ptr_editor-1.0.0a2/src/ptr_editor/cli/_console.py +29 -0
  56. ptr_editor-1.0.0a2/src/ptr_editor/cli/commands/merge.py +136 -0
  57. {ptr_editor-0.4.3/src/ptr_cli → ptr_editor-1.0.0a2/src/ptr_editor/cli}/commands/validate.py +6 -3
  58. {ptr_editor-0.4.3/src/ptr_cli → ptr_editor-1.0.0a2/src/ptr_editor/cli}/commands/version.py +4 -3
  59. {ptr_editor-0.4.3/src/ptr_cli → ptr_editor-1.0.0a2/src/ptr_editor/cli}/main.py +4 -0
  60. ptr_editor-1.0.0a2/src/ptr_editor/core/introspection.py +29 -0
  61. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/core/logging.py +141 -83
  62. ptr_editor-1.0.0a2/src/ptr_editor/core/model.py +469 -0
  63. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/core/ptr_element.py +71 -88
  64. ptr_editor-1.0.0a2/src/ptr_editor/core/resolution.py +157 -0
  65. ptr_editor-1.0.0a2/src/ptr_editor/core/sentinels.py +84 -0
  66. ptr_editor-1.0.0a2/src/ptr_editor/core/stability.py +18 -0
  67. ptr_editor-1.0.0a2/src/ptr_editor/core/utils.py +121 -0
  68. ptr_editor-1.0.0a2/src/ptr_editor/core/xml_io.py +794 -0
  69. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/data/__init__.py +15 -8
  70. ptr_editor-1.0.0a2/src/ptr_editor/defaults.py +223 -0
  71. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/diffing/__init__.py +7 -2
  72. ptr_editor-1.0.0a2/src/ptr_editor/diffing/diff_report.py +9 -0
  73. ptr_editor-1.0.0a2/src/ptr_editor/diffing/matcher.py +89 -0
  74. ptr_editor-1.0.0a2/src/ptr_editor/diffing/timeline_differ_simple.py +27 -0
  75. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/elements/__init__.py +4 -27
  76. ptr_editor-1.0.0a2/src/ptr_editor/elements/array.py +99 -0
  77. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/elements/attitude.py +166 -74
  78. ptr_editor-1.0.0a2/src/ptr_editor/elements/blocks.py +763 -0
  79. ptr_editor-0.4.3/src/ptr_editor/core/codenames_gen.py → ptr_editor-1.0.0a2/src/ptr_editor/elements/codenames.py +6 -6
  80. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/elements/directions.py +33 -21
  81. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/elements/doc.py +1 -5
  82. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/elements/metadata.py +113 -464
  83. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/elements/offset.py +141 -44
  84. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/elements/offset_builder.py +4 -69
  85. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/elements/phase_angle.py +115 -33
  86. ptr_editor-1.0.0a2/src/ptr_editor/elements/solvable.py +188 -0
  87. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/elements/surface.py +3 -6
  88. ptr_editor-1.0.0a2/src/ptr_editor/elements/timeline.py +1322 -0
  89. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/elements/values.py +52 -23
  90. ptr_editor-1.0.0a2/src/ptr_editor/experimental.py +60 -0
  91. ptr_editor-1.0.0a2/src/ptr_editor/factory/blocks.py +12 -0
  92. ptr_editor-1.0.0a2/src/ptr_editor/generators/__init__.py +6 -0
  93. ptr_editor-1.0.0a2/src/ptr_editor/generators/base.py +17 -0
  94. ptr_editor-1.0.0a2/src/ptr_editor/generators/generators.py +110 -0
  95. ptr_editor-1.0.0a2/src/ptr_editor/html.py +310 -0
  96. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/io/__init__.py +48 -21
  97. ptr_editor-1.0.0a2/src/ptr_editor/io/fidelity.py +363 -0
  98. ptr_editor-1.0.0a2/src/ptr_editor/io/simplified_converter2.py +134 -0
  99. ptr_editor-1.0.0a2/src/ptr_editor/merging.py +280 -0
  100. ptr_editor-1.0.0a2/src/ptr_editor/samples/__init__.py +266 -0
  101. ptr_editor-1.0.0a2/src/ptr_editor/samples/data/PTR_SJS0004C50A_v1.3.ptx.gz +0 -0
  102. ptr_editor-1.0.0a2/src/ptr_editor/samples/data/PTR_SJS0004C50A_v1.3_resolved.ptx.gz +0 -0
  103. ptr_editor-1.0.0a2/src/ptr_editor/samples/data/PTR_SOC_S007_01_S06P00.ptx.gz +0 -0
  104. ptr_editor-1.0.0a2/src/ptr_editor/samples/data/PTR_SOC_S008_01_S11P00.ptx.gz +0 -0
  105. ptr_editor-1.0.0a2/src/ptr_editor/samples/data/PTR_SOC_S008_01_S11P00_resolved.ptx.gz +0 -0
  106. ptr_editor-1.0.0a2/src/ptr_editor/samples/data/PTR_SOC_S011_01_S09P00.ptx.gz +0 -0
  107. ptr_editor-1.0.0a2/src/ptr_editor/samples/data/PTR_SOC_S011_01_S09P00_resolved.ptx.gz +0 -0
  108. ptr_editor-1.0.0a2/src/ptr_editor/samples/data/catalog.json +120 -0
  109. ptr_editor-1.0.0a2/src/ptr_editor/services.py +85 -0
  110. ptr_editor-1.0.0a2/src/ptr_editor/solver/__init__.py +19 -0
  111. {ptr_editor-0.4.3/src/ptr_solver → ptr_editor-1.0.0a2/src/ptr_editor/solver}/cached_solver.py +41 -47
  112. ptr_editor-1.0.0a2/src/ptr_editor/solver/metakernel.py +172 -0
  113. ptr_editor-1.0.0a2/src/ptr_editor/solver/run.py +890 -0
  114. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/templates/__init__.py +1 -1
  115. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/templates/html.py +2 -2
  116. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/templates/register.py +30 -141
  117. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/templates/template.py +1 -1
  118. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/validation/README.md +4 -3
  119. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/validation/html.py +10 -3
  120. ptr_editor-1.0.0a2/src/ptr_editor/validation/ptr_validators.py +1277 -0
  121. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/validation/result.py +5 -2
  122. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/validation/ruleset_registry.py +4 -0
  123. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/validation/runner.py +12 -9
  124. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/validation/validator.py +0 -4
  125. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/versioned_file_manager/manager.py +20 -21
  126. ptr_editor-1.0.0a2/src/ptr_editor/viewer/__init__.py +6 -0
  127. ptr_editor-1.0.0a2/src/ptr_editor/viewer/data.py +514 -0
  128. ptr_editor-1.0.0a2/src/ptr_editor/viewer/layers.py +337 -0
  129. ptr_editor-1.0.0a2/src/ptr_editor/viewer/stars_bsc5.npy +0 -0
  130. ptr_editor-1.0.0a2/src/ptr_editor/viewer/viewer.css +43 -0
  131. ptr_editor-1.0.0a2/src/ptr_editor/viewer/viewer.js +597 -0
  132. ptr_editor-1.0.0a2/src/ptr_editor/viewer/widget.py +372 -0
  133. ptr_editor-1.0.0a2/src/time_segments/__init__.py +10 -0
  134. ptr_editor-1.0.0a2/src/time_segments/diffing/__init__.py +95 -0
  135. ptr_editor-0.4.3/src/ptr_editor/diffing/timeline_differ_simple.py → ptr_editor-1.0.0a2/src/time_segments/diffing/differ.py +125 -67
  136. {ptr_editor-0.4.3/src/ptr_editor → ptr_editor-1.0.0a2/src/time_segments}/diffing/matcher.py +64 -158
  137. ptr_editor-0.4.3/src/ptr_editor/diffing/diff_report.py → ptr_editor-1.0.0a2/src/time_segments/diffing/report.py +190 -102
  138. ptr_editor-0.4.3/src/ptr_editor/diffing/text_diff_result.py → ptr_editor-1.0.0a2/src/time_segments/diffing/text_diff.py +3 -3
  139. ptr_editor-1.0.0a2/src/time_segments/diffing/token_diff.py +282 -0
  140. ptr_editor-1.0.0a2/src/time_segments/diffing/value_diff.py +538 -0
  141. {ptr_editor-0.4.3/src/ptr_editor → ptr_editor-1.0.0a2/src/time_segments}/diffing/visualize.py +39 -617
  142. ptr_editor-1.0.0a2/src/time_segments/interface.py +21 -0
  143. ptr_editor-1.0.0a2/src/time_segments/merge3.py +225 -0
  144. ptr_editor-1.0.0a2/src/time_segments/merging.py +1510 -0
  145. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/time_segments/ops.py +4 -3
  146. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/time_segments/plot.py +18 -5
  147. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/time_segments/segment_mixin.py +41 -23
  148. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/time_segments/segments_collection_mixin.py +143 -148
  149. ptr_editor-1.0.0a2/src/time_segments/tabular.py +227 -0
  150. ptr_editor-1.0.0a2/src/time_segments/utils.py +95 -0
  151. ptr_editor-0.4.3/src/attrs_xml/README.md +0 -211
  152. ptr_editor-0.4.3/src/attrs_xml/__init__.py +0 -79
  153. ptr_editor-0.4.3/src/attrs_xml/core/__init__.py +0 -30
  154. ptr_editor-0.4.3/src/attrs_xml/core/base_element.py +0 -188
  155. ptr_editor-0.4.3/src/attrs_xml/core/converter_factory.py +0 -88
  156. ptr_editor-0.4.3/src/attrs_xml/core/decorators.py +0 -137
  157. ptr_editor-0.4.3/src/attrs_xml/core/decorators_utils.py +0 -30
  158. ptr_editor-0.4.3/src/attrs_xml/core/field_transformer.py +0 -270
  159. ptr_editor-0.4.3/src/attrs_xml/core/fields.py +0 -83
  160. ptr_editor-0.4.3/src/attrs_xml/core/inspect.py +0 -18
  161. ptr_editor-0.4.3/src/attrs_xml/core/protocols.py +0 -48
  162. ptr_editor-0.4.3/src/attrs_xml/core/sentinels.py +0 -91
  163. ptr_editor-0.4.3/src/attrs_xml/core/type_utils.py +0 -156
  164. ptr_editor-0.4.3/src/attrs_xml/core/validator_factory.py +0 -305
  165. ptr_editor-0.4.3/src/attrs_xml/elements_registry.py +0 -376
  166. ptr_editor-0.4.3/src/attrs_xml/formatting.py +0 -129
  167. ptr_editor-0.4.3/src/attrs_xml/globals.py +0 -39
  168. ptr_editor-0.4.3/src/attrs_xml/pandas.py +0 -295
  169. ptr_editor-0.4.3/src/attrs_xml/resolution/__init__.py +0 -45
  170. ptr_editor-0.4.3/src/attrs_xml/resolution/registry.py +0 -418
  171. ptr_editor-0.4.3/src/attrs_xml/resolution/strategies.py +0 -614
  172. ptr_editor-0.4.3/src/attrs_xml/xml/__init__.py +0 -28
  173. ptr_editor-0.4.3/src/attrs_xml/xml/converter.py +0 -751
  174. ptr_editor-0.4.3/src/attrs_xml/xml/converters.py +0 -66
  175. ptr_editor-0.4.3/src/attrs_xml/xml/custom_disambiguator.py +0 -299
  176. ptr_editor-0.4.3/src/attrs_xml/xml/io.py +0 -538
  177. ptr_editor-0.4.3/src/attrs_xml/xml/lxml_adapter.py +0 -229
  178. ptr_editor-0.4.3/src/attrs_xml/xml/utils.py +0 -77
  179. ptr_editor-0.4.3/src/juice_jsoc/__init__.py +0 -19
  180. ptr_editor-0.4.3/src/juice_jsoc/apl/__init__.py +0 -42
  181. ptr_editor-0.4.3/src/juice_jsoc/apl/elements.py +0 -737
  182. ptr_editor-0.4.3/src/juice_jsoc/base.py +0 -27
  183. ptr_editor-0.4.3/src/juice_jsoc/itl/__init__.py +0 -46
  184. ptr_editor-0.4.3/src/juice_jsoc/itl/elements.py +0 -1091
  185. ptr_editor-0.4.3/src/juice_jsoc/opl/__init__.py +0 -46
  186. ptr_editor-0.4.3/src/juice_jsoc/opl/elements.py +0 -1161
  187. ptr_editor-0.4.3/src/juice_jsoc/schema.py +0 -160
  188. ptr_editor-0.4.3/src/juice_jsoc/utils.py +0 -51
  189. ptr_editor-0.4.3/src/juice_opl/__init__.py +0 -39
  190. ptr_editor-0.4.3/src/ptr_cli/__init__.py +0 -5
  191. ptr_editor-0.4.3/src/ptr_compare/__init__.py +0 -428
  192. ptr_editor-0.4.3/src/ptr_editor/accessors/accessor.py +0 -53
  193. ptr_editor-0.4.3/src/ptr_editor/accessors/attrs_dict_accessor.py +0 -328
  194. ptr_editor-0.4.3/src/ptr_editor/agm_config/__init__.py +0 -1
  195. ptr_editor-0.4.3/src/ptr_editor/agm_validator/__init__.py +0 -28
  196. ptr_editor-0.4.3/src/ptr_editor/agm_validator/agm_config_validator.py +0 -278
  197. ptr_editor-0.4.3/src/ptr_editor/context/README.md +0 -434
  198. ptr_editor-0.4.3/src/ptr_editor/context/__init__.py +0 -98
  199. ptr_editor-0.4.3/src/ptr_editor/context/defaults.py +0 -447
  200. ptr_editor-0.4.3/src/ptr_editor/context/presets.py +0 -58
  201. ptr_editor-0.4.3/src/ptr_editor/context/service_config.py +0 -496
  202. ptr_editor-0.4.3/src/ptr_editor/context/services.py +0 -262
  203. ptr_editor-0.4.3/src/ptr_editor/core/__init__.py +0 -0
  204. ptr_editor-0.4.3/src/ptr_editor/core/tree_utils.py +0 -208
  205. ptr_editor-0.4.3/src/ptr_editor/elements/additional_elements.py +0 -12
  206. ptr_editor-0.4.3/src/ptr_editor/elements/array.py +0 -83
  207. ptr_editor-0.4.3/src/ptr_editor/elements/blocks.py +0 -688
  208. ptr_editor-0.4.3/src/ptr_editor/elements/ref_typed_mixin.py +0 -14
  209. ptr_editor-0.4.3/src/ptr_editor/elements/timeline.py +0 -1257
  210. ptr_editor-0.4.3/src/ptr_editor/elements_extractor/__init__.py +0 -88
  211. ptr_editor-0.4.3/src/ptr_editor/extra/__init__.py +0 -7
  212. ptr_editor-0.4.3/src/ptr_editor/extra/add_block_comments.py +0 -119
  213. ptr_editor-0.4.3/src/ptr_editor/factory/attitudes.py +0 -490
  214. ptr_editor-0.4.3/src/ptr_editor/factory/blocks.py +0 -148
  215. ptr_editor-0.4.3/src/ptr_editor/generators/__init__.py +0 -8
  216. ptr_editor-0.4.3/src/ptr_editor/generators/base.py +0 -51
  217. ptr_editor-0.4.3/src/ptr_editor/generators/generators.py +0 -88
  218. ptr_editor-0.4.3/src/ptr_editor/generators/processor.py +0 -210
  219. ptr_editor-0.4.3/src/ptr_editor/html.py +0 -712
  220. ptr_editor-0.4.3/src/ptr_editor/io/ptr_converter_setup.py +0 -21
  221. ptr_editor-0.4.3/src/ptr_editor/io/simplified_converter.py +0 -375
  222. ptr_editor-0.4.3/src/ptr_editor/io/simplified_converter2.py +0 -91
  223. ptr_editor-0.4.3/src/ptr_editor/io/xml_formatting.py +0 -156
  224. ptr_editor-0.4.3/src/ptr_editor/services/__init__.py +0 -254
  225. ptr_editor-0.4.3/src/ptr_editor/services/quick_access.py +0 -184
  226. ptr_editor-0.4.3/src/ptr_editor/services/resolution_strategies.py +0 -281
  227. ptr_editor-0.4.3/src/ptr_editor/spice_accessors/__init__.py +0 -1
  228. ptr_editor-0.4.3/src/ptr_editor/spice_accessors/directions.py +0 -56
  229. ptr_editor-0.4.3/src/ptr_editor/spice_accessors/eval_directions.py +0 -166
  230. ptr_editor-0.4.3/src/ptr_editor/validation/ptr_validators.py +0 -1033
  231. ptr_editor-0.4.3/src/ptr_solver/__init__.py +0 -5
  232. ptr_editor-0.4.3/src/ptr_solver/ptr_solver.py +0 -529
  233. ptr_editor-0.4.3/src/ptr_solver/solvable_mixin.py +0 -143
  234. ptr_editor-0.4.3/src/time_segments/__init__.py +0 -31
  235. ptr_editor-0.4.3/src/time_segments/config.py +0 -20
  236. ptr_editor-0.4.3/src/time_segments/interface.py +0 -28
  237. ptr_editor-0.4.3/src/time_segments/merging.py +0 -2828
  238. ptr_editor-0.4.3/src/time_segments/opl.py +0 -92
  239. ptr_editor-0.4.3/src/time_segments/utils.py +0 -28
  240. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/LICENSE +0 -0
  241. /ptr_editor-0.4.3/src/juice_jsoc/apl/jsoc-apl-schema.json → /ptr_editor-1.0.0a2/src/juice_jsoc/soc_schemas/jsoc-apl-schema-v02.json +0 -0
  242. {ptr_editor-0.4.3/src/ptr_cli → ptr_editor-1.0.0a2/src/ptr_editor/cli}/README.md +0 -0
  243. {ptr_editor-0.4.3/src/ptr_cli → ptr_editor-1.0.0a2/src/ptr_editor/cli}/commands/__init__.py +0 -0
  244. {ptr_editor-0.4.3/src/ptr_editor/accessors → ptr_editor-1.0.0a2/src/ptr_editor/core}/__init__.py +0 -0
  245. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/data/snippets.txt +0 -0
  246. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/elements/units.py +0 -0
  247. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/factory/__init__.py +0 -0
  248. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/py.typed +0 -0
  249. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/validation/__init__.py +0 -0
  250. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/validation/combinators.py +0 -0
  251. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/versioned_file_manager/__init__.py +0 -0
  252. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/versioned_file_manager/file_info.py +0 -0
  253. {ptr_editor-0.4.3 → ptr_editor-1.0.0a2}/src/ptr_editor/versioned_file_manager/html.py +0 -0
@@ -69,15 +69,28 @@ venv.bak/
69
69
  # Rope project settings
70
70
  .ropeproject
71
71
 
72
- # mkdocs documentation
73
- /site
74
72
 
75
73
  # mypy
76
74
  .mypy_cache/
77
75
 
78
76
  # IDEs
79
77
  .idea/
78
+ .vscode/
79
+ *.code-workspace
80
+
81
+ # pytest-benchmark result cache
82
+ .benchmarks/
83
+
84
+ # personal scratch / throwaway debugging artifacts, not meant to be committed
85
+ /scratch/
80
86
 
81
87
  # MyST build outputs
82
88
  _build
83
89
  *.html
90
+
91
+ # Files written by the tutorial notebooks (nbmake runs)
92
+ tutorial/timeline.ptx
93
+ tutorial/PTR_SOC_S008_01_S09P00.ptx
94
+ tutorial/tutorial_opl_demo.json
95
+ tutorial/viewer_ganymede_flyby.html
96
+ tutorial/contrib/usable.json
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ptr-editor
3
- Version: 0.4.3
3
+ Version: 1.0.0a2
4
4
  Summary: Utilities to edit PTR files.
5
- Project-URL: documentation, https://luca-penasa.github.io/ptr-editor
6
- Project-URL: homepage, https://luca-penasa.github.io/ptr-editor
5
+ Project-URL: documentation, https://juice-soc-public.io.esa.int/python/ptr-editor/main/
6
+ Project-URL: homepage, https://gitlab.esa.int/juice-soc-public/python/ptr-editor
7
7
  Project-URL: repository, https://github.com/luca-penasa/ptr-editor
8
8
  Author-email: Luca Penasa <luca.penasa@inaf.it>, Benoît Seignovert <benoit.seignovert@univ-nantes.fr>
9
9
  License-Expression: MIT
@@ -19,25 +19,41 @@ Classifier: Programming Language :: Python :: 3.13
19
19
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
20
  Classifier: Typing :: Typed
21
21
  Requires-Python: <4.0,>=3.11
22
- Requires-Dist: cattrs>=24
23
- Requires-Dist: haikunator>=2.1.0
24
- Requires-Dist: importlib-metadata<9,>=8.5.0
22
+ Requires-Dist: attrs>=24
25
23
  Requires-Dist: jsonschema>=4.0.0
26
24
  Requires-Dist: loguru<0.8,>=0.7.2
27
25
  Requires-Dist: lxml>=6.0.2
28
- Requires-Dist: openpyxl>=3.1.5
29
- Requires-Dist: pandas<3,>=2.2.3
26
+ Requires-Dist: numpy<2.5
27
+ Requires-Dist: pandas<4,>=2.2.3
30
28
  Requires-Dist: pint>=0.24.4
31
29
  Requires-Dist: planetary-coverage>=1.2.0
32
30
  Requires-Dist: platformdirs>=4.4.0
33
- Requires-Dist: plotly>=5
34
31
  Requires-Dist: ptwrapper>=2.7.0
32
+ Requires-Dist: pydantic<3,>=2.11
35
33
  Requires-Dist: python-dotenv>=1.0.0
36
- Requires-Dist: pyyaml>=6.0.3
37
- Requires-Dist: quick-spice-manager>=0.2.0
34
+ Requires-Dist: quick-spice-manager>=0.2.5
38
35
  Requires-Dist: requests-cache>=1.2.1
39
- Requires-Dist: requests>=2.31.0
40
- Requires-Dist: xmldiff>=2.7.0
36
+ Requires-Dist: spiceypy>=5
37
+ Provides-Extra: all
38
+ Requires-Dist: anywidget>=0.9; extra == 'all'
39
+ Requires-Dist: astropy>=7.1.1; extra == 'all'
40
+ Requires-Dist: matplotlib>=3.7; extra == 'all'
41
+ Requires-Dist: openpyxl>=3.1.5; extra == 'all'
42
+ Requires-Dist: plotly>=5; extra == 'all'
43
+ Requires-Dist: rich>=13.0.0; extra == 'all'
44
+ Requires-Dist: typer>=0.20.0; extra == 'all'
45
+ Provides-Extra: cli
46
+ Requires-Dist: rich>=13.0.0; extra == 'cli'
47
+ Requires-Dist: typer>=0.20.0; extra == 'cli'
48
+ Provides-Extra: excel
49
+ Requires-Dist: openpyxl>=3.1.5; extra == 'excel'
50
+ Provides-Extra: generators
51
+ Requires-Dist: astropy>=7.1.1; extra == 'generators'
52
+ Provides-Extra: plot
53
+ Requires-Dist: matplotlib>=3.7; extra == 'plot'
54
+ Requires-Dist: plotly>=5; extra == 'plot'
55
+ Provides-Extra: viewer
56
+ Requires-Dist: anywidget>=0.9; extra == 'viewer'
41
57
  Description-Content-Type: text/markdown
42
58
 
43
59
  # Ptr Editor
@@ -52,7 +68,7 @@ Description-Content-Type: text/markdown
52
68
 
53
69
  **Documentation**: [https://juice-soc-public.io.esa.int/python/ptr-editor/main/](https://juice-soc-public.io.esa.int/python/ptr-editor/main/)
54
70
 
55
- **Source Code**: [https://juice-soc-public.io.esa.int/python/ptr-editor/main/](https://gitlab.esa.int/juice-soc-public/python/ptr-editor)
71
+ **Source Code**: [https://gitlab.esa.int/juice-soc-public/python/ptr-editor](https://gitlab.esa.int/juice-soc-public/python/ptr-editor)
56
72
 
57
73
  **PyPI**: [https://pypi.org/project/ptr-editor/](https://pypi.org/project/ptr-editor/)
58
74
 
@@ -88,7 +104,18 @@ ptr-editor validate path/to/file.ptx
88
104
 
89
105
  ### Logging
90
106
 
91
- By default, logging is disabled in non-Jupyter environments and set to WARNING level in Jupyter notebooks. You can configure the log level using a `.env` file:
107
+ ptr-editor shows its warnings, and those of quick-spice-manager (which downloads the SPICE
108
+ kernels: an unreachable server, a fallback to cached kernels, a failed download), without
109
+ any setup: as HTML in Jupyter, on stderr elsewhere. Your own loguru handlers are kept.
110
+
111
+ ```python
112
+ import ptr_editor
113
+
114
+ ptr_editor.set_logger_level("ERROR") # errors only
115
+ ptr_editor.set_logger_level("INFO", "quick_spice_manager") # the kernels' progress too
116
+ ```
117
+
118
+ You can also set ptr-editor's level with a `.env` file:
92
119
 
93
120
  1. Copy the example environment file:
94
121
  ```sh
@@ -119,7 +146,7 @@ import ptr_editor
119
146
  * Clone this repository
120
147
  * Requirements:
121
148
  * [uv](https://docs.astral.sh/uv/)
122
- * Python 3.10+
149
+ * Python 3.11+
123
150
  * Create a virtual environment and install the dependencies, by:
124
151
 
125
152
  ```sh
@@ -148,20 +175,28 @@ uv run pytest
148
175
 
149
176
  ### Documentation
150
177
 
151
- Documentation is currently available [here](https://juice-soc-public.io.esa.int/python/ptr-editor/main/), as part of the tutorials verion.
152
-
153
- > to be updated:
154
- >The documentation is automatically generated from the content of the [docs directory](https://github.com/luca-penasa/ptr-editor/tree/master/docs) and from the docstrings
155
- of the public signatures of the source code. The documentation is updated and published as a [Github Pages page](https://pages.github.com/) automatically as part each release.
156
-
157
- ### Tutorials
158
-
159
- A collection of example notebooks is available in the [`tutorial`](tutorial/) folder and distributed in [Gitlab Pages](#) though the CI. They can be rebuild them locally with:
178
+ The user manual is the Jupyter Book in [`tutorial/`](tutorial/): a quick start, a guide by task, examples, a cheat sheet and the API
179
+ reference (built from the docstrings). The GitLab CI publishes it on every push to `main` at
180
+ <https://juice-soc-public.io.esa.int/python/ptr-editor/main/>. To build it locally:
160
181
 
161
182
  ```bash
162
- uv run --group tutorials jupyter book start
183
+ just docs # multi-page HTML -> tutorial/_build/html/index.html
184
+ just docs-single # one HTML page -> tutorial/_build/singlehtml/index.html
185
+ just docs-pdf # PDF -> tutorial/_build/pdf/ptr-editor.pdf
186
+ just docs-downloads # the site as published, with the manual to download (one
187
+ # self-contained HTML page and the PDF, named with the version)
188
+ # in tutorial/_build/html/downloads/, linked from the front page
163
189
  ```
164
190
 
191
+ Every build executes the notebooks first. The PDF and the downloads print the single page
192
+ with headless Chromium: run `uv run --group docs playwright install chromium` once, and keep
193
+ the network on (the figures load plotly.js from its CDN; in the downloadable page they are
194
+ images, and the page opens offline).
195
+
196
+ The notebooks are also tests: `uv run pytest tutorial` runs the ones listed in `tutorial/_toc.yml`.
197
+
198
+ Developer notes (AGM internals, reverse-engineering method, testing strategy) are in
199
+ [`docs/dev/`](docs/dev/). They are not published.
165
200
 
166
201
  ### Releasing
167
202
 
@@ -224,16 +259,13 @@ Or if you want e.g. want to run all checks manually for all files:
224
259
  pre-commit run --all-files
225
260
  ```
226
261
 
227
- ## Development Tools
228
-
229
- This project was developed with assistance from AI tools, particularly **Claude Sonnet 3.5**, which was used extensively for:
230
-
231
- - Initial boilerplate code creation
232
- - Bootstrapping the test suite
233
- - General text file editing and modification
234
- - Code refactoring and improvements
262
+ ## How this project is developed
235
263
 
236
- While AI tools provided significant assistance in accelerating development, all code has been reviewed, tested, and integrated by human developers.
264
+ ptr-editor is developed with the help of AI coding assistants (large language models). They are
265
+ used to write and refactor code, tests and documentation, under the direction of the developers,
266
+ who review every change. What keeps it correct is the test suite, not the tool: it covers the
267
+ public API, runs every docstring example and tutorial notebook, and checks the attitude behaviour
268
+ against the AGM itself (OSVE). If something looks wrong, please report it.
237
269
 
238
270
  ---
239
271
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  **Documentation**: [https://juice-soc-public.io.esa.int/python/ptr-editor/main/](https://juice-soc-public.io.esa.int/python/ptr-editor/main/)
12
12
 
13
- **Source Code**: [https://juice-soc-public.io.esa.int/python/ptr-editor/main/](https://gitlab.esa.int/juice-soc-public/python/ptr-editor)
13
+ **Source Code**: [https://gitlab.esa.int/juice-soc-public/python/ptr-editor](https://gitlab.esa.int/juice-soc-public/python/ptr-editor)
14
14
 
15
15
  **PyPI**: [https://pypi.org/project/ptr-editor/](https://pypi.org/project/ptr-editor/)
16
16
 
@@ -46,7 +46,18 @@ ptr-editor validate path/to/file.ptx
46
46
 
47
47
  ### Logging
48
48
 
49
- By default, logging is disabled in non-Jupyter environments and set to WARNING level in Jupyter notebooks. You can configure the log level using a `.env` file:
49
+ ptr-editor shows its warnings, and those of quick-spice-manager (which downloads the SPICE
50
+ kernels: an unreachable server, a fallback to cached kernels, a failed download), without
51
+ any setup: as HTML in Jupyter, on stderr elsewhere. Your own loguru handlers are kept.
52
+
53
+ ```python
54
+ import ptr_editor
55
+
56
+ ptr_editor.set_logger_level("ERROR") # errors only
57
+ ptr_editor.set_logger_level("INFO", "quick_spice_manager") # the kernels' progress too
58
+ ```
59
+
60
+ You can also set ptr-editor's level with a `.env` file:
50
61
 
51
62
  1. Copy the example environment file:
52
63
  ```sh
@@ -77,7 +88,7 @@ import ptr_editor
77
88
  * Clone this repository
78
89
  * Requirements:
79
90
  * [uv](https://docs.astral.sh/uv/)
80
- * Python 3.10+
91
+ * Python 3.11+
81
92
  * Create a virtual environment and install the dependencies, by:
82
93
 
83
94
  ```sh
@@ -106,20 +117,28 @@ uv run pytest
106
117
 
107
118
  ### Documentation
108
119
 
109
- Documentation is currently available [here](https://juice-soc-public.io.esa.int/python/ptr-editor/main/), as part of the tutorials verion.
110
-
111
- > to be updated:
112
- >The documentation is automatically generated from the content of the [docs directory](https://github.com/luca-penasa/ptr-editor/tree/master/docs) and from the docstrings
113
- of the public signatures of the source code. The documentation is updated and published as a [Github Pages page](https://pages.github.com/) automatically as part each release.
114
-
115
- ### Tutorials
116
-
117
- A collection of example notebooks is available in the [`tutorial`](tutorial/) folder and distributed in [Gitlab Pages](#) though the CI. They can be rebuild them locally with:
120
+ The user manual is the Jupyter Book in [`tutorial/`](tutorial/): a quick start, a guide by task, examples, a cheat sheet and the API
121
+ reference (built from the docstrings). The GitLab CI publishes it on every push to `main` at
122
+ <https://juice-soc-public.io.esa.int/python/ptr-editor/main/>. To build it locally:
118
123
 
119
124
  ```bash
120
- uv run --group tutorials jupyter book start
125
+ just docs # multi-page HTML -> tutorial/_build/html/index.html
126
+ just docs-single # one HTML page -> tutorial/_build/singlehtml/index.html
127
+ just docs-pdf # PDF -> tutorial/_build/pdf/ptr-editor.pdf
128
+ just docs-downloads # the site as published, with the manual to download (one
129
+ # self-contained HTML page and the PDF, named with the version)
130
+ # in tutorial/_build/html/downloads/, linked from the front page
121
131
  ```
122
132
 
133
+ Every build executes the notebooks first. The PDF and the downloads print the single page
134
+ with headless Chromium: run `uv run --group docs playwright install chromium` once, and keep
135
+ the network on (the figures load plotly.js from its CDN; in the downloadable page they are
136
+ images, and the page opens offline).
137
+
138
+ The notebooks are also tests: `uv run pytest tutorial` runs the ones listed in `tutorial/_toc.yml`.
139
+
140
+ Developer notes (AGM internals, reverse-engineering method, testing strategy) are in
141
+ [`docs/dev/`](docs/dev/). They are not published.
123
142
 
124
143
  ### Releasing
125
144
 
@@ -182,16 +201,13 @@ Or if you want e.g. want to run all checks manually for all files:
182
201
  pre-commit run --all-files
183
202
  ```
184
203
 
185
- ## Development Tools
186
-
187
- This project was developed with assistance from AI tools, particularly **Claude Sonnet 3.5**, which was used extensively for:
188
-
189
- - Initial boilerplate code creation
190
- - Bootstrapping the test suite
191
- - General text file editing and modification
192
- - Code refactoring and improvements
204
+ ## How this project is developed
193
205
 
194
- While AI tools provided significant assistance in accelerating development, all code has been reviewed, tested, and integrated by human developers.
206
+ ptr-editor is developed with the help of AI coding assistants (large language models). They are
207
+ used to write and refactor code, tests and documentation, under the direction of the developers,
208
+ who review every change. What keeps it correct is the test suite, not the tool: it covers the
209
+ public API, runs every docstring example and tutorial notebook, and checks the attitude behaviour
210
+ against the AGM itself (OSVE). If something looks wrong, please report it.
195
211
 
196
212
  ---
197
213
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ptr-editor"
3
- version = "0.4.3"
3
+ version = "1.0.0a2"
4
4
  description = "Utilities to edit PTR files."
5
5
  authors = [
6
6
  { name = "Luca Penasa", email = "luca.penasa@inaf.it" },
@@ -24,52 +24,63 @@ classifiers = [
24
24
  ]
25
25
 
26
26
  dependencies = [
27
- "importlib-metadata>=8.5.0,<9",
27
+ "attrs>=24",
28
28
  "loguru>=0.7.2,<0.8",
29
- "pandas>=2.2.3,<3",
30
- "cattrs>=24",
31
- "ptwrapper>=2.7.0",
32
- "planetary-coverage>=1.2.0",
29
+ "lxml>=6.0.2",
30
+ # pandas 2 and 3 are both supported (TASK-9): some environments are held on pandas 2
31
+ # (juice-notebooks: pylabeladjust needs pandas<3). The suite runs on both.
32
+ "pandas>=2.2.3,<4",
33
+ # pandas 2 with numpy 2.5 deprecates generic timedelta units on every Timedelta
34
+ # operation (an error in a later numpy). A cap cannot depend on the pandas version, so
35
+ # it applies to all until pandas 2 is dropped; numpy 2.4 works with pandas 3.
36
+ "numpy<2.5",
33
37
  "pint>=0.24.4",
34
- "requests-cache>=1.2.1",
35
38
  "platformdirs>=4.4.0",
36
- "pyyaml>=6.0.3",
37
- "plotly>=5",
38
- "openpyxl>=3.1.5", # to support excel files
39
- "lxml>=6.0.2",
40
- # "numpy<=1.26.4", # needed for ptwrapper to work properly: see https://gitlab.esa.int/juice-soc-public/python/ptwrapper/-/issues/2
41
- "haikunator>=2.1.0",
42
- "python-dotenv>=1.0.0",
43
- "quick-spice-manager>=0.2.0",
44
- "xmldiff>=2.7.0",
45
- "jsonschema>=4.0.0",
46
- "requests>=2.31.0",
39
+ "pydantic>=2.11,<3", # PTR element model
40
+ "python-dotenv>=1.0.0", # .env settings, read when the logger is set up
41
+ "requests-cache>=1.2.1",
42
+ "jsonschema>=4.0.0", # juice_jsoc: validate=True checks the SOC schema
43
+ # Solving and geometry: every timed block can be solved, so these are not optional.
44
+ "ptwrapper>=2.7.0",
45
+ "planetary-coverage>=1.2.0",
46
+ "quick-spice-manager>=0.2.5",
47
+ "spiceypy>=5",
47
48
  ]
48
49
 
50
+ [project.optional-dependencies]
51
+ cli = [
52
+ "typer>=0.20.0",
53
+ "rich>=13.0.0",
54
+ ]
55
+ plot = [
56
+ "plotly>=5", # Timeline.plot, time_segments plots
57
+ "matplotlib>=3.7", # diffing match plots and reports
58
+ ]
59
+ excel = [
60
+ "openpyxl>=3.1.5", # DataFrame.to_excel on validation and diff tables
61
+ ]
62
+ generators = [
63
+ "astropy>=7.1.1", # sky-coordinate generators
64
+ ]
65
+ viewer = [
66
+ "anywidget>=0.9", # experimental attitude viewer widget (TASK-119)
67
+ ]
68
+ all = ["ptr-editor[cli,plot,excel,generators,viewer]"]
69
+
49
70
 
50
71
  [project.urls]
51
- documentation = "https://luca-penasa.github.io/ptr-editor"
52
- homepage = "https://luca-penasa.github.io/ptr-editor"
72
+ documentation = "https://juice-soc-public.io.esa.int/python/ptr-editor/main/"
73
+ homepage = "https://gitlab.esa.int/juice-soc-public/python/ptr-editor"
53
74
  repository = "https://github.com/luca-penasa/ptr-editor"
54
75
 
55
76
  [project.scripts]
56
- ptr-editor = "ptr_cli.main:app"
77
+ ptr-editor = "ptr_editor.cli:run"
57
78
 
58
79
  [dependency-groups]
59
- cli = [
60
- "typer>=0.20.0",
61
- "rich>=13.0.0",
62
- ]
63
- spice = [
64
- "quick-spice-manager>=0.2.0",
65
- "spiceypy>=5",
66
- ]
67
80
  dev = [
68
- "mkdocstrings[python]>=0.23",
69
- "mkdocs-material",
81
+ "ptr-editor[all]",
70
82
  "mypy",
71
83
  "pre-commit",
72
- "pymdown-extensions",
73
84
  "pytest",
74
85
  "pytest-github-actions-annotate-failures",
75
86
  "pytest-cov",
@@ -83,11 +94,12 @@ dev = [
83
94
  "rust-just>=1.36.0,<2",
84
95
  "xmldiff>=2.7.0,<3",
85
96
  "xmlformatter>=0.2.8,<0.3",
86
- "pandas-stubs>=2.2.3.241126,<3",
97
+ "pandas-stubs>=2.2.3.241126,<4",
87
98
  "pylint>=3.3.7",
88
99
  "lizard>=1.18.0",
89
100
  "vulture>=2.14",
90
101
  "jupyterlab>=4.4.9",
102
+ "import-linter>=2.1",
91
103
  ]
92
104
  tests = [
93
105
  "bs4>=0.0.2",
@@ -95,13 +107,13 @@ tests = [
95
107
  "hypothesis-jsonschema>=0.23.1",
96
108
  "nbmake>=1.5.5",
97
109
  "pytest-loguru>=0.4.0",
110
+ "spice-segmenter>=0.0.6", # tutorial/contrib JANUS notebook
111
+ "tabulate>=0.9", # DataFrame.to_markdown in the tutorials
112
+ "requests>=2.31.0",
98
113
  ]
99
114
  tutorials = [
100
115
  "jupyter-book<2",
101
116
  ]
102
- generators = [
103
- "astropy>=7.1.1",
104
- ]
105
117
  docs = [
106
118
  "playwright>=1.55.0",
107
119
  ]
@@ -110,40 +122,28 @@ docs = [
110
122
 
111
123
  [tool.hatch.build.targets.sdist]
112
124
  include = [
113
- "src/attrs_xml",
114
125
  "src/ptr_editor",
115
- "src/ptr_compare",
116
- "src/ptr_solver",
117
126
  "src/time_segments",
118
- "src/ptr_cli",
119
127
  "src/juice_jsoc",
120
- "src/juice_opl",
128
+ "src/agm_attitude",
121
129
 
122
130
 
123
131
  ]
124
132
 
125
133
  [tool.hatch.build.targets.wheel]
126
134
  include = [
127
- "src/attrs_xml",
128
135
  "src/ptr_editor",
129
- "src/ptr_compare",
130
- "src/ptr_solver",
131
136
  "src/time_segments",
132
- "src/ptr_cli",
133
137
  "src/juice_jsoc",
134
- "src/juice_opl",
138
+ "src/agm_attitude",
135
139
 
136
140
  ]
137
141
 
138
142
  [tool.hatch.build.targets.wheel.sources]
139
- "src/attrs_xml" = "attrs_xml"
140
143
  "src/ptr_editor" = "ptr_editor"
141
- "src/ptr_compare" = "ptr_compare"
142
- "src/ptr_solver" = "ptr_solver"
143
144
  "src/time_segments" = "time_segments"
144
- "src/ptr_cli" = "ptr_cli"
145
145
  "src/juice_jsoc" = "juice_jsoc"
146
- "src/juice_opl" = "juice_opl"
146
+ "src/agm_attitude" = "agm_attitude"
147
147
 
148
148
 
149
149
  [build-system]
@@ -187,19 +187,39 @@ classmethod-decorators = [
187
187
  ]
188
188
 
189
189
  [tool.pytest.ini_options]
190
+ # a deprecation raised from our own code fails the run (TASK-9); pandas attributes its
191
+ # deprecations to the calling line, so this covers pandas APIs we still use the old way
192
+ filterwarnings = [
193
+ "error::DeprecationWarning:ptr_editor",
194
+ "error::DeprecationWarning:time_segments",
195
+ "error::DeprecationWarning:juice_jsoc",
196
+ "error::DeprecationWarning:agm_attitude",
197
+ "error::FutureWarning:ptr_editor",
198
+ "error::FutureWarning:time_segments",
199
+ "error::FutureWarning:juice_jsoc",
200
+ "error::FutureWarning:agm_attitude",
201
+ # text opened without an encoding is cp1252 on Windows (TASK-86); Python reports it
202
+ # when run with PYTHONWARNDEFAULTENCODING=1 (as CI does)
203
+ "error::EncodingWarning:ptr_editor",
204
+ "error::EncodingWarning:time_segments",
205
+ "error::EncodingWarning:juice_jsoc",
206
+ "error::EncodingWarning:agm_attitude",
207
+ "error::EncodingWarning:tests",
208
+ ]
209
+ markers = [
210
+ "spice: needs SPICE kernels (network allowed: kernels may be fetched)",
211
+ "network: allowed to access the network (tests are offline otherwise)",
212
+ ]
190
213
  pythonpath = "."
191
214
  log_cli = true
192
215
  log_cli_level = "INFO"
193
216
  addopts = """\
194
- --cov attrs_xml \
195
- --cov ptr_solver \
196
217
  --cov ptr_editor \
197
218
  --cov tests \
198
219
  --cov tutorial \
199
220
  --cov-report term-missing \
200
221
  --no-cov-on-fail \
201
222
  -n auto \
202
- -vv \
203
223
  --nbmake \
204
224
  """
205
225
 
@@ -0,0 +1,115 @@
1
+ """Pure-python reference implementation of the OSVE/AGM attitude generator.
2
+
3
+ A top-level package shipped with ptr-editor (TASK-112): it uses ptr_editor, ptr_editor
4
+ never imports it. Users reach its entry points through ``ptr_editor.experimental``.
5
+
6
+ Given a parsed PTR (pointing timeline request) this package computes the
7
+ JUICE spacecraft attitude — the SC body-frame → J2000 rotation matrix — at
8
+ any epoch, **without running OSVE and without a CK kernel**: only SPK/FK
9
+ kernels need to be loaded in the SPICE pool. The algorithms were
10
+ reverse-engineered from the OSVE binary (``libosve-if.so``) and from
11
+ ptwrapper round-trip experiments, and are validated against OSVE-generated
12
+ CK ground truth by the test suite (``tests/agm_attitude/``).
13
+
14
+ The PTR → attitude pipeline
15
+ ---------------------------
16
+ For an epoch inside an observation block
17
+ (:func:`~agm_attitude.block_attitude.eval_block_rotation`):
18
+
19
+ 1. **Directions** (:mod:`.directions`) — every PTR ``Direction`` element
20
+ (named AGM direction, SC→body line of sight, cross product, …) is
21
+ resolved to a unit vector via SPICE (``eval_direction``).
22
+ 2. **Target boresight** (:mod:`.boresights`) — the attitude type (track,
23
+ inertial, limb, terminator) determines where the instrument boresight
24
+ must point (``expected_boresight``).
25
+ 3. **Base rotation** (:mod:`.block_attitude`) — ``R_min`` (shortest rotation
26
+ aligning the boresight with the target) composed with a roll around the
27
+ target that satisfies the **phase-angle constraint**
28
+ (:mod:`.phase_angles`: aligned axis or power-optimised solar arrays).
29
+ 4. **Offset rotation** (:mod:`.offsets`) — fixed, custom (Hermite
30
+ interpolated), raster, or scan offset angles rotate the SC frame within
31
+ the offset frame built from ``offsetRefAxis`` (PTR spec §3.3.2).
32
+ 5. **Timeline stitching** (:mod:`.timeline`) — ``eval_timeline`` dispatches
33
+ each query epoch to its obs block, or to the **sunLineMX slew model**
34
+ (:mod:`.slew`) for the gap between two blocks.
35
+
36
+ Supporting modules: :mod:`.kinematics` (pure-numpy quaternion / Euler /
37
+ Hermite math) and :mod:`.solvers` (inverse-problem tooling: analytical
38
+ minimum slew-time estimation and ptwrapper bisection).
39
+
40
+ Configuration comes from :class:`~ptr_editor.agm.AGMConfiguration`
41
+ (AGM/SPICE name mapping) and its typed parameter view
42
+ :class:`~ptr_editor.agm.AGMParams` (OSVE-named constants such as
43
+ ``AC_SCANGVELMAXAXIS`` and ``SE_DURATIONMIN`` from ``cfg_agm_jui.xml``).
44
+
45
+ Further reading: ``docs/dev/agm_block_attitude.md`` (per-block rotation
46
+ construction), ``docs/dev/agm_slew_internals.md`` (sunLineMX slew decoding),
47
+ ``docs/dev/agm_eval_functions.md`` (module index).
48
+ """
49
+
50
+ # Every module is imported here so its singledispatch registrations fire.
51
+ from .block_attitude import eval_base_rotation, eval_block_rotation
52
+ from .boresights import (
53
+ INERTIAL_FRAME,
54
+ SUN_TARGET,
55
+ eval_actual_boresight,
56
+ eval_sc_rotation,
57
+ expected_boresight,
58
+ )
59
+ from .directions import as_et, direction_is_sc_fixed, eval_direction
60
+ from .kinematics import angle_between_deg
61
+ from .offsets import eval_offset_frame, expected_offset_boresight
62
+ from .phase_angles import (
63
+ actual_phase_angle_axis,
64
+ eval_power_optimized_roll,
65
+ expected_phase_angle_axis,
66
+ phase_angle_constraint_error,
67
+ )
68
+ from .slew import (
69
+ interpolate_slew_rotation,
70
+ is_roll_only_transition,
71
+ min_segment_duration,
72
+ sunlinemx_mid_rotation,
73
+ )
74
+ from .solvers import (
75
+ analytical_offpointing_slew_time,
76
+ bracket_offpointing_slew_times,
77
+ bracket_segment_slew_time,
78
+ hermite_min_time,
79
+ hermite_min_time_coupled,
80
+ offpointing_jacobian,
81
+ )
82
+ from .timeline import eval_timeline
83
+
84
+ __all__ = [
85
+ # -- Reference forward model (PTR → attitude) --------------------------
86
+ "eval_timeline",
87
+ "eval_block_rotation",
88
+ "eval_base_rotation",
89
+ "expected_boresight",
90
+ "eval_actual_boresight",
91
+ "eval_sc_rotation",
92
+ "eval_direction",
93
+ "direction_is_sc_fixed",
94
+ "as_et",
95
+ "expected_phase_angle_axis",
96
+ "actual_phase_angle_axis",
97
+ "phase_angle_constraint_error",
98
+ "eval_power_optimized_roll",
99
+ "expected_offset_boresight",
100
+ "eval_offset_frame",
101
+ "interpolate_slew_rotation",
102
+ "sunlinemx_mid_rotation",
103
+ "is_roll_only_transition",
104
+ "min_segment_duration",
105
+ "angle_between_deg",
106
+ "INERTIAL_FRAME",
107
+ "SUN_TARGET",
108
+ # -- Solvers (inverse problem: pointing → PTR parameters) --------------
109
+ "analytical_offpointing_slew_time",
110
+ "offpointing_jacobian",
111
+ "hermite_min_time",
112
+ "hermite_min_time_coupled",
113
+ "bracket_segment_slew_time",
114
+ "bracket_offpointing_slew_times",
115
+ ]