descriptron-core 2.0.1__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 (112) hide show
  1. descriptron_core-2.0.1/.gitignore +56 -0
  2. descriptron_core-2.0.1/LICENSE +201 -0
  3. descriptron_core-2.0.1/NOTICE +52 -0
  4. descriptron_core-2.0.1/PKG-INFO +83 -0
  5. descriptron_core-2.0.1/README.md +28 -0
  6. descriptron_core-2.0.1/pyproject.toml +81 -0
  7. descriptron_core-2.0.1/src/descriptron_core/__init__.py +0 -0
  8. descriptron_core-2.0.1/src/descriptron_core/cli.py +98 -0
  9. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/biorag_system_prompts_v1.txt +245 -0
  10. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/biorag_system_prompts_v2.txt +276 -0
  11. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/diaphorina_user_prompts.txt +37 -0
  12. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/ontologies/aism.obo +118065 -0
  13. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/ontologies/pato.obo +22395 -0
  14. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/schemas/sdd_1.1/SDD.xsd +663 -0
  15. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/schemas/sdd_1.1/SDD_EnumLib.xsd +268 -0
  16. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/schemas/sdd_1.1/SDD_TypeLib.xsd +2329 -0
  17. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/schemas/sdd_1.1/UBIF_BasePattern.xsd +582 -0
  18. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/schemas/sdd_1.1/UBIF_CoreExtensions.xsd +386 -0
  19. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/schemas/sdd_1.1/UBIF_CoreOntology.xsd +637 -0
  20. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/schemas/sdd_1.1/UBIF_EnumLib.xsd +3297 -0
  21. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/schemas/sdd_1.1/UBIF_LinneanCore.xsd +218 -0
  22. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/schemas/sdd_1.1/UBIF_TypeLib.xsd +546 -0
  23. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/schemas/sdd_1.1/w3c-schemata/xml.xsd +146 -0
  24. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/schemas/taxpub/sample_treatment_deposit_example.xml +135 -0
  25. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/schemas/taxpub/sample_zookeys_26056_tp.xml +339 -0
  26. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/schemas/taxpub/tax-treatment-NS0-v1_flat.dtd +9049 -0
  27. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/taxon_profiles/TEMPLATE_taxon_profile.yaml +55 -0
  28. descriptron_core-2.0.1/src/descriptron_core/data/biorag_prompts/taxon_profiles/diaphorina_taxon_profile.yaml +239 -0
  29. descriptron_core-2.0.1/src/descriptron_core/tools/FHS_and_CLAHE_V21.py +1749 -0
  30. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_add_discrete_characters_v1.py +143 -0
  31. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_annotation_reorient_v1.py +187 -0
  32. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_annotation_screen_v1.py +227 -0
  33. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_autapomorphy_v1.py +319 -0
  34. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_calibrate_v1.py +533 -0
  35. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_calibration_figures_v1.py +604 -0
  36. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_character_gate_v1.py +663 -0
  37. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_character_reliability_v1.py +271 -0
  38. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_character_robustness_v1.py +227 -0
  39. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_collaborator_forms_v1.py +302 -0
  40. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_computed_sets_v1.py +213 -0
  41. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_confabulation_checker_v2.py +1404 -0
  42. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_congruence_compare_v1.py +650 -0
  43. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_description_refiner_v1.py +833 -0
  44. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_descriptive_scoring_v1.py +393 -0
  45. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_feature_policy.py +462 -0
  46. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_frame_orientation_calibrate_v1.py +814 -0
  47. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_frame_orientation_v1.py +994 -0
  48. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_gate_compare_v1.py +128 -0
  49. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_graph_identify_v1.py +306 -0
  50. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_graph_support_figure_v1.py +813 -0
  51. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_homology_frame_v1.py +433 -0
  52. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_instrument_compare_v3.py +337 -0
  53. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_key_builder_v1.py +1240 -0
  54. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_key_feature_filter_v2.py +577 -0
  55. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_key_fuzzy_figures_v1.py +519 -0
  56. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_key_fuzzy_v1.py +352 -0
  57. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_key_holdout_v1.py +256 -0
  58. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_key_jackknife_support_v1.py +145 -0
  59. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_label_conflict_check_v1.py +88 -0
  60. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_llm_backend.py +419 -0
  61. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_make_taxon_profile_v1.py +144 -0
  62. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_methods_summary_figure_v1.py +490 -0
  63. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_novelty_score_v1.py +1253 -0
  64. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_ontology_annotator_v2.py +369 -0
  65. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_outgroup_batch_check_v1.py +154 -0
  66. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_outline_shape_v1.py +661 -0
  67. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/biorag_system_prompts_v1.txt +245 -0
  68. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/biorag_system_prompts_v2.txt +276 -0
  69. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/diaphorina_user_prompts.txt +37 -0
  70. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/ontologies/aism.obo +118065 -0
  71. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/ontologies/pato.obo +22395 -0
  72. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/schemas/sdd_1.1/SDD.xsd +663 -0
  73. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/schemas/sdd_1.1/SDD_EnumLib.xsd +268 -0
  74. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/schemas/sdd_1.1/SDD_TypeLib.xsd +2329 -0
  75. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/schemas/sdd_1.1/UBIF_BasePattern.xsd +582 -0
  76. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/schemas/sdd_1.1/UBIF_CoreExtensions.xsd +386 -0
  77. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/schemas/sdd_1.1/UBIF_CoreOntology.xsd +637 -0
  78. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/schemas/sdd_1.1/UBIF_EnumLib.xsd +3297 -0
  79. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/schemas/sdd_1.1/UBIF_LinneanCore.xsd +218 -0
  80. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/schemas/sdd_1.1/UBIF_TypeLib.xsd +546 -0
  81. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/schemas/sdd_1.1/w3c-schemata/xml.xsd +146 -0
  82. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/schemas/taxpub/sample_treatment_deposit_example.xml +135 -0
  83. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/schemas/taxpub/sample_zookeys_26056_tp.xml +339 -0
  84. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/schemas/taxpub/tax-treatment-NS0-v1_flat.dtd +9049 -0
  85. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/taxon_profiles/TEMPLATE_taxon_profile.yaml +55 -0
  86. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_prompts/taxon_profiles/diaphorina_taxon_profile.yaml +239 -0
  87. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_rebuild_downstream_v1.sh +126 -0
  88. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_reliability_figures_v1.py +333 -0
  89. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_rename_species_v1.py +187 -0
  90. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_rerun_descriptive_tables_v1.sh +78 -0
  91. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_retest_compare_v1.py +212 -0
  92. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_specimen_id.py +73 -0
  93. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_subjective_checks_v1.py +482 -0
  94. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_type_material_v1.py +401 -0
  95. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_vlm_characters_v1.py +660 -0
  96. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_vlm_heatmap_figures_v1.py +734 -0
  97. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_vlm_reliability_figure_v1.py +1450 -0
  98. descriptron_core-2.0.1/src/descriptron_core/tools/biorag_vlm_roi_figures_v1.py +257 -0
  99. descriptron_core-2.0.1/src/descriptron_core/tools/biosyslit_rag_retrieval.py +4285 -0
  100. descriptron_core-2.0.1/src/descriptron_core/tools/biosyslit_rag_retrieval_v2.py +322 -0
  101. descriptron_core-2.0.1/src/descriptron_core/tools/build_monograph_exports_v1.py +891 -0
  102. descriptron_core-2.0.1/src/descriptron_core/tools/build_species_treatment_docx_v2.py +532 -0
  103. descriptron_core-2.0.1/src/descriptron_core/tools/color_extraction_with_names-v8.py +1029 -0
  104. descriptron_core-2.0.1/src/descriptron_core/tools/color_phenomics_homology_v2_1.py +1310 -0
  105. descriptron_core-2.0.1/src/descriptron_core/tools/compile_specimen_data.py +1567 -0
  106. descriptron_core-2.0.1/src/descriptron_core/tools/descriptron_rosetta.py +616 -0
  107. descriptron_core-2.0.1/src/descriptron_core/tools/landmark_gpa_V1.py +708 -0
  108. descriptron_core-2.0.1/src/descriptron_core/tools/make_reproducibility_bundle.py +409 -0
  109. descriptron_core-2.0.1/src/descriptron_core/tools/run_full_pipeline_v2.py +1971 -0
  110. descriptron_core-2.0.1/src/descriptron_core/tools/semi_landmark_and_kpts_procrustesV34_GPA.py +2198 -0
  111. descriptron_core-2.0.1/src/descriptron_core/tools/texture_phenomics_from_coco.py +622 -0
  112. descriptron_core-2.0.1/src/descriptron_core/tools/texture_phenomics_homology.py +1081 -0
@@ -0,0 +1,56 @@
1
+ # This tree holds a 116 GB conda installation, a 10 GB tarball, 12 GB of demo
2
+ # imagery and years of run outputs. Exclude everything, then re-include the code.
3
+ *
4
+
5
+ !.gitignore
6
+ !README.md
7
+ !LICENSE
8
+ !CITATION.cff
9
+ !docs/
10
+ !docs/**
11
+ !docker/
12
+ !docker/**
13
+ !environments/
14
+ !environments/**
15
+ !packages/
16
+ !packages/**
17
+
18
+ # the Descriptron programs themselves
19
+ !segment-anything-2/
20
+ segment-anything-2/*
21
+ !segment-anything-2/gui/
22
+ segment-anything-2/gui/*
23
+ !segment-anything-2/gui/*.py
24
+ !segment-anything-2/gui/*.sh
25
+ !segment-anything-2/gui/measure/
26
+ segment-anything-2/gui/measure/*
27
+ !segment-anything-2/gui/measure/*.py
28
+ !segment-anything-2/gui/measure/*.sh
29
+ !segment-anything-2/gui/measure/biorag_prompts/
30
+ !segment-anything-2/gui/measure/biorag_prompts/**
31
+ !segment-anything-2/gui/measure/tests/
32
+ !segment-anything-2/gui/measure/tests/*.py
33
+ !segment-anything-2/gui/torchvision_det/
34
+ !segment-anything-2/gui/torchvision_det/**
35
+ !segment-anything-2/gui/detectron2/
36
+ segment-anything-2/gui/detectron2/*
37
+ !segment-anything-2/gui/detectron2/*.py
38
+ !segment-anything-2/gui/icons/
39
+ !segment-anything-2/gui/icons/**
40
+ !segment-anything-2/gui/marmot.jpg
41
+
42
+ # never, whatever the rules above say
43
+ **/__pycache__/
44
+ **/*.pyc
45
+ **/*.bak*
46
+ **/.ipynb_checkpoints/
47
+ **/*.pth
48
+ **/*.pt
49
+ **/*.ckpt
50
+ **/*.onnx
51
+ **/*.log
52
+ **/dist/
53
+ **/build/
54
+ **/*.egg-info/
55
+ packages/*/src/*/tools/
56
+ packages/*/src/*/data/
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,52 @@
1
+ Descriptron
2
+ Copyright 2024-2026 Alex R. Van Dam (ORCID 0000-0002-1966-0338)
3
+
4
+ This product includes software developed by Alex R. Van Dam
5
+ https://github.com/alexrvandam/Descriptron
6
+
7
+ Licensed under the Apache License, Version 2.0 (see LICENSE). Under Section
8
+ 4(d) of that licence, this NOTICE file must be included with any
9
+ redistribution of this software or of any work derived from it.
10
+
11
+ REQUIRED CITATION
12
+ -----------------
13
+ Anyone who uses Descriptron, or any software derived from it (including
14
+ descriptron-core, descriptron-vision, descriptron-gui and descriptron-mcp), in
15
+ work that is published, presented or distributed must cite:
16
+
17
+ 1. The software (Descriptron v2):
18
+ Van Dam, A. R. Descriptron (version used). GitHub repository.
19
+ https://github.com/alexrvandam/Descriptron
20
+
21
+ 2. The first Descriptron paper:
22
+ Van Dam, A. R. & Štarhová Serbina, L. (2026). Descriptron: Artificial
23
+ intelligence for automating taxonomic species descriptions with a
24
+ user-friendly software package. Systematic Entomology, 51(1), e70005.
25
+ https://doi.org/10.1111/syen.70005
26
+
27
+ 3. Once it is published, the Descriptron v2 paper as well. Its reference
28
+ will be added here and in CITATION.cff on publication.
29
+
30
+ BibTeX:
31
+
32
+ @misc{vandam_descriptron_software,
33
+ author = {Van Dam, Alex R.},
34
+ title = {Descriptron},
35
+ howpublished = {GitHub repository},
36
+ url = {https://github.com/alexrvandam/Descriptron}
37
+ }
38
+
39
+ @article{vandam2026descriptron,
40
+ author = {Van Dam, Alex R. and Štarhová Serbina, Liliya},
41
+ title = {Descriptron: Artificial intelligence for automating taxonomic species
42
+ descriptions with a user-friendly software package},
43
+ journal = {Systematic Entomology},
44
+ volume = {51},
45
+ number = {1},
46
+ pages = {e70005},
47
+ year = {2026},
48
+ doi = {10.1111/syen.70005}
49
+ }
50
+
51
+ The same information is in CITATION.cff, which GitHub shows as
52
+ "Cite this repository".
@@ -0,0 +1,83 @@
1
+ Metadata-Version: 2.5
2
+ Name: descriptron-core
3
+ Version: 2.0.1
4
+ Summary: Evidence-tiered species descriptions, keys and audits from phenomic matrices
5
+ Project-URL: Homepage, https://github.com/alexrvandam/Descriptron
6
+ Project-URL: Repository, https://github.com/alexrvandam/Descriptron
7
+ Project-URL: Issues, https://github.com/alexrvandam/Descriptron/issues
8
+ Author: Alex R. Van Dam
9
+ License: Apache-2.0
10
+ License-File: LICENSE
11
+ License-File: NOTICE
12
+ Keywords: COCO,morphometrics,phenomics,species description,taxonomy
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
18
+ Classifier: Topic :: Scientific/Engineering :: Image Processing
19
+ Requires-Python: >=3.9
20
+ Requires-Dist: biopython>=1.81
21
+ Requires-Dist: lxml>=4.9
22
+ Requires-Dist: matplotlib>=3.6
23
+ Requires-Dist: networkx>=3
24
+ Requires-Dist: numpy>=1.23
25
+ Requires-Dist: opencv-python-headless>=4.7
26
+ Requires-Dist: openpyxl>=3.1
27
+ Requires-Dist: pandas>=1.5
28
+ Requires-Dist: pillow>=9
29
+ Requires-Dist: pycocotools>=2.0.6
30
+ Requires-Dist: pyefd>=1.6
31
+ Requires-Dist: python-docx>=1.0
32
+ Requires-Dist: pyyaml>=6
33
+ Requires-Dist: scikit-image>=0.20
34
+ Requires-Dist: scikit-learn>=1.2
35
+ Requires-Dist: scikit-posthocs>=0.7
36
+ Requires-Dist: scipy>=1.9
37
+ Requires-Dist: seaborn>=0.12
38
+ Requires-Dist: statsmodels>=0.14
39
+ Requires-Dist: umap-learn>=0.5
40
+ Provides-Extra: dev
41
+ Requires-Dist: build>=1; extra == 'dev'
42
+ Requires-Dist: pytest>=7; extra == 'dev'
43
+ Requires-Dist: twine>=5; extra == 'dev'
44
+ Provides-Extra: llm
45
+ Requires-Dist: anthropic>=0.40; extra == 'llm'
46
+ Provides-Extra: rag
47
+ Requires-Dist: pdfplumber>=0.10; extra == 'rag'
48
+ Requires-Dist: requests>=2.28; extra == 'rag'
49
+ Provides-Extra: rag-embeddings
50
+ Requires-Dist: faiss-cpu>=1.7; extra == 'rag-embeddings'
51
+ Requires-Dist: pdfplumber>=0.10; extra == 'rag-embeddings'
52
+ Requires-Dist: requests>=2.28; extra == 'rag-embeddings'
53
+ Requires-Dist: sentence-transformers>=2.2; extra == 'rag-embeddings'
54
+ Description-Content-Type: text/markdown
55
+
56
+ # descriptron-core
57
+
58
+ Evidence-tiered species descriptions, keys and audits from phenomic matrices.
59
+
60
+ **Pure pip: no torch, no CUDA, no compiler.** Installs in about a minute on
61
+ Linux, macOS and Windows. With the deposited COCO files it reproduces every
62
+ analysis in the methods paper without a model of any kind — the audit, key,
63
+ matrix, novelty scoring and delimitation are all deterministic.
64
+
65
+ ```bash
66
+ pip install descriptron-core
67
+ descriptron --list # the 62 programs in this package
68
+ descriptron biorag_key_builder_v1 --help
69
+ biorag-audit --help
70
+ ```
71
+
72
+ Writing treatments is the only step that calls a language model:
73
+
74
+ ```bash
75
+ pip install "descriptron-core[llm]"
76
+ ```
77
+
78
+ For mask prediction, landmark transfer and scale-bar reading, add
79
+ [`descriptron-vision`](https://pypi.org/project/descriptron-vision/); for the
80
+ annotation GUI, [`descriptron-gui`](https://pypi.org/project/descriptron-gui/).
81
+
82
+ The programs are shipped as data and executed with `runpy`, exactly as they run
83
+ from a shell, so packaging cannot quietly change what they do.
@@ -0,0 +1,28 @@
1
+ # descriptron-core
2
+
3
+ Evidence-tiered species descriptions, keys and audits from phenomic matrices.
4
+
5
+ **Pure pip: no torch, no CUDA, no compiler.** Installs in about a minute on
6
+ Linux, macOS and Windows. With the deposited COCO files it reproduces every
7
+ analysis in the methods paper without a model of any kind — the audit, key,
8
+ matrix, novelty scoring and delimitation are all deterministic.
9
+
10
+ ```bash
11
+ pip install descriptron-core
12
+ descriptron --list # the 62 programs in this package
13
+ descriptron biorag_key_builder_v1 --help
14
+ biorag-audit --help
15
+ ```
16
+
17
+ Writing treatments is the only step that calls a language model:
18
+
19
+ ```bash
20
+ pip install "descriptron-core[llm]"
21
+ ```
22
+
23
+ For mask prediction, landmark transfer and scale-bar reading, add
24
+ [`descriptron-vision`](https://pypi.org/project/descriptron-vision/); for the
25
+ annotation GUI, [`descriptron-gui`](https://pypi.org/project/descriptron-gui/).
26
+
27
+ The programs are shipped as data and executed with `runpy`, exactly as they run
28
+ from a shell, so packaging cannot quietly change what they do.
@@ -0,0 +1,81 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "descriptron-core"
7
+ version = "2.0.1"
8
+ description = "Evidence-tiered species descriptions, keys and audits from phenomic matrices"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "Apache-2.0" }
12
+ authors = [{ name = "Alex R. Van Dam" }]
13
+ keywords = ["taxonomy", "morphometrics", "phenomics", "species description", "COCO"]
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "Topic :: Scientific/Engineering :: Bio-Informatics",
17
+ "Topic :: Scientific/Engineering :: Image Processing",
18
+ "Intended Audience :: Science/Research",
19
+ "License :: OSI Approved :: Apache Software License",
20
+ "Operating System :: OS Independent",
21
+ ]
22
+
23
+ # Derived from the imports of the 62 programs in this package, not from memory:
24
+ # `python -m descriptron_core.cli --list` names them. No torch, no CUDA, no
25
+ # compiler — this installs in about a minute on Linux, macOS and Windows, and
26
+ # with the deposited COCO files it reproduces every analysis in the methods paper.
27
+ dependencies = [
28
+ "numpy>=1.23",
29
+ "pandas>=1.5",
30
+ "scipy>=1.9",
31
+ "matplotlib>=3.6",
32
+ "scikit-learn>=1.2",
33
+ "scikit-image>=0.20",
34
+ "opencv-python-headless>=4.7", # headless: the analysis half never opens a window
35
+ "pillow>=9",
36
+ "pycocotools>=2.0.6",
37
+ "seaborn>=0.12",
38
+ "statsmodels>=0.14",
39
+ "scikit-posthocs>=0.7",
40
+ "umap-learn>=0.5",
41
+ "networkx>=3",
42
+ "pyefd>=1.6",
43
+ "biopython>=1.81",
44
+ "PyYAML>=6",
45
+ "lxml>=4.9",
46
+ "openpyxl>=3.1",
47
+ "python-docx>=1.0", # treatment and monograph .docx export
48
+ ]
49
+
50
+ [project.optional-dependencies]
51
+ # Only needed to *write* treatments. The audit, key, matrix, novelty scoring and
52
+ # delimitation are all deterministic and need no model at all.
53
+ llm = ["anthropic>=0.40"]
54
+ # literature retrieval (the RAG in BioRAG): BioSysLit treatments from Zenodo and your
55
+ # own PDFs. Keyword retrieval needs only the first two; sentence-embedding retrieval
56
+ # (`index --embeddings`) also needs sentence-transformers + faiss-cpu, which pull in torch.
57
+ rag = ["requests>=2.28", "pdfplumber>=0.10"]
58
+ rag-embeddings = ["requests>=2.28", "pdfplumber>=0.10", "sentence-transformers>=2.2", "faiss-cpu>=1.7"]
59
+ dev = ["pytest>=7", "build>=1", "twine>=5"]
60
+
61
+ [project.scripts]
62
+ descriptron = "descriptron_core.cli:main"
63
+ biorag-pipeline = "descriptron_core.cli:run_pipeline"
64
+ biorag-key = "descriptron_core.cli:run_key_builder"
65
+ biorag-audit = "descriptron_core.cli:run_confabulation_checker"
66
+ biorag-novelty = "descriptron_core.cli:run_novelty_score"
67
+ biorag-calibrate = "descriptron_core.cli:run_calibrate"
68
+
69
+ [project.urls]
70
+ Homepage = "https://github.com/alexrvandam/Descriptron"
71
+ Repository = "https://github.com/alexrvandam/Descriptron"
72
+ Issues = "https://github.com/alexrvandam/Descriptron/issues"
73
+
74
+ [tool.hatch.build.targets.wheel]
75
+ packages = ["src/descriptron_core"]
76
+
77
+ # tools/ and data/ sit inside the package directory, so `packages` already ships
78
+ # them; a force-include here would add every file a second time and the build
79
+ # fails with "a second file is being added to the wheel archive at the same path".
80
+ [tool.hatch.build]
81
+ artifacts = ["src/descriptron_core/tools/**", "src/descriptron_core/data/**"]
@@ -0,0 +1,98 @@
1
+ """
2
+ descriptron_core.cli — one entry point for the analysis programs
3
+ ================================================================
4
+
5
+ The 62 programs in this package are run with `runpy` exactly as they are run
6
+ from a shell, rather than being imported as modules. That is deliberate: they
7
+ were written as scripts, they use `if __name__ == "__main__"`, and several
8
+ import their siblings by plain name. Executing them as `__main__` with their own
9
+ directory on `sys.path` preserves that behaviour exactly, so packaging cannot
10
+ quietly change what a program does — which matters when the output is a
11
+ published species description.
12
+
13
+ descriptron --list
14
+ descriptron biorag_key_builder_v1 --help
15
+ biorag-audit --help
16
+ """
17
+ from __future__ import annotations
18
+
19
+ import os
20
+ import runpy
21
+ import sys
22
+ from importlib.resources import files
23
+ from pathlib import Path
24
+
25
+ __all__ = ["main", "tools_dir", "data_path", "available"]
26
+
27
+
28
+ def tools_dir() -> Path:
29
+ return Path(str(files("descriptron_core") / "tools"))
30
+
31
+
32
+ def data_path(*parts: str) -> Path:
33
+ """Prompts, taxon profiles, ontology releases and schemas that ship with the package."""
34
+ return Path(str(files("descriptron_core") / "data")).joinpath(*parts)
35
+
36
+
37
+ def available() -> list[str]:
38
+ d = tools_dir()
39
+ if not d.exists():
40
+ return []
41
+ return sorted(p.stem for p in d.iterdir()
42
+ if p.suffix in (".py", ".sh") and not p.name.startswith("_"))
43
+
44
+
45
+ def _resolve(name: str) -> Path:
46
+ d = tools_dir()
47
+ for candidate in (d / name, d / f"{name}.py", d / f"{name}.sh"):
48
+ if candidate.exists():
49
+ return candidate
50
+ matches = [t for t in available() if t.startswith(name)]
51
+ if len(matches) == 1:
52
+ return _resolve(matches[0])
53
+ if matches:
54
+ raise SystemExit(f"'{name}' is ambiguous: {', '.join(matches)}")
55
+ raise SystemExit(f"unknown program '{name}'. `descriptron --list` shows them all.")
56
+
57
+
58
+ def run(name: str, argv: list[str] | None = None) -> None:
59
+ path = _resolve(name)
60
+ argv = list(sys.argv[1:] if argv is None else argv)
61
+ # the programs' own directory goes on sys.path so a script that imports a
62
+ # sibling by plain name keeps working, and the packaged prompts and ontology
63
+ # releases are findable without anyone passing a path
64
+ sys.path.insert(0, str(path.parent))
65
+ os.environ.setdefault("DESCRIPTRON_DATA", str(data_path()))
66
+ if path.suffix == ".sh":
67
+ os.execvp("bash", ["bash", str(path), *argv])
68
+ sys.argv = [str(path), *argv]
69
+ runpy.run_path(str(path), run_name="__main__")
70
+
71
+
72
+ def main(argv: list[str] | None = None) -> None:
73
+ args = list(sys.argv[1:] if argv is None else argv)
74
+ if not args or args[0] in ("-h", "--help", "help"):
75
+ print(__doc__.strip())
76
+ print(f"\n{len(available())} programs available; --list shows them.")
77
+ return
78
+ if args[0] in ("--list", "list"):
79
+ for name in available():
80
+ print(name)
81
+ return
82
+ if args[0] in ("--where", "where"):
83
+ print(f"tools: {tools_dir()}\ndata: {data_path()}")
84
+ return
85
+ run(args[0], args[1:])
86
+
87
+
88
+ def _fixed(script: str):
89
+ def entry() -> None:
90
+ run(script, sys.argv[1:])
91
+ return entry
92
+
93
+
94
+ run_pipeline = _fixed("run_full_pipeline_v2")
95
+ run_key_builder = _fixed("biorag_key_builder_v1")
96
+ run_confabulation_checker = _fixed("biorag_confabulation_checker_v2")
97
+ run_novelty_score = _fixed("biorag_novelty_score_v1")
98
+ run_calibrate = _fixed("biorag_calibrate_v1")