Repository model for semantic resources

This is a template repository for semantic resources to be collected from the National Data Catalogue for interoperability provided on https://schema.gov.it.

To find more information on the Catalogue, on the methods of use of the schema.gov.it portal and on the contribution to the nutrition of the same, refer to the dedicated guide.

Dati aggiornati da GitHub API (2026-07-01 14:15:49)
0
Stars
6
Forks
0
Watchers
30
Commits

Languages

Python
83.6%
Dockerfile
16.4%

Repository: teamdigitale/data-semantic-cookiecutter

Last update: 15 July 2024 8:54

Created: 7 December 2021

Layout and rules of the repository

This section describes the general tree structure of a semantic repository.

All semantic resources are in the folder assets, Each resource type (e.g. ontologies, controlled vocabularies, schemas, ..) has a specific subfolder.
For readability:

  • All JSON files are serialized as YAML;
  • All RDF files are serialized as text/turtle;

Semantic resources (schemes, vocabularies, ontologies)

All semantic resources to be collected/published are in assets/; Files outside this directory are ignored by the catalog and can be used to test, develop, and validate asset/ content, such as files in tests/.

Other files

In this repository, additional files that are not to be processed by the NDC are in the directory others/, for which a specific tree is not defined.
In this directory you can also insert files that are published directly through this repository (e.g. additional RDF serializations, ancillary schemas, specific vocabularies) that do not have to be processed by the NDC but that can still be referenced by indexed objects such as:

  • documentation in pdf format;
  • additional datasets or data schemes;
  • images and software.

To learn more about the theme of the repository layout, the content required, the versioning of resources, and to be able to consult some useful examples, refer to the dedicated section in the Operational Manual of the Catalogue.

Automatic Controls and Tests

This section describes the procedures of automatic control and testing, useful to ensure the quality and integrity of the contents of the repository.

Implemented controls can be deactivated if not applicable to your use case. For example, if you've already implemented your own solution for stable URIs, checking the equality between file names and folders and between file names and resources in URIs doesn't necessarily have to be outdated, so they can be commented on.

Automatic Controls (Pre-commit)

This repository implements automatic controls using pre-commit. Verification specifications are defined in the file  .pre-commit-config.yaml .

You can perform these checks using GitHub Actions. The validate.yaml file in .github/workflows automatically enables pre-commit checks after each push or pull request (PR). In addition, you can run them manually at any time.

To enable pre-commit controls in another repository, copy the file  .pre-commit-config.yaml  and the file  .github/workflows/validate.yaml .

Test URL

The test_urls.py script in the tests directory allows you to check the GitHub-related URLs in the asset subdirectory files.

This test can also be automated using GitHub Actions. The file test.yaml in .github/workflows automatically triggers tests after each push or pull request. In addition, you can run them manually at any time.

To enable URL testing in another repository, copy the file /tests/test_urls.py and the file .github/workflows/test.yaml.