Name | soft7 JSON |
Version |
0.3.0
JSON |
| download |
home_page | None |
Summary | SOFT7 semantic interoperability framework. |
upload_time | 2024-12-02 08:24:10 |
maintainer | None |
docs_url | None |
author | None |
requires_python | ~=3.9 |
license | None |
keywords |
interoperability
semantic
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# SOFT7
## OTEAPI plugin
The `soft7` packages comes with an [OTEAPI](https://github.com/EMMC-ASBL/oteapi-core) plugin that allows one to convert any core parser data to a SOFT7 Entity instance.
To use the plugin, call the `'soft7'` `functionType` function strategy.
### Test the plugin
At the root of the repository is a [Docker Compose](https://docs.docker.com/compose/) file, which, when run, will start an [OTEAPI Service](https://github.com/EMMC-ASBL/oteapi-services#readme) that includes the `soft7` OTEAPI plugin.
To start the service, run:
```bash
docker compose pull
docker compose up -d
```
To follow along with the installation of the `soft7` package and startup of the OTEAPI Service, run:
```bash
docker logs -f soft7-oteapi-1
```
Press Ctrl+C to stop following the logs.
To eventually stop the services, run:
```bash
docker compose down
```
But first, let's test the plugin.
Open a Python shell, an [IPython shell](https://ipython.org/), or a [Jupyter Notebook](https://jupyter.org/), and run:
```python
from s7.factories import create_datasource
# Let us use an OPTIMADE structure from the Materials Project as our "raw" data source.
# The chosen structure is mp-1228448 (Al2O3):
# https://materialsproject.org/materials/mp-1228448/
# For more information about OPTIMADE, see https://www.optimade.org/
# For more information about the Materials Project, see https://materialsproject.org/
dataresource_config = {
"downloadUrl": (
"https://optimade.materialsproject.org/v1/structures/mp-1228448?"
"response_format=json"
),
"mediaType": "application/json",
}
# We need to setup a mapping configuration to tell the plugin how to map the OPTIMADE
# structure to a SOFT7 Entity instance.
# This requires knowledge of the OPTIMADE structure and the SOFT7 Entity.
# In our case the OPTIMADE structure specification is available at
# https://github.com/Materials-Consortia/OPTIMADE/blob/v1.1.0/optimade.rst#structures-entries
# and the SOFT7 Entity of choice is the `OPTIMADEStructure` Entity, which can be found
# at http://onto-ns.com/meta/1.0/OPTIMADEStructure
mapping_config = {
"mappingType": "triples",
"prefixes": {
"optimade": "https://optimade.materialsproject.org/v1/structures/mp-1228448#",
"soft7": "http://onto-ns.com/meta/1.0/OPTIMADEStructure#",
},
"triples": {
("optimade:data.id", "", "soft7:properties.id"),
("optimade:data.type", "", "soft7:properties.type"),
("optimade:data.attributes", "", "soft7:properties."),
}
}
```
Raw data
{
"_id": null,
"home_page": null,
"name": "soft7",
"maintainer": null,
"docs_url": null,
"requires_python": "~=3.9",
"maintainer_email": null,
"keywords": "interoperability, semantic",
"author": null,
"author_email": "Thomas Fj\u00e6stad Hagelien <thomas.f.hagelien@sintef.no>, Casper Welzel Andersen <casper.w.andersen@sintef.no>, Treesa Rose Joseph <treesa.joseph@sintef.no>",
"download_url": "https://files.pythonhosted.org/packages/0c/a6/701f905d2c72afbff8116c055725b41323ca566aa2f939e04ff4d5572ec4/soft7-0.3.0.tar.gz",
"platform": null,
"description": "# SOFT7\n\n## OTEAPI plugin\n\nThe `soft7` packages comes with an [OTEAPI](https://github.com/EMMC-ASBL/oteapi-core) plugin that allows one to convert any core parser data to a SOFT7 Entity instance.\n\nTo use the plugin, call the `'soft7'` `functionType` function strategy.\n\n### Test the plugin\n\nAt the root of the repository is a [Docker Compose](https://docs.docker.com/compose/) file, which, when run, will start an [OTEAPI Service](https://github.com/EMMC-ASBL/oteapi-services#readme) that includes the `soft7` OTEAPI plugin.\n\nTo start the service, run:\n\n```bash\ndocker compose pull\ndocker compose up -d\n```\n\nTo follow along with the installation of the `soft7` package and startup of the OTEAPI Service, run:\n\n```bash\ndocker logs -f soft7-oteapi-1\n```\n\nPress Ctrl+C to stop following the logs.\n\nTo eventually stop the services, run:\n\n```bash\ndocker compose down\n```\n\nBut first, let's test the plugin.\n\nOpen a Python shell, an [IPython shell](https://ipython.org/), or a [Jupyter Notebook](https://jupyter.org/), and run:\n\n```python\nfrom s7.factories import create_datasource\n\n# Let us use an OPTIMADE structure from the Materials Project as our \"raw\" data source.\n# The chosen structure is mp-1228448 (Al2O3):\n# https://materialsproject.org/materials/mp-1228448/\n# For more information about OPTIMADE, see https://www.optimade.org/\n# For more information about the Materials Project, see https://materialsproject.org/\ndataresource_config = {\n \"downloadUrl\": (\n \"https://optimade.materialsproject.org/v1/structures/mp-1228448?\"\n \"response_format=json\"\n ),\n \"mediaType\": \"application/json\",\n}\n\n# We need to setup a mapping configuration to tell the plugin how to map the OPTIMADE\n# structure to a SOFT7 Entity instance.\n# This requires knowledge of the OPTIMADE structure and the SOFT7 Entity.\n# In our case the OPTIMADE structure specification is available at\n# https://github.com/Materials-Consortia/OPTIMADE/blob/v1.1.0/optimade.rst#structures-entries\n# and the SOFT7 Entity of choice is the `OPTIMADEStructure` Entity, which can be found\n# at http://onto-ns.com/meta/1.0/OPTIMADEStructure\nmapping_config = {\n \"mappingType\": \"triples\",\n \"prefixes\": {\n \"optimade\": \"https://optimade.materialsproject.org/v1/structures/mp-1228448#\",\n \"soft7\": \"http://onto-ns.com/meta/1.0/OPTIMADEStructure#\",\n },\n \"triples\": {\n (\"optimade:data.id\", \"\", \"soft7:properties.id\"),\n (\"optimade:data.type\", \"\", \"soft7:properties.type\"),\n (\"optimade:data.attributes\", \"\", \"soft7:properties.\"),\n }\n}\n```\n\n",
"bugtrack_url": null,
"license": null,
"summary": "SOFT7 semantic interoperability framework.",
"version": "0.3.0",
"project_urls": {
"Changelog": "https://github.com/SINTEF/soft7/blob/main/CHANGELOG.md",
"Documentation": "https://SINTEF.github.io/soft7",
"Home": "https://github.com/SINTEF/soft7",
"Issue Tracker": "https://github.com/SINTEF/soft7/issues",
"Package": "https://pypi.org/project/soft7",
"Source": "https://github.com/SINTEF/soft7"
},
"split_keywords": [
"interoperability",
" semantic"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3a8c6592b5af61d970a7bf197f48d15d4abe831827df3b68bb6cc04047f8fb03",
"md5": "289685021e23a432154a6d8a758fd2a2",
"sha256": "37639680133aee0837d2cdbf46bc62c09031673d68b87c6b0786dc6e9b51a451"
},
"downloads": -1,
"filename": "soft7-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "289685021e23a432154a6d8a758fd2a2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.9",
"size": 38670,
"upload_time": "2024-12-02T08:24:08",
"upload_time_iso_8601": "2024-12-02T08:24:08.384530Z",
"url": "https://files.pythonhosted.org/packages/3a/8c/6592b5af61d970a7bf197f48d15d4abe831827df3b68bb6cc04047f8fb03/soft7-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0ca6701f905d2c72afbff8116c055725b41323ca566aa2f939e04ff4d5572ec4",
"md5": "9545cbdcbf5702f7b118a69ce1e73260",
"sha256": "dab480841f3d2bcccbca2f56766e7dea45dcbbdf83cc69141b5e65638178d90a"
},
"downloads": -1,
"filename": "soft7-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "9545cbdcbf5702f7b118a69ce1e73260",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.9",
"size": 71995,
"upload_time": "2024-12-02T08:24:10",
"upload_time_iso_8601": "2024-12-02T08:24:10.485913Z",
"url": "https://files.pythonhosted.org/packages/0c/a6/701f905d2c72afbff8116c055725b41323ca566aa2f939e04ff4d5572ec4/soft7-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-02 08:24:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "SINTEF",
"github_project": "soft7",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "soft7"
}