invenio-subjects-mesh-lite 2023.1.4__tar.gz → 2025.1.15__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.
- invenio_subjects_mesh_lite-2025.1.15/CHANGES.md +21 -0
- {invenio-subjects-mesh-lite-2023.1.4 → invenio_subjects_mesh_lite-2025.1.15}/MANIFEST.in +1 -0
- {invenio-subjects-mesh-lite-2023.1.4/invenio_subjects_mesh_lite.egg-info → invenio_subjects_mesh_lite-2025.1.15}/PKG-INFO +41 -33
- invenio_subjects_mesh_lite-2025.1.15/README.md +122 -0
- invenio_subjects_mesh_lite-2025.1.15/invenio_subjects_mesh_lite/vocabularies/subjects_mesh.csv +30361 -0
- {invenio-subjects-mesh-lite-2023.1.4 → invenio_subjects_mesh_lite-2025.1.15}/invenio_subjects_mesh_lite/vocabularies/vocabularies.yaml +1 -1
- {invenio-subjects-mesh-lite-2023.1.4 → invenio_subjects_mesh_lite-2025.1.15/invenio_subjects_mesh_lite.egg-info}/PKG-INFO +41 -33
- {invenio-subjects-mesh-lite-2023.1.4 → invenio_subjects_mesh_lite-2025.1.15}/invenio_subjects_mesh_lite.egg-info/SOURCES.txt +1 -1
- invenio_subjects_mesh_lite-2025.1.15/invenio_subjects_mesh_lite.egg-info/requires.txt +8 -0
- {invenio-subjects-mesh-lite-2023.1.4 → invenio_subjects_mesh_lite-2025.1.15}/pyproject.toml +17 -11
- invenio-subjects-mesh-lite-2023.1.4/CHANGES.md +0 -9
- invenio-subjects-mesh-lite-2023.1.4/README.md +0 -110
- invenio-subjects-mesh-lite-2023.1.4/invenio_subjects_mesh_lite/vocabularies/subjects_mesh.jsonl +0 -29865
- invenio-subjects-mesh-lite-2023.1.4/invenio_subjects_mesh_lite.egg-info/requires.txt +0 -11
- {invenio-subjects-mesh-lite-2023.1.4 → invenio_subjects_mesh_lite-2025.1.15}/LICENSE +0 -0
- {invenio-subjects-mesh-lite-2023.1.4 → invenio_subjects_mesh_lite-2025.1.15}/invenio_subjects_mesh_lite/__init__.py +0 -0
- {invenio-subjects-mesh-lite-2023.1.4 → invenio_subjects_mesh_lite-2025.1.15}/invenio_subjects_mesh_lite/vocabularies/__init__.py +0 -0
- {invenio-subjects-mesh-lite-2023.1.4 → invenio_subjects_mesh_lite-2025.1.15}/invenio_subjects_mesh_lite.egg-info/dependency_links.txt +0 -0
- {invenio-subjects-mesh-lite-2023.1.4 → invenio_subjects_mesh_lite-2025.1.15}/invenio_subjects_mesh_lite.egg-info/entry_points.txt +0 -0
- {invenio-subjects-mesh-lite-2023.1.4 → invenio_subjects_mesh_lite-2025.1.15}/invenio_subjects_mesh_lite.egg-info/top_level.txt +0 -0
- {invenio-subjects-mesh-lite-2023.1.4 → invenio_subjects_mesh_lite-2025.1.15}/setup.cfg +0 -0
- {invenio-subjects-mesh-lite-2023.1.4 → invenio_subjects_mesh_lite-2025.1.15}/tests/test_invenio_subjects_mesh_lite.py +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changes
|
|
2
|
+
|
|
3
|
+
Version 2025.1.15 (released 2025-01-15)
|
|
4
|
+
|
|
5
|
+
- MeSH 2025
|
|
6
|
+
|
|
7
|
+
Version 2024.3.6 (released 2024-08-09)
|
|
8
|
+
|
|
9
|
+
- make compatible with InvenioRDM v12
|
|
10
|
+
|
|
11
|
+
Version 2024.3.5 (released 2024-05-22)
|
|
12
|
+
|
|
13
|
+
- patch fix from galter-subjects-utils
|
|
14
|
+
|
|
15
|
+
Version 2023.1.4 (released 2023-11-7)
|
|
16
|
+
|
|
17
|
+
- Polished release
|
|
18
|
+
|
|
19
|
+
Version 0.1.0 (released 2023-10-30)
|
|
20
|
+
|
|
21
|
+
- Initial public release.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: invenio-subjects-mesh-lite
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2025.1.15
|
|
4
4
|
Summary: MeSH subject terms without qualifiers
|
|
5
5
|
Author-email: Northwestern University <DL_FSM_GDS@e.northwestern.edu>
|
|
6
6
|
License: MIT License
|
|
@@ -35,28 +35,28 @@ Classifier: Programming Language :: Python
|
|
|
35
35
|
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
|
|
36
36
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
37
37
|
Classifier: Programming Language :: Python :: 3
|
|
38
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
39
38
|
Classifier: Programming Language :: Python :: 3.9
|
|
40
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
41
39
|
Classifier: Programming Language :: Python :: 3.11
|
|
42
|
-
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
41
|
+
Requires-Python: >=3.9
|
|
43
42
|
Description-Content-Type: text/markdown
|
|
44
43
|
License-File: LICENSE
|
|
44
|
+
Requires-Dist: galter-subjects-utils<2.0,>=0.4.2
|
|
45
45
|
Provides-Extra: dev
|
|
46
46
|
Requires-Dist: check-manifest>=0.49; extra == "dev"
|
|
47
|
+
Requires-Dist: invenio-search[opensearch2]<3.0,>=2.1.0; extra == "dev"
|
|
47
48
|
Requires-Dist: invoke<3.0,>=2.2; extra == "dev"
|
|
48
|
-
Requires-Dist: galter-subjects-utils<2.0,>=0.1.0; extra == "dev"
|
|
49
49
|
Requires-Dist: pyyaml>=5.4.1; extra == "dev"
|
|
50
|
-
Requires-Dist: pytest
|
|
51
|
-
Requires-Dist: pytest-cov>=3.0.0; extra == "dev"
|
|
52
|
-
Requires-Dist: pytest-isort>=3.0.0; extra == "dev"
|
|
53
|
-
Requires-Dist: pytest-pycodestyle>=2.2.0; extra == "dev"
|
|
54
|
-
Requires-Dist: pytest-pydocstyle>=2.2.3; extra == "dev"
|
|
50
|
+
Requires-Dist: pytest-invenio<3.0.0,>=2.1.1; extra == "dev"
|
|
55
51
|
|
|
56
52
|
# invenio-subjects-mesh-lite
|
|
57
53
|
|
|
58
54
|
*MeSH topical subject terms without qualifiers for InvenioRDM*
|
|
59
55
|
|
|
56
|
+
<a href="https://pypi.org/project/invenio-subjects-mesh-lite/">
|
|
57
|
+
<img src="https://img.shields.io/pypi/v/invenio-subjects-mesh-lite.svg">
|
|
58
|
+
</a>
|
|
59
|
+
|
|
60
60
|
Install this extension to get Medical Subject Headings topics without qualifiers into your instance.
|
|
61
61
|
|
|
62
62
|
If you are looking for a larger MeSH vocabulary with qualifiers, use
|
|
@@ -89,44 +89,52 @@ table will be provided to indicate version cross-compatibility.
|
|
|
89
89
|
|
|
90
90
|
## Usage
|
|
91
91
|
|
|
92
|
-
There are 2 types of users for this package. Instance
|
|
92
|
+
There are 2 types of users for this package. Instance operators and package maintainers.
|
|
93
93
|
|
|
94
|
-
### Instance
|
|
94
|
+
### Instance operators
|
|
95
95
|
|
|
96
|
-
For instance
|
|
96
|
+
For instance operators, after you have installed the extension as per the steps above, you will want to reload your instance's fixtures: `pipenv run invenio rdm-records fixtures`. This will install the new terms in your instance.
|
|
97
97
|
|
|
98
|
-
Updating
|
|
98
|
+
Alternatively, or if you want to update your already loaded subjects to a new listing (e.g. from one year's list to another), you can update your instance's MeSH subjects as per below. Updating subjects this way takes care of everything for you: the subjects themselves and the records/drafts using those subjects. **WARNING** This operation can _remove_ subjects.
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
```bash
|
|
101
|
+
# In your instance's project
|
|
102
|
+
# Download up-to-date listings
|
|
103
|
+
pipenv run invenio galter_subjects mesh download -d /path/to/downloads/storage/ -y YEAR
|
|
104
|
+
# Generate file containg deltas to transition your instance to the downloaded listing
|
|
105
|
+
pipenv run invenio galter_subjects mesh deltas -d /path/to/downloads/storage/ -y YEAR -f topic -o deltas_mesh.csv
|
|
106
|
+
# Update your instance - *this operation will modify your instance*
|
|
107
|
+
pipenv run invenio galter_subjects update deltas_mesh.csv
|
|
108
|
+
```
|
|
101
109
|
|
|
102
|
-
|
|
110
|
+
Look at the help text for these commands to see additional options that can be passed.
|
|
111
|
+
In particular, options for `galter_subjects update` allow you to store renamed, replaced or removed subjects on records according to a template of your choice.
|
|
103
112
|
|
|
104
|
-
0. Install this package locally with the `dev` extra:
|
|
105
113
|
|
|
106
|
-
|
|
107
|
-
pipenv run pip install -e .[dev]
|
|
108
|
-
```
|
|
114
|
+
### Maintainers
|
|
109
115
|
|
|
110
|
-
|
|
116
|
+
When a new list of MeSH term comes out, this package should be updated. Here we show how.
|
|
111
117
|
|
|
112
|
-
|
|
113
|
-
pipenv run galter-subjects-utils mesh --filter topic --output-file invenio_subjects_mesh_lite/vocabularies/subjects_mesh.jsonl
|
|
114
|
-
```
|
|
118
|
+
**Pre-requisite/Context**
|
|
115
119
|
|
|
116
|
-
|
|
120
|
+
[Install the distribution package for development](#development) before you do anything.
|
|
117
121
|
|
|
118
|
-
|
|
119
|
-
2. Read it filtering for topics
|
|
120
|
-
3. Convert terms to InvenioRDM subjects format
|
|
121
|
-
4. Write those to the specified file
|
|
122
|
+
**Commands**
|
|
122
123
|
|
|
123
|
-
|
|
124
|
+
Once you have it installed, you can run the following commands in the isolated virtualenv:
|
|
124
125
|
|
|
125
126
|
```bash
|
|
126
|
-
|
|
127
|
+
# In this project
|
|
128
|
+
# Download up-to-date listings
|
|
129
|
+
(venv) invenio galter_subjects mesh download -d /path/to/downloads/storage/ -y YEAR
|
|
130
|
+
# Generate file containing initial listing
|
|
131
|
+
(venv) invenio galter_subjects mesh file -d /path/to/downloads/storage/ -y YEAR -f topic -o invenio_subjects_mesh_lite/vocabularies/subjects_mesh.csv
|
|
127
132
|
```
|
|
128
133
|
|
|
129
|
-
|
|
134
|
+
Sorting the resulting csv is a nice touch for humans to better parse the changes between versions.
|
|
135
|
+
|
|
136
|
+
When you are happy with the list, bump the version in `pyproject.toml` and release it.
|
|
137
|
+
|
|
130
138
|
|
|
131
139
|
## Development
|
|
132
140
|
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# invenio-subjects-mesh-lite
|
|
2
|
+
|
|
3
|
+
*MeSH topical subject terms without qualifiers for InvenioRDM*
|
|
4
|
+
|
|
5
|
+
<a href="https://pypi.org/project/invenio-subjects-mesh-lite/">
|
|
6
|
+
<img src="https://img.shields.io/pypi/v/invenio-subjects-mesh-lite.svg">
|
|
7
|
+
</a>
|
|
8
|
+
|
|
9
|
+
Install this extension to get Medical Subject Headings topics without qualifiers into your instance.
|
|
10
|
+
|
|
11
|
+
If you are looking for a larger MeSH vocabulary with qualifiers, use
|
|
12
|
+
[invenio-subjects-mesh](https://github.com/galterlibrary/invenio-subjects-mesh) instead.
|
|
13
|
+
|
|
14
|
+
> [!NOTE]
|
|
15
|
+
> Both extensions map the `MeSH` subject id, so you can only install one of them. However, they
|
|
16
|
+
> use the same pattern for subject ids, so you can switch from one to the other easily if your
|
|
17
|
+
> needs change in the future.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
From your instance directory:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pipenv install invenio-subjects-mesh-lite
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This will add it to your Pipfile.
|
|
28
|
+
|
|
29
|
+
## Versions
|
|
30
|
+
|
|
31
|
+
This repository follows [calendar versioning](https://calver.org/) for year and month:
|
|
32
|
+
|
|
33
|
+
`2021.06.18` is both a valid semantic version and an indicator of the year-month corresponding to the loaded MeSH terms.
|
|
34
|
+
`18` here is a patch number (not a day).
|
|
35
|
+
|
|
36
|
+
So far the package is compatible with InvenioRDM 9.1+'s subjects "ABI". If there is a breaking change, a compatibility
|
|
37
|
+
table will be provided to indicate version cross-compatibility.
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
There are 2 types of users for this package. Instance operators and package maintainers.
|
|
42
|
+
|
|
43
|
+
### Instance operators
|
|
44
|
+
|
|
45
|
+
For instance operators, after you have installed the extension as per the steps above, you will want to reload your instance's fixtures: `pipenv run invenio rdm-records fixtures`. This will install the new terms in your instance.
|
|
46
|
+
|
|
47
|
+
Alternatively, or if you want to update your already loaded subjects to a new listing (e.g. from one year's list to another), you can update your instance's MeSH subjects as per below. Updating subjects this way takes care of everything for you: the subjects themselves and the records/drafts using those subjects. **WARNING** This operation can _remove_ subjects.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# In your instance's project
|
|
51
|
+
# Download up-to-date listings
|
|
52
|
+
pipenv run invenio galter_subjects mesh download -d /path/to/downloads/storage/ -y YEAR
|
|
53
|
+
# Generate file containg deltas to transition your instance to the downloaded listing
|
|
54
|
+
pipenv run invenio galter_subjects mesh deltas -d /path/to/downloads/storage/ -y YEAR -f topic -o deltas_mesh.csv
|
|
55
|
+
# Update your instance - *this operation will modify your instance*
|
|
56
|
+
pipenv run invenio galter_subjects update deltas_mesh.csv
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Look at the help text for these commands to see additional options that can be passed.
|
|
60
|
+
In particular, options for `galter_subjects update` allow you to store renamed, replaced or removed subjects on records according to a template of your choice.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Maintainers
|
|
64
|
+
|
|
65
|
+
When a new list of MeSH term comes out, this package should be updated. Here we show how.
|
|
66
|
+
|
|
67
|
+
**Pre-requisite/Context**
|
|
68
|
+
|
|
69
|
+
[Install the distribution package for development](#development) before you do anything.
|
|
70
|
+
|
|
71
|
+
**Commands**
|
|
72
|
+
|
|
73
|
+
Once you have it installed, you can run the following commands in the isolated virtualenv:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# In this project
|
|
77
|
+
# Download up-to-date listings
|
|
78
|
+
(venv) invenio galter_subjects mesh download -d /path/to/downloads/storage/ -y YEAR
|
|
79
|
+
# Generate file containing initial listing
|
|
80
|
+
(venv) invenio galter_subjects mesh file -d /path/to/downloads/storage/ -y YEAR -f topic -o invenio_subjects_mesh_lite/vocabularies/subjects_mesh.csv
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Sorting the resulting csv is a nice touch for humans to better parse the changes between versions.
|
|
84
|
+
|
|
85
|
+
When you are happy with the list, bump the version in `pyproject.toml` and release it.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## Development
|
|
89
|
+
|
|
90
|
+
Install the project in editable mode with `dev` dependencies in an isolated virtualenv (`(venv)` denotes that going forward):
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
(venv) pip install -e .[dev]
|
|
94
|
+
# or if using pipenv
|
|
95
|
+
pipenv run pip install -e .[dev]
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Run tests:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
(venv) invoke test
|
|
102
|
+
# or shorter
|
|
103
|
+
(venv) inv test
|
|
104
|
+
# or if using pipenv
|
|
105
|
+
pipenv run inv test
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Check manifest:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
(venv) inv check-manifest
|
|
112
|
+
# or if using pipenv
|
|
113
|
+
pipenv run inv check-manifest
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Clean out artefacts:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
(venv) inv clean
|
|
120
|
+
# or if using pipenv
|
|
121
|
+
pipenv run inv clean
|
|
122
|
+
```
|