https://github.com/bamresearch/masterdata-parser-example

An example parser for openBIS using the bam-masterdata interface.

https://github.com/bamresearch/masterdata-parser-example

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.5%) to scientific vocabulary

Keywords

bam-data-store openbis parser schema
Last synced: 5 months ago · JSON representation

Repository

An example parser for openBIS using the bam-masterdata interface.

Basic Info
  • Host: GitHub
  • Owner: BAMresearch
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 27.3 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
bam-data-store openbis parser schema
Created 7 months ago · Last pushed 6 months ago
Metadata Files
Readme License

README.md

masterdata-parser-example

An example parser for openBIS using the bam-masterdata interface.

This repository is intended to be used as a template or example to be forked to generate new parsers in openBIS integrated with the openbis-upload-helper.

1. Create a new parser repository

You can either fork or use this repository as a template.

Click on the button Use this template and choose Create a new repository:

use-this-template

You will be prompted to create a new repository. Choose: - Place to host the repository (organization or your own profile). In our case, we selected BAMResearch - Give a name. We named our repository masterdata-parser-nerxiv - Write a short description. - Choose Public visibility.

create-new-template

2. Define your parser entry point

With your new repository created, clone it locally: bash git clone https://github.com/BAMresearch/masterdata-parser-example.git

Note: we will be using our example with this repository to showcase the commands. Please, change the corresponding paths to your own repository naming conventions.

We have now a new folder, masterdata-parser-example, containing the following structure: sh masterdata-parser-example ├── LICENSE ├── pyproject.toml ├── README.md ├── src │ ├── masterdata_parser_example │ ├── __init__.py │ ├── parser.py │ └── _version.py └── tests ├── __init__.py ├── conftest.py └── test_parser.py

Below you can find an explanation of each file. You can also change the name of the package from masterdata_parser_example to your preferred package name <pkg-name>.

In order to create your new parser, you have to: 1. Define a new class in src/<pkg-name>/parser.py instead of MasterdataParserExample. We recommend naming it PkgName. 2. Modify src/<pkg-name>/__init__.py entry point variables: ```python from .parser import PkgName

Add more metadata if needed

entrypoint = { "name": "PkgName", "description": "A new parser for masterdata.", "parserclass": PkgName, } 3. Modify the `pyproject.toml` line `[project.entry-points."bam.parsers"]` to the new entry point: sh entrypoint = ":entrypoint" `` 4. Modify all other parts inpyproject.tomlwhere theismasterdataparser_example` to your package name.

Explanation of the files

To be added!

3. Work in your parser

With the new structure, you can work in your parser to map data from your files into openBIS by modifying src/<pkg-name>/parser.py and the testing module tests/test_parser.py.

4. Add new parser to openbis-upload-helper

Once your new parser has been developed and tested, you can add it to the registry of parsers in the openbis-upload-helper. We recommend you contacting the maintainers of the application with a link to your parser repository.

Owner

  • Name: Bundesanstalt für Materialforschung und -prüfung
  • Login: BAMresearch
  • Kind: organization
  • Email: oss@bam.de
  • Location: Berlin/Germany

German Federal scientific research institute for materials testing and research

GitHub Events

Total
  • Watch event: 1
  • Push event: 9
  • Create event: 2
  • Commit comment event: 6
Last Year
  • Watch event: 1
  • Push event: 9
  • Create event: 2
  • Commit comment event: 6

Dependencies

.github/workflows/actions.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • chartboost/ruff-action v1 composite
.github/workflows/coveralls.yml actions
  • MishaKav/pytest-coverage-comment main composite
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
.github/workflows/publish.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • pypa/gh-action-pypi-publish release/v1 composite
pyproject.toml pypi
  • bam-masterdata >=0.6.0