pymetadata 0.4.2__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. pymetadata-0.5.0/.bumpversion.toml +19 -0
  2. pymetadata-0.5.0/.github/CONTRIBUTING.rst +141 -0
  3. pymetadata-0.5.0/.github/ISSUE_TEMPLATE/01-bug-report.md +49 -0
  4. pymetadata-0.5.0/.github/ISSUE_TEMPLATE/02-question.md +15 -0
  5. pymetadata-0.5.0/.github/ISSUE_TEMPLATE/03-feature-request.md +36 -0
  6. pymetadata-0.5.0/.github/ISSUE_TEMPLATE/config.yml +2 -0
  7. pymetadata-0.5.0/.github/PULL_REQUEST_TEMPLATE.md +4 -0
  8. pymetadata-0.5.0/.github/SUPPORT.rst +6 -0
  9. pymetadata-0.5.0/.github/workflows/main.yml +71 -0
  10. pymetadata-0.5.0/.github/workflows/ruff.yml +8 -0
  11. pymetadata-0.5.0/.gitignore +28 -0
  12. pymetadata-0.5.0/.pre-commit-config.yaml +12 -0
  13. pymetadata-0.5.0/.python-version +1 -0
  14. pymetadata-0.5.0/.ruff.toml +50 -0
  15. pymetadata-0.5.0/.zenodo.json +22 -0
  16. pymetadata-0.5.0/LICENSE +7 -0
  17. {pymetadata-0.4.2/src/pymetadata.egg-info → pymetadata-0.5.0}/PKG-INFO +57 -66
  18. {pymetadata-0.4.2 → pymetadata-0.5.0}/README.rst +28 -28
  19. pymetadata-0.5.0/RELEASE.md +43 -0
  20. pymetadata-0.5.0/docs/composite_annotations.md +36 -0
  21. pymetadata-0.5.0/docs/images/favicon/about.txt +6 -0
  22. pymetadata-0.5.0/docs/images/favicon/android-chrome-192x192.png +0 -0
  23. pymetadata-0.5.0/docs/images/favicon/android-chrome-512x512.png +0 -0
  24. pymetadata-0.5.0/docs/images/favicon/apple-touch-icon.png +0 -0
  25. pymetadata-0.5.0/docs/images/favicon/favicon-16x16.png +0 -0
  26. pymetadata-0.5.0/docs/images/favicon/favicon-32x32.png +0 -0
  27. pymetadata-0.5.0/docs/images/favicon/favicon.ico +0 -0
  28. pymetadata-0.5.0/docs/images/favicon/favicon_io.zip +0 -0
  29. pymetadata-0.5.0/docs/images/favicon/pymetadata-100x100-300dpi.png +0 -0
  30. pymetadata-0.5.0/docs/images/favicon/site.webmanifest +1 -0
  31. pymetadata-0.5.0/pyproject.toml +73 -0
  32. pymetadata-0.5.0/release-notes/0.0.10.md +6 -0
  33. pymetadata-0.5.0/release-notes/0.0.11.md +3 -0
  34. pymetadata-0.5.0/release-notes/0.0.12.md +3 -0
  35. pymetadata-0.5.0/release-notes/0.0.13.md +3 -0
  36. pymetadata-0.5.0/release-notes/0.0.14.md +8 -0
  37. pymetadata-0.5.0/release-notes/0.0.15.md +3 -0
  38. pymetadata-0.5.0/release-notes/0.0.16.md +3 -0
  39. pymetadata-0.5.0/release-notes/0.0.17.md +4 -0
  40. pymetadata-0.5.0/release-notes/0.0.18.md +12 -0
  41. pymetadata-0.5.0/release-notes/0.0.19.md +12 -0
  42. pymetadata-0.5.0/release-notes/0.0.2.md +4 -0
  43. pymetadata-0.5.0/release-notes/0.0.20.md +11 -0
  44. pymetadata-0.5.0/release-notes/0.0.21.md +12 -0
  45. pymetadata-0.5.0/release-notes/0.0.22.md +11 -0
  46. pymetadata-0.5.0/release-notes/0.0.3.md +4 -0
  47. pymetadata-0.5.0/release-notes/0.0.4.md +4 -0
  48. pymetadata-0.5.0/release-notes/0.0.5.md +4 -0
  49. pymetadata-0.5.0/release-notes/0.0.6.md +4 -0
  50. pymetadata-0.5.0/release-notes/0.0.7.md +4 -0
  51. pymetadata-0.5.0/release-notes/0.0.8.md +3 -0
  52. pymetadata-0.5.0/release-notes/0.0.9.md +3 -0
  53. pymetadata-0.5.0/release-notes/0.1.0.md +13 -0
  54. pymetadata-0.5.0/release-notes/0.2.1.md +13 -0
  55. pymetadata-0.5.0/release-notes/0.2.10.md +10 -0
  56. pymetadata-0.5.0/release-notes/0.2.2.md +11 -0
  57. pymetadata-0.5.0/release-notes/0.2.3.md +11 -0
  58. pymetadata-0.5.0/release-notes/0.2.4.md +13 -0
  59. pymetadata-0.5.0/release-notes/0.2.5.md +11 -0
  60. pymetadata-0.5.0/release-notes/0.2.6.md +12 -0
  61. pymetadata-0.5.0/release-notes/0.2.7.md +13 -0
  62. pymetadata-0.5.0/release-notes/0.2.8.md +19 -0
  63. pymetadata-0.5.0/release-notes/0.2.9.md +19 -0
  64. pymetadata-0.5.0/release-notes/0.3.0.md +13 -0
  65. pymetadata-0.5.0/release-notes/0.3.1.md +11 -0
  66. pymetadata-0.5.0/release-notes/0.3.10.md +10 -0
  67. pymetadata-0.5.0/release-notes/0.3.11.md +10 -0
  68. pymetadata-0.5.0/release-notes/0.3.2.md +11 -0
  69. pymetadata-0.5.0/release-notes/0.3.3.md +10 -0
  70. pymetadata-0.5.0/release-notes/0.3.4.md +29 -0
  71. pymetadata-0.5.0/release-notes/0.3.5.md +11 -0
  72. pymetadata-0.5.0/release-notes/0.3.6.md +11 -0
  73. pymetadata-0.5.0/release-notes/0.3.7.md +10 -0
  74. pymetadata-0.5.0/release-notes/0.3.8.md +10 -0
  75. pymetadata-0.5.0/release-notes/0.3.9.md +10 -0
  76. pymetadata-0.5.0/release-notes/0.4.0.md +12 -0
  77. pymetadata-0.5.0/release-notes/0.4.1.md +12 -0
  78. pymetadata-0.5.0/release-notes/0.4.2.md +27 -0
  79. pymetadata-0.5.0/release-notes/0.4.3.md +9 -0
  80. pymetadata-0.5.0/release-notes/0.4.4.md +11 -0
  81. pymetadata-0.5.0/release-notes/0.5.0.md +12 -0
  82. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/__init__.py +2 -2
  83. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/cache.py +1 -0
  84. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/chebi.py +12 -7
  85. pymetadata-0.5.0/src/pymetadata/examples/cache_path_example.py +15 -0
  86. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/examples/omex_example.py +0 -1
  87. pymetadata-0.5.0/src/pymetadata/examples/results/test_from_files.omex +0 -0
  88. pymetadata-0.5.0/src/pymetadata/examples/results/test_from_omex.omex +0 -0
  89. pymetadata-0.5.0/src/pymetadata/examples/results/testomex/README.md +3 -0
  90. pymetadata-0.5.0/src/pymetadata/examples/results/testomex/manifest.xml +9 -0
  91. pymetadata-0.5.0/src/pymetadata/examples/results/testomex/models/omex_comp.xml +174 -0
  92. pymetadata-0.5.0/src/pymetadata/examples/results/testomex/models/omex_comp_flat.xml +215 -0
  93. pymetadata-0.5.0/src/pymetadata/examples/results/testomex/models/omex_minimal.xml +99 -0
  94. pymetadata-0.5.0/src/pymetadata/examples/test.omex +0 -0
  95. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/identifiers/registry.py +4 -4
  96. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/metadata/__init__.py +2 -0
  97. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/omex.py +4 -5
  98. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/ontologies/ols.py +9 -3
  99. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/ontologies/ontology.py +0 -2
  100. pymetadata-0.5.0/src/pymetadata/resources/ontologies/README.md +4 -0
  101. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/unichem.py +16 -13
  102. pymetadata-0.5.0/tests/core/test_annotation.py +154 -0
  103. pymetadata-0.5.0/tests/core/test_creator.py +24 -0
  104. pymetadata-0.5.0/tests/data/omex/BIOMD0000000001.omex +0 -0
  105. pymetadata-0.5.0/tests/data/omex/CombineArchiveShowCase.omex +0 -0
  106. pymetadata-0.5.0/tests/data/omex/CombineArchiveShowCase_manifest.xml +25 -0
  107. pymetadata-0.5.0/tests/data/omex/CompModels.omex +0 -0
  108. pymetadata-0.5.0/tests/data/omex/CompModels_manifest.xml +9 -0
  109. pymetadata-0.5.0/tests/data/omex/iCGB21FR.omex +0 -0
  110. {pymetadata-0.4.2 → pymetadata-0.5.0}/tests/test_unichem.py +2 -2
  111. pymetadata-0.5.0/tox.ini +81 -0
  112. pymetadata-0.5.0/uv.lock +1180 -0
  113. pymetadata-0.4.2/LICENSE +0 -165
  114. pymetadata-0.4.2/MANIFEST.in +0 -7
  115. pymetadata-0.4.2/PKG-INFO +0 -163
  116. pymetadata-0.4.2/setup.cfg +0 -115
  117. pymetadata-0.4.2/setup.py +0 -7
  118. pymetadata-0.4.2/src/pymetadata/resources/identifiers_registry.json +0 -46128
  119. pymetadata-0.4.2/src/pymetadata.egg-info/SOURCES.txt +0 -47
  120. pymetadata-0.4.2/src/pymetadata.egg-info/dependency_links.txt +0 -1
  121. pymetadata-0.4.2/src/pymetadata.egg-info/requires.txt +0 -22
  122. pymetadata-0.4.2/src/pymetadata.egg-info/top_level.txt +0 -1
  123. pymetadata-0.4.2/src/pymetadata.egg-info/zip-safe +0 -1
  124. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/console.py +0 -0
  125. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/core/__init__.py +0 -0
  126. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/core/annotation.py +0 -0
  127. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/core/creator.py +0 -0
  128. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/core/synonym.py +0 -0
  129. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/core/xref.py +0 -0
  130. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/examples/__init__.py +0 -0
  131. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/identifiers/__init__.py +0 -0
  132. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/identifiers/miriam.py +0 -0
  133. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/log.py +0 -0
  134. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/metadata/eco.py +0 -0
  135. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/metadata/kisao.py +0 -0
  136. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/metadata/sbo.py +0 -0
  137. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/omex_v2.py +0 -0
  138. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/ontologies/__init__.py +0 -0
  139. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/py.typed +0 -0
  140. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/resources/chebi_webservice_wsdl.xml +0 -0
  141. {pymetadata-0.4.2 → pymetadata-0.5.0}/src/pymetadata/resources/templates/ontology_enum.pytemplate +0 -0
  142. {pymetadata-0.4.2 → pymetadata-0.5.0}/tests/test_chebi.py +0 -0
  143. {pymetadata-0.4.2 → pymetadata-0.5.0}/tests/test_ols.py +0 -0
  144. {pymetadata-0.4.2 → pymetadata-0.5.0}/tests/test_omex.py +0 -0
  145. {pymetadata-0.4.2 → pymetadata-0.5.0}/tests/test_ontology.py +0 -0
  146. {pymetadata-0.4.2 → pymetadata-0.5.0}/tests/test_registry.py +0 -0
  147. {pymetadata-0.4.2 → pymetadata-0.5.0}/tests/test_sbo_kisao.py +0 -0
@@ -0,0 +1,19 @@
1
+ [tool.bumpversion]
2
+ current_version = "0.5.0"
3
+ commit = true
4
+ parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
5
+ serialize = ["{major}.{minor}.{patch}"]
6
+ search = "{current_version}"
7
+ replace = "{new_version}"
8
+ regex = false
9
+ ignore_missing_version = false
10
+ tag = true
11
+ sign_tags = false
12
+ tag_name = "{new_version}"
13
+ tag_message = "Bump version: {current_version} → {new_version}"
14
+ allow_dirty = false
15
+ message = "Bump version: {current_version} → {new_version}"
16
+ commit_args = ""
17
+
18
+ [[tool.bumpversion.files]]
19
+ filename = "./src/pymetadata/__init__.py"
@@ -0,0 +1,141 @@
1
+ ============
2
+ Contributing
3
+ ============
4
+
5
+ Contributions are welcome, and they are greatly appreciated! Every little bit
6
+ helps, and credit will always be given.
7
+
8
+ You can contribute in many ways:
9
+
10
+ Report Bugs
11
+ ===========
12
+
13
+ Report bugs at https://github.com/matthiaskoenig/pymetadata/issues.
14
+
15
+ If you are reporting a bug, please follow the template guide lines. The more
16
+ detailed your report, the easier and thus faster we can help you.
17
+
18
+ Fix Bugs
19
+ ========
20
+
21
+ Look through the GitHub issues for bugs.
22
+
23
+ Implement Features
24
+ ==================
25
+
26
+ Look through the GitHub issues for features.
27
+
28
+ Write Documentation
29
+ ===================
30
+
31
+ pymetadata could always use more documentation, whether as part of the official
32
+ documentation, in docstrings, or even on the web in blog posts, articles, and
33
+ such.
34
+
35
+ Submit Feedback
36
+ ===============
37
+
38
+ The best way to send feedback is to file an issue at
39
+ https://github.com/matthiaskoenig/pymetadata/issues.
40
+
41
+ If you are proposing a feature:
42
+
43
+ * Explain in detail how it would work.
44
+ * Keep the scope as narrow as possible, to make it easier to implement.
45
+ * Remember that this is a volunteer-driven project, and that contributions are
46
+ welcome :)
47
+
48
+ Get Started!
49
+ ============
50
+
51
+ Ready to contribute? Here's how to set up pymetadata for local development.
52
+
53
+ 1. Fork the https://github.com/matthiaskoenig/pymetadata repository on GitHub. If you
54
+ have never done this before, `follow the official guide
55
+ <https://guides.github.com/activities/forking/>`_
56
+ 2. Clone your fork locally as described in the same guide.
57
+ 3. Install your local copy into a a Python virtual environment. We recommend using ``uv`` for
58
+ managing the environments
59
+
60
+ .. code-block:: console
61
+
62
+ # install dependencies
63
+ uv sync
64
+ # install dev dependencies
65
+ uv pip install -r pyproject.toml --extra dev
66
+ # install tox-uv support
67
+ uv tool install tox --with tox-uv
68
+
69
+
70
+ 4. Create a branch for local development using the ``develop`` branch as a
71
+ starting point.
72
+
73
+ .. code-block:: console
74
+
75
+ git checkout devel
76
+ git checkout -b fix-name-of-your-bugfix
77
+
78
+ Now you can make your changes locally.
79
+
80
+ 5. When making changes locally, it is helpful to ``git commit`` your work
81
+ regularly. On one hand to save your work and on the other hand, the smaller
82
+ the steps, the easier it is to review your work later.
83
+
84
+ .. code-block:: console
85
+
86
+ git add .
87
+ git commit -m "fix: Your summary of changes"
88
+
89
+ 6. When you're done making changes, check that your changes pass our test suite.
90
+ This is all included with tox
91
+
92
+ .. code-block:: console
93
+
94
+ tox run-parallel
95
+
96
+
97
+ 7. Push your branch to GitHub.
98
+
99
+ .. code-block:: console
100
+
101
+ git push origin fix-name-of-your-bugfix
102
+
103
+ 8. Open the link displayed in the message when pushing your new branch in order
104
+ to submit a pull request. Please follow the template presented to you in the
105
+ web interface to complete your pull request.
106
+
107
+ For larger features that you want to work on collaboratively with other pymetadata
108
+ team members, you may consider to first request to join the pymetadata developers
109
+ team to get write access to the repository so that you can create a branch in
110
+ the main repository (or simply ask the maintainer to create a branch for you).
111
+ Once you have a new branch you can push your changes directly to the main
112
+ repository and when finished, submit a pull request from that branch to
113
+ ``develop``.
114
+
115
+ Unit tests and benchmarks
116
+ -------------------------
117
+
118
+ pymetadata uses `pytest <http://docs.pytest.org/en/latest/>`_ for its
119
+ unit-tests and new features should in general always come with new
120
+ tests that make sure that the code runs as intended.
121
+
122
+ To run all tests do::
123
+
124
+ $ tox run-parallel
125
+
126
+ Branching model
127
+ ---------------
128
+
129
+ ``develop``
130
+ Is the branch all pull-requests should be based on.
131
+ ``main``
132
+ Is only touched by maintainers and is the branch with only tested, reviewed
133
+ code that is released or ready for the next release.
134
+ ``{fix, bugfix, doc, feature}/descriptive-name``
135
+ Is the recommended naming scheme for smaller improvements, bugfixes,
136
+ documentation improvement and new features respectively.
137
+
138
+ Please use concise descriptive commit messages and consider using
139
+ ``git pull --rebase`` when you update your own fork to avoid merge commits.
140
+
141
+ Thank you very much for contributing to pymetadata!
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report a bug to help improve this project
4
+ ---
5
+
6
+ <!--
7
+
8
+ Before you create a new problem report, please look through the list of existing open
9
+ and closed issues to see if there are similar ones.
10
+
11
+ https://github.com/matthiaskoenig/pymetadata/issues
12
+
13
+ -->
14
+
15
+ #### Problem description
16
+
17
+ Please explain:
18
+ * **what** you tried to achieve,
19
+ * **how** you went about it (referring to the code sample), and
20
+ * **why** the current behaviour is a problem and what output
21
+ you expected instead.
22
+
23
+ #### Code Sample
24
+
25
+ Create a [minimal, complete, verifiable example](https://stackoverflow.com/help/mcve).
26
+
27
+ <!-- Paste your code between the ``` tickmarks below or link to a gist. -->
28
+ ```python
29
+ ```
30
+
31
+ <!-- If there was a crash, please include the traceback between the ``` tickmarks below. -->
32
+ ```
33
+ ```
34
+
35
+ ### Context
36
+
37
+ <!-- Run the following code and paste the output between the ``` tickmarks below
38
+ inside the details block.
39
+
40
+ python -c "import pymetadata;pymetadata.show_versions()"
41
+
42
+ -->
43
+
44
+ <details>
45
+
46
+ ```
47
+ ```
48
+
49
+ </details>
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: Question
3
+ about: Ask a question
4
+ ---
5
+
6
+ ### Checklist
7
+
8
+ <!-- To help keep this issue tracker clean and focused, please make sure that you have
9
+ tried *all* of the following resources before submitting your question. -->
10
+
11
+ - [ ] I looked through [similar issues on GitHub](https://github.com/matthiaskoenig/pymetadata/issues).
12
+
13
+ ### Question
14
+
15
+ <!-- Please ask your question here. -->
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ ---
5
+
6
+ ### Checklist
7
+
8
+ <!-- Please make sure you check all these items before submitting your feature request. -->
9
+
10
+ - [ ] There are [no similar issues or pull requests](https://github.com/matthiaskoenig/pymetadata/issues) for this yet.
11
+
12
+ ### Is your feature related to a problem? Please describe it.
13
+
14
+ <!--
15
+ A clear and concise description of what you are trying to achieve.
16
+ "I want to be able to [...] but I can't because [...]".
17
+ -->
18
+
19
+ ## Describe the solution you would like.
20
+
21
+ <!--
22
+ A clear and concise description of what you would want to happen.
23
+ For API changes, try to provide a code snippet of what you would like the new API to
24
+ look like.
25
+ -->
26
+
27
+ ## Describe alternatives you considered
28
+
29
+ <!--
30
+ Please describe any alternative solutions or features you've considered to solve
31
+ your problem and why they wouldn't solve it.
32
+ -->
33
+
34
+ ## Additional context
35
+
36
+ <!-- Provide any additional context, screenshots, tracebacks, etc. about the feature here. -->
@@ -0,0 +1,2 @@
1
+ # Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
2
+ blank_issues_enabled: true
@@ -0,0 +1,4 @@
1
+ * [ ] fix #(issue number)
2
+ * [ ] description of feature/fix
3
+ * [ ] tests added/passed
4
+ * [ ] add an entry to the [next release](../release-notes/next-release.md)
@@ -0,0 +1,6 @@
1
+ =======
2
+ Support
3
+ =======
4
+
5
+ * You can post questions in `GitHub issues
6
+ <https://github.com/matthiaskoenig/pymetadata/issues>`_.
@@ -0,0 +1,71 @@
1
+ name: CI-CD
2
+
3
+ on: [push]
4
+ jobs:
5
+ test:
6
+ runs-on: ${{ matrix.os }}
7
+ strategy:
8
+ fail-fast: false
9
+ matrix:
10
+ os: [ubuntu-latest]
11
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - name: Set up Python ${{ matrix.python-version }}
16
+ uses: actions/setup-python@v5
17
+ with:
18
+ python-version: ${{ matrix.python-version }}
19
+ - name: Install dependencies
20
+ run: |
21
+ python -m pip install --upgrade pip wheel
22
+ python -m pip install tox tox-gh-actions
23
+
24
+ # Update output format to enable automatic inline annotations.
25
+ - name: Test with tox
26
+ run:
27
+ tox --
28
+
29
+ release:
30
+ needs: test
31
+ if: startsWith(github.ref, 'refs/tags')
32
+ runs-on: ${{ matrix.os }}
33
+ strategy:
34
+ matrix:
35
+ os: [ubuntu-latest]
36
+ python-version: ["3.13"]
37
+ environment:
38
+ name: pypi
39
+ url: https://pypi.org/p/<your-pypi-project-name>
40
+ permissions:
41
+ id-token: write
42
+ contents: write
43
+ steps:
44
+ - uses: actions/checkout@v4
45
+ - name: Set up Python ${{ matrix.python-version }}
46
+ uses: actions/setup-python@v5
47
+ with:
48
+ python-version: ${{ matrix.python-version }}
49
+ - name: Get tag
50
+ id: tag
51
+ run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
52
+ - name: Install dependencies
53
+ run: |
54
+ python -m pip install --upgrade pip
55
+ python -m pip install hatch twine
56
+
57
+ - name: Build package
58
+ # run: python setup.py sdist bdist_wheel
59
+ run: hatch build
60
+ - name: Check the package
61
+ run: twine check dist/*
62
+ - name: Publish to PyPI
63
+ uses: pypa/gh-action-pypi-publish@release/v1
64
+ with:
65
+ packages-dir: dist
66
+ - name: Create GitHub release
67
+ uses: softprops/action-gh-release@v1
68
+ with:
69
+ body_path: "release-notes/${{ github.ref_name }}.md"
70
+ draft: false
71
+ prerelease: false
@@ -0,0 +1,8 @@
1
+ name: Ruff
2
+ on: [ push, pull_request ]
3
+ jobs:
4
+ ruff:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - uses: actions/checkout@v4
8
+ - uses: astral-sh/ruff-action@v3
@@ -0,0 +1,28 @@
1
+ .vscode
2
+ *.pyc
3
+ *~
4
+ .DS_Store
5
+ .eggs/
6
+ dist
7
+ build
8
+ .idea
9
+ cover/
10
+ .tox/
11
+ .venv
12
+ .cache/
13
+ .coverage
14
+ coverage.xml
15
+ .benchmark
16
+ src/pymetadata.egg-info/
17
+ src/pymetadata/resources/cache
18
+
19
+
20
+ wheels
21
+ __pycache__
22
+ .pytest_cache
23
+ .Rhistory
24
+ *.tsv#
25
+ *.xlsx#
26
+
27
+ # OWL ontologies
28
+ *.owl.gz
@@ -0,0 +1,12 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ # Ruff version.
4
+ rev: v0.8.6
5
+ hooks:
6
+ # Run the linter.
7
+ - id: ruff
8
+ types_or: [ python, pyi ]
9
+ args: [ --fix ]
10
+ # Run the formatter.
11
+ - id: ruff-format
12
+ types_or: [ python, pyi ]
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,50 @@
1
+ # Same as Black.
2
+ line-length = 88
3
+ indent-width = 4
4
+
5
+ target-version = "py313"
6
+
7
+
8
+ [lint]
9
+ # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
10
+ # Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
11
+ # McCabe complexity (`C901`) by default.
12
+ select = ["E4", "E7", "E9", "F"]
13
+ ignore = []
14
+
15
+ # Allow fix for all enabled rules (when `--fix`) is provided.
16
+ fixable = ["ALL"]
17
+ unfixable = []
18
+
19
+ # Allow unused variables when underscore-prefixed.
20
+ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
21
+
22
+ [format]
23
+ # Like Black, use double quotes for strings.
24
+ quote-style = "double"
25
+
26
+ # Like Black, indent with spaces, rather than tabs.
27
+ indent-style = "space"
28
+
29
+ # Like Black, respect magic trailing commas.
30
+ skip-magic-trailing-comma = false
31
+
32
+ # Like Black, automatically detect the appropriate line ending.
33
+ line-ending = "auto"
34
+
35
+ # Enable auto-formatting of code examples in docstrings. Markdown,
36
+ # reStructuredText code/literal blocks and doctests are all supported.
37
+ #
38
+ # This is currently disabled by default, but it is planned for this
39
+ # to be opt-out in the future.
40
+ docstring-code-format = false
41
+
42
+ # Set the line length limit used when formatting code snippets in
43
+ # docstrings.
44
+ #
45
+ # This only has an effect when the `docstring-code-format` setting is
46
+ # enabled.
47
+ docstring-code-line-length = "dynamic"
48
+
49
+ [lint.pydocstyle]
50
+ convention = "google" # Accepts: "google", "numpy", or "pep257".
@@ -0,0 +1,22 @@
1
+ {
2
+ "upload_type": "software",
3
+ "title": "pymetadata are python utilities for working with metadata",
4
+ "creators": [
5
+ {
6
+ "orcid": "0000-0003-1725-179X",
7
+ "affiliation": "Humboldt-University Berlin, Institute for Theoretical Biology, Berlin",
8
+ "name": "König, Matthias"
9
+ }
10
+ ],
11
+ "description": "<p><code>pymetadata</code> is a collection of python utilities for working with metadata in the context of COMBINE standards with source code available from available from <a href=\"https://github.com/matthiaskoenig/pymetadata\">https://github.com/matthiaskoenig/pymetadata</a></p><p>Features include among others<ul><li>annotation classes and helpers</li></ul></p><p>If you have any questions or issues please <a href=\"https://github.com/matthiaskoenig/pymetadata/issues\">open an issue</a></p><h2>Funding</h2><p>Matthias König (MK) was supported by the Federal Ministry of Education and Research (BMBF, Germany) within the research network Systems Medicine of the Liver (**LiSyM**, grant number 031L0054). MK is supported by the Federal Ministry of Education and Research (BMBF, Germany) within ATLAS by grant number 031L0304B and by the German Research Foundation (DFG) within the Research Unit Program FOR 5151 QuaLiPerF (Quantifying Liver Perfusion-Function Relationship in Complex Resection - A Systems Medicine Approach) by grant number 436883643 and by grant number 465194077 (Priority Programme SPP 2311, Subproject SimLivA).</p>",
12
+ "access_right": "open",
13
+ "license": "MIT",
14
+ "keywords": [
15
+ "modeling",
16
+ "standardization",
17
+ "COMBINE",
18
+ "metadata",
19
+ "archive",
20
+ "annotation"
21
+ ]
22
+ }
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2025 Matthias König
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,53 +1,44 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: pymetadata
3
- Version: 0.4.2
3
+ Version: 0.5.0
4
4
  Summary: pymetadata are python utilities for working with metadata.
5
- Home-page: https://github.com/matthiaskoenig/pymetadata
6
- Download-URL: https://pypi.org/project/pymetadata
7
- Author: Matthias Koenig
8
- Author-email: konigmatt@googlemail.com
9
- Maintainer: Matthias Koenig
10
- Maintainer-email: konigmatt@googlemail.com
11
- License: LGPL-3.0
12
- Project-URL: Source Code, https://github.com/matthiaskoenig/pymetadata
13
- Project-URL: Documentation, https://github.com/matthiaskoenig/pymetadata
14
- Project-URL: Bug Tracker, https://github.com/matthiaskoenig/pymetadata/issues
15
- Keywords: modeling,standardization,COMBINE,metadata,archive,annotation
5
+ Author-email: Matthias König <konigmatt@googlemail.com>
6
+ Maintainer-email: Matthias König <konigmatt@googlemail.com>
7
+ License-File: LICENSE
8
+ Keywords: COMBINE,annotation,archive,metadata,modeling,standardization
16
9
  Classifier: Development Status :: 4 - Beta
17
10
  Classifier: Intended Audience :: Science/Research
18
- Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
11
+ Classifier: License :: OSI Approved :: MIT License
19
12
  Classifier: Operating System :: OS Independent
20
- Classifier: Programming Language :: Python :: 3.9
21
13
  Classifier: Programming Language :: Python :: 3.10
22
14
  Classifier: Programming Language :: Python :: 3.11
23
15
  Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
24
17
  Classifier: Programming Language :: Python :: Implementation :: CPython
25
18
  Classifier: Topic :: Scientific/Engineering
26
19
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
27
- Requires-Python: >=3.9
28
- Description-Content-Type: text/x-rst
29
- License-File: LICENSE
30
- Requires-Dist: depinfo>=1.7
31
- Requires-Dist: lxml>=5.2
32
- Requires-Dist: rich>=13.7
33
- Requires-Dist: requests>=2.31
34
- Requires-Dist: zeep>=4.2.1
35
- Requires-Dist: pronto>=2.5.6
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: depinfo>=2.2.0
36
22
  Requires-Dist: fastobo>=0.12.3
37
- Requires-Dist: jinja2>=3.1
38
- Requires-Dist: xmltodict>=0.13.0
39
- Requires-Dist: pydantic>=2.6
40
- Provides-Extra: development
41
- Requires-Dist: pip-tools>=7.4.1; extra == "development"
42
- Requires-Dist: black>=24.3.0; extra == "development"
43
- Requires-Dist: bump2version>=1.0.1; extra == "development"
44
- Requires-Dist: isort>=5.13.2; extra == "development"
45
- Requires-Dist: tox>=4.12.2; extra == "development"
46
- Requires-Dist: flake8>=7.0.0; extra == "development"
47
- Requires-Dist: flake8-mypy>=17.8.0; extra == "development"
48
- Requires-Dist: mypy>=1.9.0; extra == "development"
49
- Requires-Dist: pytest>=8.1.1; extra == "development"
50
- Requires-Dist: pytest-cov>=5.0.0; extra == "development"
23
+ Requires-Dist: jinja2>=3.1.5
24
+ Requires-Dist: lxml>=5.3
25
+ Requires-Dist: pronto>=2.5.8
26
+ Requires-Dist: pydantic>=2.10.4
27
+ Requires-Dist: requests>=2.32.3
28
+ Requires-Dist: rich>=13.9.4
29
+ Requires-Dist: xmltodict>=0.14.2
30
+ Requires-Dist: zeep>=4.3.1
31
+ Provides-Extra: dev
32
+ Requires-Dist: bump-my-version>=0.29.0; extra == 'dev'
33
+ Requires-Dist: hatch; extra == 'dev'
34
+ Requires-Dist: mypy>=1.9.0; extra == 'dev'
35
+ Requires-Dist: pre-commit>=4.0.1; extra == 'dev'
36
+ Requires-Dist: ruff>=0.8.6; extra == 'dev'
37
+ Provides-Extra: test
38
+ Requires-Dist: pytest-cov>=5.0.0; extra == 'test'
39
+ Requires-Dist: pytest>=8.1.1; extra == 'test'
40
+ Requires-Dist: tox>=4.14.2; extra == 'test'
41
+ Description-Content-Type: text/x-rst
51
42
 
52
43
  .. image:: https://github.com/matthiaskoenig/pymetadata/raw/develop/docs/images/favicon/pymetadata-100x100-300dpi.png
53
44
  :align: left
@@ -55,7 +46,7 @@ Requires-Dist: pytest-cov>=5.0.0; extra == "development"
55
46
 
56
47
  pymetadata: python utilities for metadata and COMBINE archives
57
48
  ==============================================================
58
- |icon1| |icon2| |icon3| |icon4| |icon5| |icon6| |icon7|
49
+ |icon1| |icon2| |icon3| |icon4| |icon5| |icon6|
59
50
 
60
51
 
61
52
  .. |icon1| image:: https://github.com/matthiaskoenig/pymetadata/workflows/CI-CD/badge.svg
@@ -68,15 +59,12 @@ pymetadata: python utilities for metadata and COMBINE archives
68
59
  :target: https://pypi.org/project/pymetadata/
69
60
  :alt: Supported Python Versions
70
61
  .. |icon4| image:: https://img.shields.io/pypi/l/pymetadata.svg
71
- :target: http://opensource.org/licenses/LGPL-3.0
72
- :alt: GNU Lesser General Public License 3
62
+ :target: https://opensource.org/licenses/MIT
63
+ :alt: MIT License
73
64
  .. |icon5| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.5308801.svg
74
65
  :target: https://doi.org/10.5281/zenodo.5308801
75
66
  :alt: Zenodo DOI
76
- .. |icon6| image:: https://img.shields.io/badge/code%20style-black-000000.svg
77
- :target: https://github.com/ambv/black
78
- :alt: Black
79
- .. |icon7| image:: http://www.mypy-lang.org/static/mypy_badge.svg
67
+ .. |icon6| image:: http://www.mypy-lang.org/static/mypy_badge.svg
80
68
  :target: http://mypy-lang.org/
81
69
  :alt: mypy
82
70
 
@@ -113,29 +101,12 @@ get started.
113
101
 
114
102
  License
115
103
  =======
116
-
117
- * Source Code: `LGPLv3 <http://opensource.org/licenses/LGPL-3.0>`__
118
- * Documentation: `CC BY-SA 4.0 <http://creativecommons.org/licenses/by-sa/4.0/>`__
119
-
120
- The pymetadata source is released under both the GPL and LGPL licenses version 2 or
121
- later. You may choose which license you choose to use the software under.
122
-
123
- This program is free software: you can redistribute it and/or modify it under
124
- the terms of the GNU General Public License or the GNU Lesser General Public
125
- License as published by the Free Software Foundation, either version 2 of the
126
- License, or (at your option) any later version.
127
-
128
- This program is distributed in the hope that it will be useful, but WITHOUT ANY
129
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
130
- PARTICULAR PURPOSE. See the GNU General Public License for more details.
104
+ * Source Code: `MIT <https://opensource.org/license/MIT>`__
105
+ * Documentation: `CC BY-SA 4.0 <https://creativecommons.org/licenses/by-sa/4.0/>`__
131
106
 
132
107
  Funding
133
108
  =======
134
- Matthias König was supported by the Federal Ministry of Education and Research (BMBF, Germany)
135
- within the research network Systems Medicine of the Liver (**LiSyM**, grant number 031L0054)
136
- and is supported by the German Research Foundation (DFG) within the Research Unit Programme FOR 5151
137
- "`QuaLiPerF <https://qualiperf.de>`__ (Quantifying Liver Perfusion-Function Relationship in Complex Resection -
138
- A Systems Medicine Approach)" by grant number 436883643 and by grant number 465194077 (Priority Programme SPP 2311, Subproject SimLivA), and
109
+ Matthias König (MK) was supported by the Federal Ministry of Education and Research (BMBF, Germany) within the research network Systems Medicine of the Liver (**LiSyM**, grant number 031L0054). MK is supported by the Federal Ministry of Education and Research (BMBF, Germany) within ATLAS by grant number 031L0304B and by the German Research Foundation (DFG) within the Research Unit Program FOR 5151 QuaLiPerF (Quantifying Liver Perfusion-Function Relationship in Complex Resection - A Systems Medicine Approach) by grant number 436883643 and by grant number 465194077 (Priority Programme SPP 2311, Subproject SimLivA).
139
110
 
140
111
  Installation
141
112
  ============
@@ -156,8 +127,28 @@ Or via cloning the repository and installing via::
156
127
  cd pymetadata
157
128
  pip install -e .
158
129
 
130
+
159
131
  To install for development use::
160
132
 
161
133
  pip install -e .[development]
162
134
 
163
- © 2021-2024 Matthias König
135
+
136
+ Cache path
137
+ ==========
138
+ `pymetadata` caches some information for faster retrieval. The cache path is set to::
139
+
140
+ CACHE_PATH: Path = Path.home() / ".cache" / "pymetadata"
141
+
142
+ To use a custom cache path use::
143
+
144
+ import pymetadata
145
+ pymetadata.CACHE_PATH = <cache_path>
146
+
147
+
148
+ Checks
149
+ ==========
150
+ - uv for project setup
151
+ - ruff for linting, formating
152
+ - mypy for type checking
153
+
154
+ © 2021-2025 Matthias König