pertpy 0.5.0__tar.gz → 0.7.0__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. pertpy-0.7.0/.editorconfig +21 -0
  2. pertpy-0.7.0/.gitattributes +1 -0
  3. pertpy-0.7.0/.github/ISSUE_TEMPLATE/bug_report.yml +89 -0
  4. pertpy-0.7.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
  5. pertpy-0.7.0/.github/ISSUE_TEMPLATE/feature_request.yml +11 -0
  6. pertpy-0.7.0/.github/labels.yml +69 -0
  7. pertpy-0.7.0/.github/pull_request_template.md +21 -0
  8. pertpy-0.7.0/.github/release-drafter.yml +54 -0
  9. pertpy-0.7.0/.github/workflows/build.yml +33 -0
  10. pertpy-0.7.0/.github/workflows/labeler.yml +19 -0
  11. pertpy-0.7.0/.github/workflows/release.yml +30 -0
  12. pertpy-0.7.0/.github/workflows/release_drafter.yml +19 -0
  13. pertpy-0.7.0/.github/workflows/test.yml +64 -0
  14. pertpy-0.7.0/.gitignore +157 -0
  15. pertpy-0.7.0/.gitmodules +3 -0
  16. pertpy-0.7.0/.pre-commit-config.yaml +44 -0
  17. pertpy-0.7.0/.readthedocs.yml +22 -0
  18. pertpy-0.7.0/CODE_OF_CONDUCT.md +74 -0
  19. pertpy-0.7.0/PKG-INFO +130 -0
  20. {pertpy-0.5.0 → pertpy-0.7.0}/README.md +9 -10
  21. pertpy-0.7.0/codecov.yml +16 -0
  22. pertpy-0.7.0/docs/Makefile +20 -0
  23. pertpy-0.7.0/docs/_ext/edit_on_github.py +49 -0
  24. pertpy-0.7.0/docs/_ext/typed_returns.py +27 -0
  25. pertpy-0.7.0/docs/_static/SCVI_LICENSE +29 -0
  26. pertpy-0.7.0/docs/_static/css/overwrite.css +74 -0
  27. pertpy-0.7.0/docs/_static/css/sphinx_gallery.css +27 -0
  28. pertpy-0.7.0/docs/_static/docstring_previews/augur_dp_scatter.png +0 -0
  29. pertpy-0.7.0/docs/_static/docstring_previews/augur_important_features.png +0 -0
  30. pertpy-0.7.0/docs/_static/docstring_previews/augur_lollipop.png +0 -0
  31. pertpy-0.7.0/docs/_static/docstring_previews/augur_scatterplot.png +0 -0
  32. pertpy-0.7.0/docs/_static/docstring_previews/dialogue_pairplot.png +0 -0
  33. pertpy-0.7.0/docs/_static/docstring_previews/dialogue_violin.png +0 -0
  34. pertpy-0.7.0/docs/_static/docstring_previews/enrichment_dotplot.png +0 -0
  35. pertpy-0.7.0/docs/_static/docstring_previews/enrichment_gsea.png +0 -0
  36. pertpy-0.7.0/docs/_static/docstring_previews/milo_da_beeswarm.png +0 -0
  37. pertpy-0.7.0/docs/_static/docstring_previews/milo_nhood.png +0 -0
  38. pertpy-0.7.0/docs/_static/docstring_previews/milo_nhood_graph.png +0 -0
  39. pertpy-0.7.0/docs/_static/docstring_previews/mixscape_barplot.png +0 -0
  40. pertpy-0.7.0/docs/_static/docstring_previews/mixscape_heatmap.png +0 -0
  41. pertpy-0.7.0/docs/_static/docstring_previews/mixscape_lda.png +0 -0
  42. pertpy-0.7.0/docs/_static/docstring_previews/mixscape_perturbscore.png +0 -0
  43. pertpy-0.7.0/docs/_static/docstring_previews/mixscape_violin.png +0 -0
  44. pertpy-0.7.0/docs/_static/docstring_previews/sccoda_boxplots.png +0 -0
  45. pertpy-0.7.0/docs/_static/docstring_previews/sccoda_effects_barplot.png +0 -0
  46. pertpy-0.7.0/docs/_static/docstring_previews/sccoda_rel_abundance_dispersion_plot.png +0 -0
  47. pertpy-0.7.0/docs/_static/docstring_previews/sccoda_stacked_barplot.png +0 -0
  48. pertpy-0.7.0/docs/_static/docstring_previews/scgen_reg_mean.png +0 -0
  49. pertpy-0.7.0/docs/_static/docstring_previews/tasccoda_draw_effects.png +0 -0
  50. pertpy-0.7.0/docs/_static/docstring_previews/tasccoda_draw_tree.png +0 -0
  51. pertpy-0.7.0/docs/_static/docstring_previews/tasccoda_effects_umap.png +0 -0
  52. pertpy-0.7.0/docs/_static/icons/code-24px.svg +1 -0
  53. pertpy-0.7.0/docs/_static/icons/computer-24px.svg +1 -0
  54. pertpy-0.7.0/docs/_static/icons/library_books-24px.svg +1 -0
  55. pertpy-0.7.0/docs/_static/icons/play_circle_outline-24px.svg +1 -0
  56. pertpy-0.7.0/docs/_static/placeholder.png +0 -0
  57. pertpy-0.7.0/docs/_static/tutorials/augur.png +0 -0
  58. pertpy-0.7.0/docs/_static/tutorials/cinemaot.png +0 -0
  59. pertpy-0.7.0/docs/_static/tutorials/dialogue.png +0 -0
  60. pertpy-0.7.0/docs/_static/tutorials/distances.png +0 -0
  61. pertpy-0.7.0/docs/_static/tutorials/distances_tests.png +0 -0
  62. pertpy-0.7.0/docs/_static/tutorials/enrichment.png +0 -0
  63. pertpy-0.7.0/docs/_static/tutorials/guide_rna_assignment.png +0 -0
  64. pertpy-0.7.0/docs/_static/tutorials/milo.png +0 -0
  65. pertpy-0.7.0/docs/_static/tutorials/mixscape.png +0 -0
  66. pertpy-0.7.0/docs/_static/tutorials/ontology.png +0 -0
  67. pertpy-0.7.0/docs/_static/tutorials/perturbation_space.png +0 -0
  68. pertpy-0.7.0/docs/_static/tutorials/placeholder.png +0 -0
  69. pertpy-0.7.0/docs/_static/tutorials/sccoda.png +0 -0
  70. pertpy-0.7.0/docs/_static/tutorials/sccoda_extended.png +0 -0
  71. pertpy-0.7.0/docs/_static/tutorials/scgen_perturbation_prediction.png +0 -0
  72. pertpy-0.7.0/docs/_static/tutorials/tasccoda.png +0 -0
  73. pertpy-0.7.0/docs/_templates/autosummary/class.rst +79 -0
  74. pertpy-0.7.0/docs/_templates/class_no_inherited.rst +69 -0
  75. pertpy-0.7.0/docs/code_of_conduct.md +3 -0
  76. pertpy-0.7.0/docs/conf.py +190 -0
  77. pertpy-0.7.0/docs/contributing.md +189 -0
  78. pertpy-0.7.0/docs/index.md +66 -0
  79. pertpy-0.7.0/docs/installation.md +91 -0
  80. pertpy-0.7.0/docs/make.bat +36 -0
  81. pertpy-0.7.0/docs/references.bib +10 -0
  82. pertpy-0.7.0/docs/references.md +5 -0
  83. pertpy-0.7.0/docs/tutorials/index.md +53 -0
  84. pertpy-0.7.0/docs/usage/usage.md +597 -0
  85. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/__init__.py +3 -1
  86. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/data/__init__.py +7 -3
  87. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/data/_dataloader.py +4 -6
  88. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/data/_datasets.py +400 -357
  89. pertpy-0.7.0/pertpy/metadata/__init__.py +4 -0
  90. pertpy-0.7.0/pertpy/metadata/_cell_line.py +826 -0
  91. pertpy-0.7.0/pertpy/metadata/_compound.py +129 -0
  92. pertpy-0.7.0/pertpy/metadata/_drug.py +242 -0
  93. pertpy-0.7.0/pertpy/metadata/_look_up.py +582 -0
  94. pertpy-0.7.0/pertpy/metadata/_metadata.py +73 -0
  95. pertpy-0.7.0/pertpy/metadata/_moa.py +129 -0
  96. pertpy-0.7.0/pertpy/plot/__init__.py +5 -0
  97. pertpy-0.7.0/pertpy/plot/_augur.py +171 -0
  98. pertpy-0.7.0/pertpy/plot/_coda.py +601 -0
  99. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/plot/_guide_rna.py +29 -32
  100. pertpy-0.7.0/pertpy/plot/_milopy.py +209 -0
  101. pertpy-0.7.0/pertpy/plot/_mixscape.py +355 -0
  102. pertpy-0.7.0/pertpy/preprocessing/__init__.py +1 -0
  103. pertpy-0.7.0/pertpy/preprocessing/_guide_rna.py +189 -0
  104. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/__init__.py +9 -13
  105. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/_augur.py +424 -46
  106. pertpy-0.7.0/pertpy/tools/_cinemaot.py +939 -0
  107. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/_coda/_base_coda.py +1320 -70
  108. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/_coda/_sccoda.py +85 -102
  109. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/_coda/_tasccoda.py +57 -33
  110. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/_dialogue.py +415 -37
  111. pertpy-0.7.0/pertpy/tools/_differential_gene_expression.py +325 -0
  112. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/_distances/_distance_tests.py +75 -31
  113. pertpy-0.7.0/pertpy/tools/_distances/_distances.py +859 -0
  114. pertpy-0.7.0/pertpy/tools/_enrichment.py +465 -0
  115. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/_kernel_pca.py +5 -1
  116. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/_milo.py +438 -12
  117. pertpy-0.7.0/pertpy/tools/_mixscape.py +1121 -0
  118. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/_perturbation_space/_clustering.py +20 -4
  119. pertpy-0.7.0/pertpy/tools/_perturbation_space/_discriminator_classifiers.py +526 -0
  120. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/_perturbation_space/_metrics.py +8 -4
  121. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/_perturbation_space/_perturbation_space.py +169 -49
  122. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/_perturbation_space/_simple.py +83 -16
  123. pertpy-0.7.0/pertpy/tools/_scgen/__init__.py +1 -0
  124. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/_scgen/_base_components.py +5 -1
  125. pertpy-0.7.0/pertpy/tools/_scgen/_scgen.py +701 -0
  126. pertpy-0.5.0/pertpy/tools/_scgen/_jax_scgenvae.py → pertpy-0.7.0/pertpy/tools/_scgen/_scgenvae.py +7 -7
  127. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/_scgen/_utils.py +4 -1
  128. pertpy-0.7.0/pertpy/tools/decoupler_LICENSE +674 -0
  129. pertpy-0.7.0/pyproject.toml +215 -0
  130. pertpy-0.7.0/tests/conftest.py +7 -0
  131. pertpy-0.7.0/tests/metadata/test_cell_line.py +77 -0
  132. pertpy-0.7.0/tests/metadata/test_compound.py +43 -0
  133. pertpy-0.7.0/tests/metadata/test_drug.py +34 -0
  134. pertpy-0.7.0/tests/metadata/test_moa.py +49 -0
  135. pertpy-0.7.0/tests/preprocessing/test_grna_assignment.py +50 -0
  136. pertpy-0.7.0/tests/tools/_coda/test_sccoda.py +107 -0
  137. pertpy-0.7.0/tests/tools/_coda/test_tasccoda.py +73 -0
  138. pertpy-0.7.0/tests/tools/_distances/test_distance_tests.py +51 -0
  139. pertpy-0.7.0/tests/tools/_distances/test_distances.py +134 -0
  140. pertpy-0.7.0/tests/tools/_perturbation_space/test_discriminator_classifiers.py +81 -0
  141. pertpy-0.7.0/tests/tools/_perturbation_space/test_simple_cluster_space.py +56 -0
  142. pertpy-0.7.0/tests/tools/_perturbation_space/test_simple_perturbation_space.py +248 -0
  143. pertpy-0.7.0/tests/tools/haber_data.csv +11 -0
  144. pertpy-0.7.0/tests/tools/r_result.csv +20730 -0
  145. pertpy-0.7.0/tests/tools/test_augur.py +180 -0
  146. pertpy-0.7.0/tests/tools/test_cinemaot.py +83 -0
  147. pertpy-0.7.0/tests/tools/test_differential_gene_expression.py +81 -0
  148. pertpy-0.7.0/tests/tools/test_enrichment.py +63 -0
  149. pertpy-0.7.0/tests/tools/test_milo.py +266 -0
  150. pertpy-0.7.0/tests/tools/test_mixscape.py +97 -0
  151. pertpy-0.7.0/tests/tools/test_scgen.py +52 -0
  152. pertpy-0.5.0/PKG-INFO +0 -77
  153. pertpy-0.5.0/pertpy/plot/__init__.py +0 -11
  154. pertpy-0.5.0/pertpy/plot/_augurpy.py +0 -190
  155. pertpy-0.5.0/pertpy/plot/_coda.py +0 -900
  156. pertpy-0.5.0/pertpy/plot/_milopy.py +0 -243
  157. pertpy-0.5.0/pertpy/plot/_mixscape.py +0 -543
  158. pertpy-0.5.0/pertpy/plot/_scgen.py +0 -311
  159. pertpy-0.5.0/pertpy/preprocessing/__init__.py +0 -1
  160. pertpy-0.5.0/pertpy/preprocessing/_guide_rna.py +0 -83
  161. pertpy-0.5.0/pertpy/tools/_differential_gene_expression.py +0 -97
  162. pertpy-0.5.0/pertpy/tools/_distances/_distances.py +0 -325
  163. pertpy-0.5.0/pertpy/tools/_metadata/_cell_line.py +0 -528
  164. pertpy-0.5.0/pertpy/tools/_mixscape.py +0 -475
  165. pertpy-0.5.0/pertpy/tools/_perturbation_space/_discriminator_classifier.py +0 -354
  166. pertpy-0.5.0/pertpy/tools/_scgen/__init__.py +0 -1
  167. pertpy-0.5.0/pertpy/tools/_scgen/_jax_scgen.py +0 -319
  168. pertpy-0.5.0/pyproject.toml +0 -119
  169. {pertpy-0.5.0 → pertpy-0.7.0}/LICENSE +0 -0
  170. /pertpy-0.5.0/pertpy/py.typed → /pertpy-0.7.0/docs/utils.py +0 -0
  171. /pertpy-0.5.0/pertpy/tools/_coda/__init__.py → /pertpy-0.7.0/pertpy/py.typed +0 -0
  172. {pertpy-0.5.0/pertpy/tools/_distances → pertpy-0.7.0/pertpy/tools/_coda}/__init__.py +0 -0
  173. {pertpy-0.5.0/pertpy/tools/_metadata → pertpy-0.7.0/pertpy/tools/_distances}/__init__.py +0 -0
  174. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/_perturbation_space/__init__.py +0 -0
  175. {pertpy-0.5.0 → pertpy-0.7.0}/pertpy/tools/transferlearning_MMD_LICENSE +0 -0
@@ -0,0 +1,21 @@
1
+ # http://editorconfig.org
2
+
3
+ root = true
4
+
5
+ [*]
6
+ indent_style = space
7
+ indent_size = 4
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+ charset = utf-8
11
+ end_of_line = lf
12
+
13
+ [*.bat]
14
+ indent_style = tab
15
+ end_of_line = crlf
16
+
17
+ [LICENSE]
18
+ insert_final_newline = false
19
+
20
+ [Makefile]
21
+ indent_style = tab
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
@@ -0,0 +1,89 @@
1
+ name: Bug report
2
+ description: Report something that is broken or incorrect
3
+ labels: bug
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports)
9
+ detailing how to provide the necessary information for us to reproduce your bug. In brief:
10
+ * Please provide exact steps how to reproduce the bug in a clean Python environment.
11
+ * In case it's not clear what's causing this bug, please provide the data or the data generation procedure.
12
+ * Sometimes it is not possible to share the data, but usually it is possible to replicate problems on publicly
13
+ available datasets or to share a subset of your data.
14
+
15
+ - type: textarea
16
+ id: report
17
+ attributes:
18
+ label: Report
19
+ description: A clear and concise description of what the bug is.
20
+ validations:
21
+ required: true
22
+
23
+ - type: textarea
24
+ id: versions
25
+ attributes:
26
+ label: Version information
27
+ description: |
28
+ Please paste below the output of
29
+
30
+ ```python
31
+ import session_info
32
+ session_info.show(html=False, dependencies=True)
33
+ ```
34
+ placeholder: |
35
+ -----
36
+ anndata 0.8.0rc2.dev27+ge524389
37
+ session_info 1.0.0
38
+ -----
39
+ asttokens NA
40
+ awkward 1.8.0
41
+ backcall 0.2.0
42
+ cython_runtime NA
43
+ dateutil 2.8.2
44
+ debugpy 1.6.0
45
+ decorator 5.1.1
46
+ entrypoints 0.4
47
+ executing 0.8.3
48
+ h5py 3.7.0
49
+ ipykernel 6.15.0
50
+ jedi 0.18.1
51
+ mpl_toolkits NA
52
+ natsort 8.1.0
53
+ numpy 1.22.4
54
+ packaging 21.3
55
+ pandas 1.4.2
56
+ parso 0.8.3
57
+ pexpect 4.8.0
58
+ pickleshare 0.7.5
59
+ pkg_resources NA
60
+ prompt_toolkit 3.0.29
61
+ psutil 5.9.1
62
+ ptyprocess 0.7.0
63
+ pure_eval 0.2.2
64
+ pydev_ipython NA
65
+ pydevconsole NA
66
+ pydevd 2.8.0
67
+ pydevd_file_utils NA
68
+ pydevd_plugins NA
69
+ pydevd_tracing NA
70
+ pygments 2.12.0
71
+ pytz 2022.1
72
+ scipy 1.8.1
73
+ setuptools 62.5.0
74
+ setuptools_scm NA
75
+ six 1.16.0
76
+ stack_data 0.3.0
77
+ tornado 6.1
78
+ traitlets 5.3.0
79
+ wcwidth 0.2.5
80
+ zmq 23.1.0
81
+ -----
82
+ IPython 8.4.0
83
+ jupyter_client 7.3.4
84
+ jupyter_core 4.10.0
85
+ -----
86
+ Python 3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:58:50) [GCC 10.3.0]
87
+ Linux-5.18.6-arch1-1-x86_64-with-glibc2.35
88
+ -----
89
+ Session information updated at 2022-07-07 17:55
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Scverse Community Forum
4
+ url: https://discourse.scverse.org/
5
+ about: If you have questions about “How to do X”, please ask them here.
@@ -0,0 +1,11 @@
1
+ name: Feature request
2
+ description: Propose a new feature for pertpy
3
+ labels: enhancement
4
+ body:
5
+ - type: textarea
6
+ id: description
7
+ attributes:
8
+ label: Description of feature
9
+ description: Please describe your suggestion for a new feature. It might help to describe a problem or use case, plus any alternatives that you have considered.
10
+ validations:
11
+ required: true
@@ -0,0 +1,69 @@
1
+ ---
2
+ # Labels names are important as they are used by Release Drafter to decide
3
+ # regarding where to record them in changelog or if to skip them.
4
+ #
5
+ # The repository labels will be automatically configured using this file and
6
+ # the GitHub Action https://github.com/marketplace/actions/github-labeler.
7
+ - name: breaking
8
+ description: Breaking Changes
9
+ color: bfd4f2
10
+ - name: bug
11
+ description: Something isn't working
12
+ color: d73a4a
13
+ - name: build
14
+ description: Build System and Dependencies
15
+ color: bfdadc
16
+ - name: ci
17
+ description: Continuous Integration
18
+ color: 4a97d6
19
+ - name: dependencies
20
+ description: Pull requests that update a dependency file
21
+ color: 0366d6
22
+ - name: documentation
23
+ description: Improvements or additions to documentation
24
+ color: 0075ca
25
+ - name: duplicate
26
+ description: This issue or pull request already exists
27
+ color: cfd3d7
28
+ - name: enhancement
29
+ description: New feature or request
30
+ color: a2eeef
31
+ - name: github_actions
32
+ description: Pull requests that update Github_actions code
33
+ color: "000000"
34
+ - name: good first issue
35
+ description: Good for newcomers
36
+ color: 7057ff
37
+ - name: help wanted
38
+ description: Extra attention is needed
39
+ color: 008672
40
+ - name: invalid
41
+ description: This doesn't seem right
42
+ color: e4e669
43
+ - name: performance
44
+ description: Performance
45
+ color: "016175"
46
+ - name: python
47
+ description: Pull requests that update Python code
48
+ color: 2b67c6
49
+ - name: question
50
+ description: Further information is requested
51
+ color: d876e3
52
+ - name: refactoring
53
+ description: Refactoring
54
+ color: ef67c4
55
+ - name: removal
56
+ description: Removals and Deprecations
57
+ color: 9ae7ea
58
+ - name: style
59
+ description: Style
60
+ color: c120e5
61
+ - name: testing
62
+ description: Testing
63
+ color: b1fc6f
64
+ - name: wontfix
65
+ description: This will not be worked on
66
+ color: ffffff
67
+ - name: skip-changelog
68
+ description: Changes that should be omitted from the release notes
69
+ color: ededed
@@ -0,0 +1,21 @@
1
+ <!-- Many thanks for contributing to this project! -->
2
+
3
+ **PR Checklist**
4
+
5
+ <!-- Please fill in the appropriate checklist below (delete whatever is not relevant). These are the most common things requested on pull requests (PRs). -->
6
+
7
+ - [ ] Referenced issue is linked
8
+ - [ ] If you've fixed a bug or added code that should be tested, add tests!
9
+ - [ ] Documentation in `docs` is updated
10
+
11
+ **Description of changes**
12
+
13
+ <!-- Please state what you've changed and how it might affect the user. -->
14
+
15
+ **Technical details**
16
+
17
+ <!-- Please state any technical details such as limitations, reasons for additional dependencies, benchmarks etc. here. -->
18
+
19
+ **Additional context**
20
+
21
+ <!-- Add any other context or screenshots here. -->
@@ -0,0 +1,54 @@
1
+ name-template: "0.7.0 🌈"
2
+ tag-template: 0.7.0
3
+ exclude-labels:
4
+ - "skip-changelog"
5
+
6
+ categories:
7
+ - title: "🚀 Features"
8
+ labels:
9
+ - feature
10
+ - enhancement
11
+ - title: "🐛 Bug Fixes"
12
+ labels:
13
+ - fix
14
+ - bugfix
15
+ - bug
16
+ - title: "🧰 Maintenance"
17
+ label: chore
18
+ - title: ":package: Dependencies"
19
+ labels:
20
+ - dependencies
21
+ - build
22
+ - dependabot
23
+ - DEPENDABOT
24
+ version-resolver:
25
+ major:
26
+ labels:
27
+ - major
28
+ minor:
29
+ labels:
30
+ - minor
31
+ patch:
32
+ labels:
33
+ - patch
34
+ default: patch
35
+ autolabeler:
36
+ - label: chore
37
+ files:
38
+ - "*.md"
39
+ branch:
40
+ - '/docs{0,1}\/.+/'
41
+ - label: bug
42
+ branch:
43
+ - /fix\/.+/
44
+ title:
45
+ - /fix/i
46
+ - label: enhancement
47
+ branch:
48
+ - /feature\/.+/
49
+ body:
50
+ - "/JIRA-[0-9]{1,4}/"
51
+ template: |
52
+ ## Changes
53
+
54
+ $CHANGES
@@ -0,0 +1,33 @@
1
+ name: Check Build
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ package:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python 3.11
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: "3.11"
23
+ cache: "pip"
24
+ cache-dependency-path: "**/pyproject.toml"
25
+
26
+ - name: Install build dependencies
27
+ run: python -m pip install --upgrade pip wheel twine build
28
+
29
+ - name: Build package
30
+ run: python -m build
31
+
32
+ - name: Check package
33
+ run: twine check --strict dist/*.whl
@@ -0,0 +1,19 @@
1
+ name: Labeler
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+
9
+ jobs:
10
+ labeler:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Check out the repository
14
+ uses: actions/checkout@v4
15
+
16
+ - name: Run Labeler
17
+ uses: crazy-max/ghaction-github-labeler@v4.1.0
18
+ with:
19
+ skip-delete: true
@@ -0,0 +1,30 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "*.*.*"
7
+
8
+ jobs:
9
+ release:
10
+ name: Release
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout code
14
+ uses: actions/checkout@v4
15
+
16
+ - name: Set up Python 3.11
17
+ uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.11"
20
+
21
+ - name: Install hatch
22
+ run: pip install hatch
23
+
24
+ - name: Build project for distribution
25
+ run: hatch build
26
+
27
+ - name: Publish a Python distribution to PyPI
28
+ uses: pypa/gh-action-pypi-publish@release/v1
29
+ with:
30
+ password: ${{ secrets.PYPI_TOKEN }}
@@ -0,0 +1,19 @@
1
+ name: Release Drafter
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ pull_request:
7
+ branches:
8
+ - main
9
+ types:
10
+ - opened
11
+ - reopened
12
+ - synchronize
13
+ jobs:
14
+ update_release_draft:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: release-drafter/release-drafter@v5
18
+ env:
19
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
@@ -0,0 +1,64 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ test:
15
+ runs-on: ${{ matrix.os }}
16
+ defaults:
17
+ run:
18
+ shell: bash -e {0} # -e to fail on error
19
+
20
+ strategy:
21
+ fail-fast: false
22
+ matrix:
23
+ include:
24
+ - os: ubuntu-latest
25
+ python: "3.10"
26
+ - os: ubuntu-latest
27
+ python: "3.11"
28
+ - os: ubuntu-latest
29
+ python: "3.11"
30
+ pip-flags: "--pre"
31
+
32
+ env:
33
+ OS: ${{ matrix.os }}
34
+ PYTHON: ${{ matrix.python }}
35
+
36
+ steps:
37
+ - uses: actions/checkout@v4
38
+ - name: Set up Python ${{ matrix.python }}
39
+ uses: actions/setup-python@v5
40
+ with:
41
+ python-version: ${{ matrix.python }}
42
+ cache: "pip"
43
+ cache-dependency-path: "**/pyproject.toml"
44
+
45
+ - name: Install test dependencies
46
+ run: python -m pip install --upgrade uv wheel
47
+ - name: Install dependencies
48
+ run: uv pip install --system ${{ matrix.pip-flags }} ".[dev,test,coda]"
49
+
50
+ - name: Test
51
+ env:
52
+ MPLBACKEND: agg
53
+ PLATFORM: ${{ matrix.os }}
54
+ DISPLAY: :42
55
+ run: coverage run -m pytest -v --color=yes
56
+
57
+ - name: Show coverage report
58
+ run: coverage report -m
59
+
60
+ - name: Upload coverage
61
+ uses: codecov/codecov-action@v3
62
+ with:
63
+ fail_ci_if_error: true
64
+ verbose: true
@@ -0,0 +1,157 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ .pertpy_cache
49
+ nosetests.xml
50
+ coverage.xml
51
+ *.cover
52
+ *.py,cover
53
+ .hypothesis/
54
+ .pytest_cache/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+ docs/usage/*
76
+ !docs/usage/usage.md
77
+
78
+ # PyBuilder
79
+ target/
80
+
81
+ # Jupyter Notebook
82
+ .ipynb_checkpoints
83
+
84
+ # IPython
85
+ profile_default/
86
+ ipython_config.py
87
+
88
+ # pyenv
89
+ .python-version
90
+
91
+
92
+ # pipenv
93
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
95
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
96
+ # install all needed dependencies.
97
+ #Pipfile.lock
98
+
99
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
100
+ __pypackages__/
101
+
102
+ # Celery stuff
103
+ celerybeat-schedule
104
+ celerybeat.pid
105
+
106
+ # SageMath parsed files
107
+ *.sage.py
108
+
109
+ # Environments
110
+ .env
111
+ .venv
112
+ env/
113
+ venv/
114
+ ENV/
115
+ env.bak/
116
+ venv.bak/
117
+
118
+ # Spyder project settings
119
+ .spyderproject
120
+ .spyproject
121
+
122
+ # Rope project settings
123
+ .ropeproject
124
+
125
+ # mkdocs documentation
126
+ /site
127
+
128
+ # mypy
129
+ .mypy_cache/
130
+ .dmypy.json
131
+ dmypy.json
132
+ .pytype/
133
+
134
+ # Pyre type checker
135
+ .pyre/
136
+
137
+ # Jetbrains IDE
138
+ .idea/
139
+
140
+ # Coala
141
+ *.orig
142
+
143
+ # Datasets
144
+ *.h5ad
145
+ *.h5md
146
+ *.h5mu
147
+
148
+ # Test cache
149
+ cache
150
+
151
+ # Apple stuff
152
+ .DS_Store
153
+
154
+ lightning_logs/*
155
+ */lightning_logs/*
156
+
157
+ node_modules
@@ -0,0 +1,3 @@
1
+ [submodule "docs/notebooks"]
2
+ path = docs/tutorials/notebooks
3
+ url = https://github.com/theislab/pertpy-tutorials/
@@ -0,0 +1,44 @@
1
+ fail_fast: false
2
+ default_language_version:
3
+ python: python3
4
+ default_stages:
5
+ - commit
6
+ - push
7
+ minimum_pre_commit_version: 2.16.0
8
+ repos:
9
+ - repo: https://github.com/pre-commit/mirrors-prettier
10
+ rev: v4.0.0-alpha.8
11
+ hooks:
12
+ - id: prettier
13
+ - repo: https://github.com/astral-sh/ruff-pre-commit
14
+ rev: v0.3.5
15
+ hooks:
16
+ - id: ruff
17
+ args: [--fix, --exit-non-zero-on-fix, --unsafe-fixes]
18
+ - id: ruff-format
19
+ - repo: https://github.com/pre-commit/pre-commit-hooks
20
+ rev: v4.6.0
21
+ hooks:
22
+ - id: detect-private-key
23
+ - id: check-ast
24
+ - id: end-of-file-fixer
25
+ - id: mixed-line-ending
26
+ args: [--fix=lf]
27
+ - id: trailing-whitespace
28
+ - id: check-case-conflict
29
+ - repo: https://github.com/pre-commit/mirrors-mypy
30
+ rev: v1.9.0
31
+ hooks:
32
+ - id: mypy
33
+ args: [--no-strict-optional, --ignore-missing-imports]
34
+ additional_dependencies:
35
+ ["types-pkg-resources", "types-requests", "types-attrs"]
36
+ - repo: local
37
+ hooks:
38
+ - id: forbid-to-commit
39
+ name: Don't commit rej files
40
+ entry: |
41
+ Cannot commit .rej files. These indicate merge conflicts that arise during automated template updates.
42
+ Fix the merge conflicts manually and remove the .rej files.
43
+ language: fail
44
+ files: '.*\.rej$'
@@ -0,0 +1,22 @@
1
+ version: 2
2
+ build:
3
+ os: ubuntu-22.04
4
+ tools:
5
+ python: "3.11"
6
+ jobs:
7
+ pre_build:
8
+ - python -c "import pertpy"
9
+ - pip freeze
10
+ sphinx:
11
+ configuration: docs/conf.py
12
+ fail_on_warning: false
13
+ python:
14
+ install:
15
+ - method: pip
16
+ path: .
17
+ extra_requirements:
18
+ - doc
19
+ - coda
20
+
21
+ submodules:
22
+ include: all