Metadata-Version: 2.1
Name: galter-subjects-utils
Version: 0.3.1
Summary: Subject terms tooling for InvenioRDM
Author-email: Northwestern University <DL_FSM_GDS@e.northwestern.edu>
License: MIT License
        
        Copyright (C) 2021-2023 Northwestern University.
        
        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:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        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.
        
Project-URL: Repository, https://github.com/galterlibrary/galter-subjects-utils
Keywords: invenio,inveniordm,subjects,MeSH
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: invenio-app-rdm <12.0.0,>=11.0.0
Requires-Dist: click
Requires-Dist: flask
Requires-Dist: invenio-access
Requires-Dist: invenio-db
Requires-Dist: invenio-pidstore
Requires-Dist: invenio-rdm-records
Requires-Dist: invenio-records-resources
Requires-Dist: invenio-vocabularies
Requires-Dist: requests
Requires-Dist: sqlalchemy
Provides-Extra: dev
Requires-Dist: check-manifest >=0.49 ; extra == 'dev'
Requires-Dist: invenio-search[opensearch2] <3.0.0,>=2.1.0 ; extra == 'dev'
Requires-Dist: invoke <3.0,>=2.2 ; extra == 'dev'
Requires-Dist: pytest-invenio <3.0.0,>=2.1.1 ; extra == 'dev'

# galter-subjects-utils

*Subjects tooling for InvenioRDM.*

When a new list of terms (e.g. MeSH) comes out, this tool can be used to update the list in a dedicated subject distribution package.
This tool is typically required by the dedicated subject distribution packages under the `[dev]` extra.

The tool follows the same typical pattern for any subject:

1. Download the new list
2. Read it with optional filters
3. Convert vocabulary entries to InvenioRDM subjects format
4. Write those to file

## Installation

```bash
pip install galter-subjects-utils
```

### Versions

This repository follows [semantic versioning](https://semver.org/) indexed on invenio-app-rdm compatibility according to the table below:

| This Version | invenio-app-rdm version |
| ------------ | ----------------------- |
| 0.X          | 11.X                    |
| 1.X          | 11.X                    |

This just means for example that version 1.X guarantees generation of subjects files compatible with invenio-app-rdm v11. When there is a break in subjects format, this tool will bump its major version.

## Usage

```bash
galter-subjects-utils --help
```

## Development

Install the project in editable mode with `dev` dependencies in an isolated virtualenv (`(venv)` denotes that going forward):

```bash
(venv) pip install -e .[dev]
```

Run tests:

```bash
(venv) invoke test
# or shorter
(venv) inv test
```

Check manifest:

```bash
(venv) inv check-manifest
```
