Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/statisticsnorway/microdata-metadata-service
M2.0 Metadata service
https://github.com/statisticsnorway/microdata-metadata-service
backstage
Last synced: 23 days ago
JSON representation
M2.0 Metadata service
- Host: GitHub
- URL: https://github.com/statisticsnorway/microdata-metadata-service
- Owner: statisticsnorway
- License: mit
- Created: 2022-06-20T10:50:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-25T10:50:09.000Z (about 2 months ago)
- Last Synced: 2024-11-25T11:36:14.786Z (about 2 months ago)
- Topics: backstage
- Language: Python
- Homepage:
- Size: 611 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Codeowners: CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# microdata-metadata-service
Metadata service for microdata.no.## Contribute
### Set up
To work on this repository you need to install [poetry](https://python-poetry.org/docs/):
```
# macOS / linux / BashOnWindows
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -# Windows powershell
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python -
```
Then install the virtual environment from the root directory:
```
poetry install
```### Running tests
Open terminal and go to root directory of the project and run:
````
poetry run pytest --cov=metadata_service/
````### REST API documentation
The API documentation is available at [data-store-api-doc](https://gitlab.sikt.no/raird/data-store-api-doc)### Running without Docker
You should add the appropriate environmental variables to your local system:
```sh
export DATASTORE_ROOT_DIR=/datastore
export DOCKER_HOST_NAME=
```Open terminal and go to root directory of the project and run:
````
poetry run gunicorn metadata_service.app:app
````### Build and run Docker image
````
docker build --tag metadata-service:local-latest .
docker run --publish 8080:8080 \
--rm \
--env DATASTORE_ROOT_DIR=/datastore \
--env PORT=8000 \
--env DOCKER_HOST_NAME=local \
-v /path/to/datastore:/datastore metadata-service:local-latest
````## Built with
* [Poetry](https://python-poetry.org/) - Python dependency and package management
* [Gunicorn](https://gunicorn.org/) - Python WSGI-server for UNIX
* [Flask](https://flask.palletsprojects.com) - Web framework
* [Pydantic](https://pydantic-docs.helpmanual.io/) - Data validation