Skip to main content

Document dataset metadata. For use in Statistics Norway's metadata system.

Project description

Datadoc

Datadoc Unit tests Code coverage PyPI version Code style: black

Document datasets in Statistics Norway

Usage

DataDoc in use

From Jupyter

  1. Open https://jupyter.dapla-staging.ssb.no or another Jupyter Lab environment
  2. Datadoc comes preinstalled in Statistics Norway environments. Elsewhere, run Run pip install ssb-datadoc to install
  3. Upload a dataset to your Jupyter server (e.g. https://github.com/statisticsnorway/datadoc/blob/master/klargjorte_data/befolkning/person_testdata_p2021-12-31_p2021-12-31_v1.parquet)
  4. Run the demo.ipynb Notebook
  5. Datadoc will open in the notebook

Contributing

Prerequisites

  • Python >=3.10
  • Poetry, install via curl -sSL https://install.python-poetry.org | python3 -

Dependency Management

Poetry is used for dependency management. Poe the Poet is used for running poe tasks within poetry's virtualenv. Upon cloning this project first install necessary dependencies, then run the tests to verify everything is working.

Install all dependencies

poetry install --all-extras

Add dependencies

Main

poetry add <python package name>

Dev

poetry add --group dev <python package name>

Run tests

poetry run poe test

Run project locally

To run the project locally:

poetry run poe datadoc

Run project locally in Jupyter

To run the project locally in Jupyter run:

poetry run poe jupyter

A Jupyter instance should open in your browser. Open and run the cells in the .ipynb file to demo datadoc.

Running the Dockerized Application Locally

docker run -p 8050:8050 \
-v $HOME/.config/gcloud/application_default_credentials.json/:/application_default_credentials.json \
-e GOOGLE_APPLICATION_CREDENTIALS="/application_default_credentials.json" \
datadoc

Bump version

poetry run poe bump-patch-version

:warning: Run this on the default branch

This command will:

  1. Increment version strings in files
  2. Commit the changes
  3. Tag the commit with the new version

Then just run git push origin --tags to push the changes and trigger the release process.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssb_datadoc-0.2.5.tar.gz (323.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ssb_datadoc-0.2.5-py3-none-any.whl (339.0 kB view details)

Uploaded Python 3

File details

Details for the file ssb_datadoc-0.2.5.tar.gz.

File metadata

  • Download URL: ssb_datadoc-0.2.5.tar.gz
  • Upload date:
  • Size: 323.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.2 Linux/5.15.0-1042-azure

File hashes

Hashes for ssb_datadoc-0.2.5.tar.gz
Algorithm Hash digest
SHA256 82ebf9c4ee611e0916c1913d72be76838170cf3c8560c4b62e718a8013513b42
MD5 431ee7e0a84b876ac4acf7aac1e97f2f
BLAKE2b-256 e13c4159063f701c6ac7a9a2204e3d17c652740ee47a545db7a1549bd4f6ab54

See more details on using hashes here.

File details

Details for the file ssb_datadoc-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: ssb_datadoc-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 339.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.2 Linux/5.15.0-1042-azure

File hashes

Hashes for ssb_datadoc-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5ae6e1ced4808de15ec50957240082063f11618fb1e448a09978f7148bcf75db
MD5 b73e2bc49c8605daae689f4dafc5523c
BLAKE2b-256 709ad8657583ea6ae1ac0c1b9e20e255f7bd85d73a35efde48d97033e2821939

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page