https://github.com/ai4os/ai4-metadata
Metadata utilities for the AI4OS modules
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 1 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.5%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Metadata utilities for the AI4OS modules
Basic Info
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
- Releases: 0
Fork of deephdc/schema4deep
Created over 2 years ago
· Last pushed 12 months ago
https://github.com/ai4os/ai4-metadata/blob/master/
# AI4 Metadata utilities
[](https://github.com/ai4os/ai4-metadata/blob/master/LICENSE)
[](https://github.com/ai4os/ai4-metadata/releases)
[](https://pypi.python.org/pypi/ai4-metadata)
[](https://pypi.python.org/pypi/ai4-metadata)
[](https://zenodo.org/doi/10.5281/zenodo.13343453)
Metadata utilities for the AI4OS hub data science applications.
The AI4OS hub data science applications use metadata to describe the data
sources, models, and other resources. The metadata is used to validate the
resources and to provide information to the users.
## Installation
The metadata utilities can be installed using pip:
$ pip install ai4-metadata
## Usage
The AI4 metadata utilities can be invoked from the command line. The utilities
provide commands to validate and migrate the metadata files.
$ ai4-metadata --help
### Metadata validation
The metadata utilities provide a subcommand `ai4-metadata validate` that can be
used to validate the metadata files. The CLI tool accepts the metadata files as
input parameters.
$ ai4-metadata validate src/assets/examples/sample-v2.mods.json
Success
'src/assets/examples/sample-v2.mods.json' is valid for version 2.0.0
Different metadata versions can be specified, either by using the
`--metadata-version` or by providing the metadata schema file. The following
two executions are equivalent:
$ ai4-metadata validate --metadata-version 2.0.0 src/assets/examples/sample-v2.mods.json
Success
'src/assets/examples/sample-v2.mods.json' is valid for version 2.0.0
$ ai4-metadata validate --schema schemata/ai4-apps-v2.0.0.json src/assets/examples/sample-v2.mods.json
Success
'src/assets/examples/sample-v2.mods.json' is valid for version 2.0.0
$ ai4-metadata validate --metadata-version 1.0.0 src/assets/examples/sample-v2.mods.json
Error
Error validating instance 'src/assets/examples/sample-v2.mods.json':
'date_creation' is a required property
Metadata files can be present in either JSON or YAML format. The metadata
utilities will automatically detect the format.
$ ai4-metadata validate src/assets/examples/sample-v2.mods.yaml
Success
'src/assets/examples/sample-v2.mods.yaml' is valid for version 2.0.0
$ ai4-metadata validate src/assets/examples/sample-v2.mods.json
Success
'src/assets/examples/sample-v2.mods.json' is valid for version 2.0.0
### Metadata mapping between different profiles and formats
The metadata utilities provide a subcommand `ai4-metadata map` that can be used
to map the `ai4` metadata into different metadata profiles and different output
serialization formats. The supported profiles and formats are detailed below.
#### MLDCAT-AP profile
We support the [MLDCAT-AP](https://semiceu.github.io/MLDCAT-AP/) profile
developed by the [SEMIC](https://interoperable-europe.ec.europa.eu/collection/semic-support-centre)
support centre. The MLDCAT-AP profile is a metadata profile aimed to extend the
use of [DCAT Aplication Profile](https://interoperable-europe.ec.europa.eu/collection/semic-support-centre/solution/dcat-application-profile-data-portals-europe)
for data portals in Europe.
In order to map the `ai4` metadata into the MLDCAT-AP profile you can use the
`ai4-metadata map mldcat` subcommand. The input metadata file must be in the
`ai4` metadata format (YAML or JSON). You can specify what format the metadata
should be rendered into, either JSON-LD (`jsonld`) or RD Turtle (`ttl`).
$ ai4-metadata map mldcat src/assets/examples/sample-v2.mods.json --output-format jsonld --output sample-v2.mldcat.jsonld
$ ai4-metadata map mldcat src/assets/examples/sample-v2.mods.json --output-format ttl --output sample-v2.mldcat.ttl
### Metadata migration
The metadata utilities provide a subcommand `ai4-metadata migrate` that can be
used to migrate the metadata files from V1 to latest V2. To save the output,
use the `--output` option.
$ ai4-metadata migrate --output sample-v2.mods.json src/assets/examples/sample-v1.mods.json
Success
V1 metadata 'src/assets/examples/sample-v1.mods.json' migrated to version
MetadataVersions.V2 and stored in 'sample-v2.mods.json'
Please review the changes, as the metadata migration is not complete, and
manual steps are needed.
## Acknowledgements
This project has received funding from the European Unions Horizon Research and Innovation programme under Grant agreement No. [101058593](https://cordis.europa.eu/project/id/101058593)
Owner
- Name: AI4OS
- Login: ai4os
- Kind: organization
- Email: ai4eosc-po@listas.csic.es
- Website: http://ai4eosc.eu
- Twitter: AI4EOSC
- Repositories: 1
- Profile: https://github.com/ai4os
AI4OS is the software powering the AI4EOSC platform
GitHub Events
Total
- Create event: 21
- Release event: 1
- Issues event: 23
- Delete event: 20
- Issue comment event: 79
- Push event: 91
- Pull request review event: 8
- Pull request review comment event: 4
- Pull request event: 35
Last Year
- Create event: 21
- Release event: 1
- Issues event: 23
- Delete event: 20
- Issue comment event: 79
- Push event: 91
- Pull request review event: 8
- Pull request review comment event: 4
- Pull request event: 35
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 10
- Total pull requests: 17
- Average time to close issues: 3 days
- Average time to close pull requests: 17 days
- Total issue authors: 2
- Total pull request authors: 3
- Average comments per issue: 0.1
- Average comments per pull request: 1.12
- Merged pull requests: 14
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 10
- Pull requests: 17
- Average time to close issues: 3 days
- Average time to close pull requests: 17 days
- Issue authors: 2
- Pull request authors: 3
- Average comments per issue: 0.1
- Average comments per pull request: 1.12
- Merged pull requests: 14
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- IgnacioHeredia (11)
- alvarolopez (5)
- vykozlov (1)
Pull Request Authors
- alvarolopez (21)
- ai4-bot (8)
- IgnacioHeredia (3)
Top Labels
Issue Labels
enhancement (9)
bug (3)
invalid (1)
Pull Request Labels
autorelease: pending (8)
enhancement (3)
bug (2)
Packages
- Total packages: 1
-
Total downloads:
- pypi 111 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 8
- Total maintainers: 1
pypi.org: ai4-metadata
AI4OS Hub applications metadata utilities
- Homepage: https://github.com/ai4os/ai4-metadata
- Documentation: https://ai4-metadata.readthedocs.io/
- License: Apache-2
-
Latest release: 2.4.1
published 12 months ago
Rankings
Dependent packages count: 10.5%
Average: 34.8%
Dependent repos count: 59.1%
Maintainers (1)
Last synced:
10 months ago