Skip to main content

DC TAP to SHACL converter.

Project description

Reads a Dublin Core Tabular Application Profile, with some extensions, and converts it to SHACL.

WARNING: beta version, use at own risk.

Installation and use

Always install in a virtual environment (venv).

pip install tap2shacl or install from github.

(venv) $ git clone https://github.com/philbarker/TAP2SHACL
(venv) $ cd TAP2SHACL
(venv) $ pip install -r requirements.txt
(venv) $ ./tap2shacl.py --help

usage: tap2shacl.py [-h] [-c «tap config file name»] [-ns «namespace csv file»] [-a «tap metadata csv file»] [-s «shapes csv file»] -v «tap csv file» [<output file>]

example: path/to/tap2shacl.py tap.csv shacl.ttl

positional arguments:
  <tap csv file>
  <output file> (optional)
options
  -h, --help            show this help message and exit
  -c <tap config file name>, --configFileName <tap config file name>
  -ns <namespace csv file>, --namespaceFileName <namespace csv file>
  -a <tap metadata csv file>, --aboutFileName <tap metadata csv file>
  -s <shapes csv file>, --shapesFileName <shapes csv file>
  -v, --version         show program's version number and exit

If no output file is specified the output is written to the terminal.

Contents

tap2shacl includes several modules that deal with reading and processing the application profile:

  • APClasses Provides python data classes for metadata application profiles, with methods to populate them.
  • TAP2AP uses dctap-python to read a DC TAP (Dublin Core Tabular Application Profile), and some other config files, and converts it to a python application profile (APClasses).
  • AP2SHACL exports the python application profile as SHACL.

Dependencies

Requires dctap 0.4.5(alpha) (github repo) which in turn introduces dependencies, notably ruamel.yaml 0.17.10.

Other dependencies are either from the python standard library (e.g. dataclasses, urllib, csv) or mature external packages (e.g. rdflib).

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

tap2shacl-1.0.0b6.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

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

tap2shacl-1.0.0b6-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file tap2shacl-1.0.0b6.tar.gz.

File metadata

  • Download URL: tap2shacl-1.0.0b6.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for tap2shacl-1.0.0b6.tar.gz
Algorithm Hash digest
SHA256 d219c5afaab9e2702c6aab3b2dfd4024d70552c90208ed3e961d31325ec488cb
MD5 8b0c4f661591a063e55e3417afe7f8ac
BLAKE2b-256 bec124e2317b2b1abfc13890f39b2ee526091daf0c49d794c463ab7137574232

See more details on using hashes here.

File details

Details for the file tap2shacl-1.0.0b6-py3-none-any.whl.

File metadata

  • Download URL: tap2shacl-1.0.0b6-py3-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for tap2shacl-1.0.0b6-py3-none-any.whl
Algorithm Hash digest
SHA256 ed38da57f8e27a05385c70d05d6cb7c32f8127b7438cac88f655ecb2e5929e81
MD5 b1c8ca8981d6410a2360b28bcc9cb409
BLAKE2b-256 653243729eee42d025dccbac39b195039121e9dfe04f432c8629be8029d28449

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