roc-validator


Nameroc-validator JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://github.com/crs4/rocrate-validator
SummaryA Python package to validate RO-Crates
upload_time2024-10-24 13:04:32
maintainerNone
docs_urlNone
authorMarco Enrico Piras
requires_python<4.0.0,>=3.8.1
licenseApache-2.0
keywords ro-crate validation metadata research object data management scientific data python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # rocrate-validator

[![Testing Pipeline Status](https://img.shields.io/github/actions/workflow/status/crs4/rocrate-validator/testing.yaml?label=Tests&logo=pytest)](https://github.com/crs4/rocrate-validator/actions/workflows/testing.yaml) [![Release Pipeline Status](https://img.shields.io/github/actions/workflow/status/crs4/rocrate-validator/release.yaml?label=Build&logo=python&logoColor=yellow)](https://github.com/crs4/rocrate-validator/actions/workflows/release.yaml) [![PyPI - Version](https://img.shields.io/pypi/v/roc-validator?logo=pypi&logoColor=green&label=PyPI)](https://pypi.org/project/roc-validator/) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg?logo=apache&logoColor=red)](https://opensource.org/licenses/Apache-2.0)

<!-- [![Build Status](https://repolab.crs4.it/lifemonitor/rocrate-validator/badges/develop/pipeline.svg)](https://repolab.crs4.it/lifemonitor/rocrate-validator/-/pipelines?page=1&scope=branches&ref=develop) -->

<!-- [![codecov](https://codecov.io/gh/crs4/rocrate-validator/branch/main/graph/badge.svg?token=3ZQZQZQZQZ)](https://codecov.io/gh/crs4/rocrate-validator) -->

A Python package to validate [RO-Crate](https://researchobject.github.io/ro-crate/)s.

* Supports CLI-based validation as well as programmatic validation (so it can
  easily be used by Python code).
* Implements an extensible validation framework to which new RO-Crate profiles
  can be added.  Validation is based on SHACL shapes and Python code.
* Currently, validations for the following profiles are implemented: RO-Crate
  (base profile), [Workflow
  RO-Crate](https://www.researchobject.org/ro-crate/specification/1.1/workflows.html),
  [Process Run
  Crate](https://www.researchobject.org/workflow-run-crate/profiles/0.1/process_run_crate.html).
  More are being implemented.

**Note**: this software is still work in progress. Feel free to try it out,
report positive and negative feedback.  Do send a note (e.g., by opening an
Issue) before starting to develop patches you would like to contribute.  The
implementation of validation code for additional RO-Crate profiles would be
particularly welcome.


## Installation

You can install the package using `pip` or `poetry`. The following instructions assume you have Python 3.8 or later installed.

#### [Optional Step: Create a Virtual Environment](#optional-step-create-a-virtual-environment)

It’s recommended to create a virtual environment before installing the package to avoid dependency conflicts. You can create one using the following command:

```bash
python3 -m venv .venv
````

Then, activate the virtual environment:

* On **Unix** or **macOS**:

```bash
source .venv/bin/activate
```

* On **Windows** (Command Prompt):

```bash
.venv\Scripts\activate
```

* On **Windows** (PowerShell):

```powershell
.venv\Scripts\Activate.ps1
```

### 1. Using `pip` (from PyPI)

You can install the package using `pip`:

```bash
pip install roc-validator
```

### 2. Using `poetry` (from source)

Clone the repository:

```bash
git clone https://github.com/kikkomep/rocrate-validator.git
```

Navigate to the project directory:

```bash
cd rocrate-validator
```

Ensure you have Poetry installed. If not, follow the instructions [here](https://python-poetry.org/docs/#installation). Then, install the package using `poetry`:

```bash
poetry install
```


## Usage

After installation, use the `rocrate-validator` command to validate RO-Crates. You can run this in a virtual activated environment (if created in the [optional step](#optional-step-create-a-virtual-environment) above) or without a virtual environment if none was created.

### 1. Using the installed package

Run the validator using the following command:

```bash
rocrate-validator validate <path_to_rocrate>
```
where `<path_to_rocrate>` is the path to the RO-Crate you want to validate.

Type `rocrate-validator --help` for more information.



### 2. Using `poetry`

Run the validator using the following command:

```bash
poetry run rocrate-validator validate <path_to_rocrate>
```
where `<path_to_rocrate>` is the path to the RO-Crate you want to validate.

Type `rocrate-validator --help` for more information.



## Running the tests

To run the tests, use the following command:

```bash
poetry run pytest
```

<!-- ## Contributing

Contributions are welcome! Please read our [contributing guidelines](CONTRIBUTING.md) for details. -->

## License

This project is licensed under the terms of the Apache License 2.0. See the
[LICENSE](LICENSE) file for details.

## Acknowledgements

This work has been partially funded by the following sources:

* the [BY-COVID](https://by-covid.org/) project (HORIZON Europe grant agreement number 101046203);
* the [LIFEMap](https://www.thelifemap.it/) project, funded by the Italian Ministry of Health (Piano Operative Salute, Trajectory 3).

<img alt="Co-funded by the EU"
    src="https://raw.githubusercontent.com/crs4/rocrate-validator/develop/docs/img/eu-logo/EN_Co-fundedbytheEU_RGB_POS.png"
    width="250" align="right"/>


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/crs4/rocrate-validator",
    "name": "roc-validator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0.0,>=3.8.1",
    "maintainer_email": null,
    "keywords": "RO-Crate, validation, metadata, research object, data management, scientific data, Python",
    "author": "Marco Enrico Piras",
    "author_email": "kikkomep@crs4.it",
    "download_url": "https://files.pythonhosted.org/packages/0f/a9/9687d575d3fbbb9fb43bc2c75c47682e158e70712b9c00b7ac336cbe1f98/roc_validator-0.4.0.tar.gz",
    "platform": null,
    "description": "# rocrate-validator\n\n[![Testing Pipeline Status](https://img.shields.io/github/actions/workflow/status/crs4/rocrate-validator/testing.yaml?label=Tests&logo=pytest)](https://github.com/crs4/rocrate-validator/actions/workflows/testing.yaml) [![Release Pipeline Status](https://img.shields.io/github/actions/workflow/status/crs4/rocrate-validator/release.yaml?label=Build&logo=python&logoColor=yellow)](https://github.com/crs4/rocrate-validator/actions/workflows/release.yaml) [![PyPI - Version](https://img.shields.io/pypi/v/roc-validator?logo=pypi&logoColor=green&label=PyPI)](https://pypi.org/project/roc-validator/) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg?logo=apache&logoColor=red)](https://opensource.org/licenses/Apache-2.0)\n\n<!-- [![Build Status](https://repolab.crs4.it/lifemonitor/rocrate-validator/badges/develop/pipeline.svg)](https://repolab.crs4.it/lifemonitor/rocrate-validator/-/pipelines?page=1&scope=branches&ref=develop) -->\n\n<!-- [![codecov](https://codecov.io/gh/crs4/rocrate-validator/branch/main/graph/badge.svg?token=3ZQZQZQZQZ)](https://codecov.io/gh/crs4/rocrate-validator) -->\n\nA Python package to validate [RO-Crate](https://researchobject.github.io/ro-crate/)s.\n\n* Supports CLI-based validation as well as programmatic validation (so it can\n  easily be used by Python code).\n* Implements an extensible validation framework to which new RO-Crate profiles\n  can be added.  Validation is based on SHACL shapes and Python code.\n* Currently, validations for the following profiles are implemented: RO-Crate\n  (base profile), [Workflow\n  RO-Crate](https://www.researchobject.org/ro-crate/specification/1.1/workflows.html),\n  [Process Run\n  Crate](https://www.researchobject.org/workflow-run-crate/profiles/0.1/process_run_crate.html).\n  More are being implemented.\n\n**Note**: this software is still work in progress. Feel free to try it out,\nreport positive and negative feedback.  Do send a note (e.g., by opening an\nIssue) before starting to develop patches you would like to contribute.  The\nimplementation of validation code for additional RO-Crate profiles would be\nparticularly welcome.\n\n\n## Installation\n\nYou can install the package using `pip` or `poetry`. The following instructions assume you have Python 3.8 or later installed.\n\n#### [Optional Step: Create a Virtual Environment](#optional-step-create-a-virtual-environment)\n\nIt\u2019s recommended to create a virtual environment before installing the package to avoid dependency conflicts. You can create one using the following command:\n\n```bash\npython3 -m venv .venv\n````\n\nThen, activate the virtual environment:\n\n* On **Unix** or **macOS**:\n\n```bash\nsource .venv/bin/activate\n```\n\n* On **Windows** (Command Prompt):\n\n```bash\n.venv\\Scripts\\activate\n```\n\n* On **Windows** (PowerShell):\n\n```powershell\n.venv\\Scripts\\Activate.ps1\n```\n\n### 1. Using `pip` (from PyPI)\n\nYou can install the package using `pip`:\n\n```bash\npip install roc-validator\n```\n\n### 2. Using `poetry` (from source)\n\nClone the repository:\n\n```bash\ngit clone https://github.com/kikkomep/rocrate-validator.git\n```\n\nNavigate to the project directory:\n\n```bash\ncd rocrate-validator\n```\n\nEnsure you have Poetry installed. If not, follow the instructions [here](https://python-poetry.org/docs/#installation). Then, install the package using `poetry`:\n\n```bash\npoetry install\n```\n\n\n## Usage\n\nAfter installation, use the `rocrate-validator` command to validate RO-Crates. You can run this in a virtual activated environment (if created in the [optional step](#optional-step-create-a-virtual-environment) above) or without a virtual environment if none was created.\n\n### 1. Using the installed package\n\nRun the validator using the following command:\n\n```bash\nrocrate-validator validate <path_to_rocrate>\n```\nwhere `<path_to_rocrate>` is the path to the RO-Crate you want to validate.\n\nType `rocrate-validator --help` for more information.\n\n\n\n### 2. Using `poetry`\n\nRun the validator using the following command:\n\n```bash\npoetry run rocrate-validator validate <path_to_rocrate>\n```\nwhere `<path_to_rocrate>` is the path to the RO-Crate you want to validate.\n\nType `rocrate-validator --help` for more information.\n\n\n\n## Running the tests\n\nTo run the tests, use the following command:\n\n```bash\npoetry run pytest\n```\n\n<!-- ## Contributing\n\nContributions are welcome! Please read our [contributing guidelines](CONTRIBUTING.md) for details. -->\n\n## License\n\nThis project is licensed under the terms of the Apache License 2.0. See the\n[LICENSE](LICENSE) file for details.\n\n## Acknowledgements\n\nThis work has been partially funded by the following sources:\n\n* the [BY-COVID](https://by-covid.org/) project (HORIZON Europe grant agreement number 101046203);\n* the [LIFEMap](https://www.thelifemap.it/) project, funded by the Italian Ministry of Health (Piano Operative Salute, Trajectory 3).\n\n<img alt=\"Co-funded by the EU\"\n    src=\"https://raw.githubusercontent.com/crs4/rocrate-validator/develop/docs/img/eu-logo/EN_Co-fundedbytheEU_RGB_POS.png\"\n    width=\"250\" align=\"right\"/>\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A Python package to validate RO-Crates",
    "version": "0.4.0",
    "project_urls": {
        "Documentation": "https://github.com/crs4/rocrate-validator",
        "Homepage": "https://github.com/crs4/rocrate-validator",
        "Repository": "https://github.com/crs4/rocrate-validator"
    },
    "split_keywords": [
        "ro-crate",
        " validation",
        " metadata",
        " research object",
        " data management",
        " scientific data",
        " python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2945997dc14d163ed1abd9ecd9579da6b450c5cf495ed37ffb9f3fff7859dc03",
                "md5": "b2e7e9168dc86744b141323947820a0d",
                "sha256": "d1fea63d0c1a4f3913fa794f99f43fb9cdeccc74daad3c7f8bca1f8a408c65f9"
            },
            "downloads": -1,
            "filename": "roc_validator-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b2e7e9168dc86744b141323947820a0d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0.0,>=3.8.1",
            "size": 175433,
            "upload_time": "2024-10-24T13:04:30",
            "upload_time_iso_8601": "2024-10-24T13:04:30.655476Z",
            "url": "https://files.pythonhosted.org/packages/29/45/997dc14d163ed1abd9ecd9579da6b450c5cf495ed37ffb9f3fff7859dc03/roc_validator-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0fa99687d575d3fbbb9fb43bc2c75c47682e158e70712b9c00b7ac336cbe1f98",
                "md5": "669c00145a1b1819de5f0e2c9c18afe7",
                "sha256": "9dfa2d01338f1982e8d887919fa1fc70eabe93285f717e80beb1033fd8eba706"
            },
            "downloads": -1,
            "filename": "roc_validator-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "669c00145a1b1819de5f0e2c9c18afe7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0.0,>=3.8.1",
            "size": 86767,
            "upload_time": "2024-10-24T13:04:32",
            "upload_time_iso_8601": "2024-10-24T13:04:32.328198Z",
            "url": "https://files.pythonhosted.org/packages/0f/a9/9687d575d3fbbb9fb43bc2c75c47682e158e70712b9c00b7ac336cbe1f98/roc_validator-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-24 13:04:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "crs4",
    "github_project": "rocrate-validator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "roc-validator"
}
        
Elapsed time: 0.37169s