Skip to content

Commit

Permalink
Prepare SimPhoNy v4 rc1 for publication in PyPI (#798)
Browse files Browse the repository at this point in the history
* Remove `.gitmodules` file

* Update `MANIFEST.in`

* Update year in `LICENSE.md`

* Change `simphony-osp` version number to 4.0.0-rc1

* Run tests also for Python 3.9 and 3.10

* Update dockerfile to use `python:3.10`, change maintainer to SimPhoNy mailing list.

* Remove unneeded packages in tox test environment

* Include owl ontology files in MANIFEST.in

* Improve metadata on setup.py

* Change description

* Change homepage

* Add more keywords

* Add chassifiers, maintainer, license

* Remove setup_requires

* Reorder items in setup.py

* Update README.md
  • Loading branch information
kysrpex authored Jul 15, 2022
1 parent 001dbc1 commit 1b34bad
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 115 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

11 changes: 2 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
FROM ubuntu:18.04
LABEL org.opencontainers.image.authors="pablo.de.andres@fraunhofer.iwm.de, jose.manuel.dominguez@iwm.fraunhofer.de, yoav.nahshon@iwm.fraunhofer.de"

RUN apt-get update && \
apt-get install -y python3.7 python3-pip
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2
RUN update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 2
RUN python -m pip install --upgrade pip
FROM python:3.10
LABEL org.opencontainers.image.authors="simphony@fraunhofer.iwm.de"

ADD . /simphony/simphony-osp
RUN pip install /simphony/simphony-osp
3 changes: 2 additions & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright © 2021 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. acting on behalf of its Fraunhofer IWM. Contact: Pablo de Andrés, José Manuel Domínguez, Yoav Nahshon.
Copyright © 2022 Fraunhofer-Gesellschaft zur Förderung der angewandten
Forschung e.V. acting on behalf of its Fraunhofer IWM. Contact: Pablo de Andrés, José Manuel Domínguez, Yoav Nahshon.

BSD 3-Clause License

Expand Down
9 changes: 4 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
include packageinfo.py
include osp/core/ontology/docs/*.yml
include osp/core/ontology/docs/*.xml
include osp/core/ontology/docs/*.ttl
include osp/core/ontology/docs/EMMO/emmo-inferred.owl
include simphony_osp/ontology/files/*.yml
include simphony_osp/ontology/files/*.ttl
include simphony_osp/ontology/files/*.xml
include simphony_osp/ontology/files/*.owl
111 changes: 37 additions & 74 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,89 +1,52 @@
[![Documentation Status](https://readthedocs.org/projects/simphony/badge/?version=latest)](https://simphony.readthedocs.io/en/latest/?badge=latest)
![](https://github.com/simphony/osp-core/workflows/CI/badge.svg)

## Note

For applications where performance is important, we recommend v3.4.2
The performance optimizations will be done as a next step to v3.5.X

# OSP core

Native implementation of the core cuds object and the class generation
by the SimPhoNy team at Fraunhofer IWM. Builds up on the previous
version, simphony-common (SimPhoNy, EU FP7 Project (Nr. 604005)
www.simphony-project.eu)

## Requirements

- PyYaml (on Windows, use <https://stackoverflow.com/a/33673823>) for parsing yaml files
- numpy for vector attributes of cuds
- websockets for the transport layer
- requests for sending CUDS to a server
- tox to run unittests
- unittest2 to run unittests
- pympler for the performance test
- responses for unittesting requests
# SimPhoNy

The SimPhoNy Open Simulation Platform is a framework that aims to achieve
interoperability between software such as simulation engines, databases and
data repositories using a knowledge graph as the common language. It is focused
on the domain of materials science.

SimPhoNy enables:
- Visualization and exploration of
[OWL ontologies](https://www.w3.org/TR/2012/REC-owl2-primer-20121211/) and
[RDFS Vocabularies](https://www.w3.org/TR/rdf-schema/)
- _Wrappers_: interfaces between ontologies and software products or digital
objects
- Manipulation of ontology-based data: work with ontology individuals,
transfer them among different software products using the wrappers, and query
the knowledge graph

⚠️ You are reading the README file for a _release candidate_ version of
SimPhoNy. This version has not yet been thoroughly tested, and its
functionality is not yet fully documented. Unless you are explicitly looking to
try this version, please head to the
[`master` branch](https://github.com/simphony/osp-core) of this repository to
find the README file for the latest stable release of SimPhoNy.

## Installation

See [https://simphony.readthedocs.io/en/latest/installation.html](https://simphony.readthedocs.io/en/latest/installation.html).

## Visualization of ontologies

We provide the tool `ontology2dot` to visualize your ontologies. You can visualize installed namespaces together with non-installed yaml files (requires Graphviz https://graphviz.gitlab.io/):

```sh
ontology2dot <installed-namespace-1> ... <installed-namespace-n> <path/to/ontology-1.yml> ... <path/to/ontology-m.yml>

# Alternative
python -m simphony_osp.tools.ontology2dot <installed-namespace-1> ... <installed-namespace-n> <path/to/ontology-1.yml> ... <path/to/ontology-m.yml>
```
SimPhoNy is available on PyPI, so it can be installed using pip

You can use parameter `-g` to group the namespaces. Use `-o` to change the filename of the resulting png file.
`pip install simphony-osp`

## Testing

Testing is done using tox (`pip install tox`):

```sh
# run tests automatically in different environments
tox

# run tests in your current environment (you must manually install unittest2, responses for that)
python -m unittest -v
```
Detailed installation instructions can be found
[here](https://simphony.readthedocs.io/en/latest/installation.html).

## Documentation

Our documentation is located at <https://simphony.readthedocs.io>.

If you want to build the documentation locally, refer to our [documentation repostitory](https://github.com/simphony/docs).
To learn how to use SimPhoNy, check out our documentation, which is located at
<https://simphony.readthedocs.io>.

### Examples
In addition, basic usage examples to
quickly get started are available in the
[`examples` folder](https://github.com/simphony/osp-core/tree/release/4/dev/examples).

Further examples can be found in the /examples folder. There the usage of wrappers is explained.

## Troubleshooting

If installation fails, try to install the dependencies one by one before installing simphony-osp.
The dependencies are listed at the top of this readme file.

On Windows, unittests can fail when you use a virtual environment.
For testing the transport layer, we start a transport layer server using pythons subprocess package.
It can happen, that the started subprocess does not pick up the correct virtual environment, causing the server to crash and the corresponding tests to fail.
From our experience, this will not happen if you use the virtual environements of conda.
If you want to build the documentation locally, refer to our [documentation repostitory](https://github.com/simphony/docs).

### Directory structure
## Contributing

- osp/core -- The source code
- tools -- various tools to work with simphony-osp.
- ontology -- the parser and generation of the entities and classes.
- yml -- The supplied ontology files
- session -- Different abstract classes for wrappers.
- examples -- examples of usage.
- tests -- unittesting of the code
If you wish to contribute to SimPhoNy, please read the
[contributing guidelines](https://github.com/simphony/osp-core/blob/release/4/dev/CONTRIBUTING.md).

## Acknowledgements

The SimPhoNy Python package originates from the European Project [SimPhoNy]
(https://www.simphony-project.eu/) (Project Nr. 604005). We would like to acknowledge and thank our project partners, especially [Enthought, Inc](https://www.enthought.com/), [Centre Internacional de Mètodes Numèrics a l'Enginyeria (CIMNE)](https://cimne.com/) and the [University of Jyväskylä](https://www.jyu.fi/en), for their important contributions to some of the core concepts of OSP-core, which were originally demonstrated under the project https://github.com/simphony/simphony-common.
The SimPhoNy Python package originates from the European Project [SimPhoNy](https://www.simphony-project.eu/) (Project Nr. 604005). We would like to acknowledge and thank our project partners, especially [Enthought, Inc](https://www.enthought.com/), [Centre Internacional de Mètodes Numèrics a l'Enginyeria (CIMNE)](https://cimne.com/) and the [University of Jyväskylä](https://www.jyu.fi/en), for their important contributions to some of the core concepts of SimPhoNy, which were originally demonstrated under the project https://github.com/simphony/simphony-common.
65 changes: 48 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,61 @@
README_TEXT = readme.read()

NAME = "simphony-osp"
VERSION = "4.0.0"
VERSION = "4.0.0rc1"

# main setup configuration class
setup(
name=NAME,
version=VERSION,
author="SimPhoNy, EU FP7 Project (Nr. 604005)",
url="www.simphony-project.eu",
description="The native implementation of the SimPhoNy cuds objects",
keywords="simphony, cuds, Fraunhofer IWM",
description="Framework for creating interfaces between ontologies "
"and software such as simulation engines, databases and data "
"repositories.",
long_description=README_TEXT,
long_description_content_type="text/markdown",
url="https://github.com/simphony",
author="SimPhoNy, EU FP7 Project (Nr. 604005)",
maintainer="Fraunhofer IWM",
maintainer_email="simphony@iwm.fraunhofer.de",
license="BSD-3-Clause",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"Operating System :: Unix",
],
keywords="owl, ontology, interoperability, materials-science, osp, "
"simphony, wrappers, open-simulation-platform,"
"Fraunhofer IWM",
download_url="https://pypi.python.org/pypi/simphony-osp",
project_urls={
"Tracker": "https://github.com/simphony/simphony-osp/issues",
"Documentation": "https://simphony.readthedocs.io",
"Source": "https://github.com/simphony/simphony-osp",
},
packages=find_packages(exclude=("examples", "tests")),
install_requires=[
"graphviz",
"numpy",
"PyYaml",
"rdflib >= 6.0.2, < 7.0.0",
"rdflib-sqlalchemy >= 0.5.0",
"requests",
"websockets < 11",
"websockets >= 10; python_version >= '3.10'",
],
python_requires=">=3.7",
package_data={
"simphony_osp.ontology.files": [
"*.yml",
Expand All @@ -28,7 +71,6 @@
],
},
include_package_data=True,
python_requires=">=3.7",
entry_points={
"simphony_osp.wrappers": {
"SQLAlchemy = simphony_osp.interfaces.sqlalchemy:SQLAlchemy",
Expand All @@ -45,15 +87,4 @@
"semantic2dot = simphony_osp.tools.semantic2dot:terminal",
},
},
install_requires=[
"graphviz",
"numpy",
"PyYaml",
"rdflib >= 6.0.2, < 7.0.0",
"rdflib-sqlalchemy >= 0.5.0",
"requests",
"websockets < 11",
"websockets >= 10; python_version >= '3.10'",
],
setup_requires=[],
)
8 changes: 2 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
[tox]
envlist = py37,py38
envlist = py37,py38,py39,py310

[testenv]
deps =
unittest2
pympler
responses
coverage
requests
commands =
coverage run -m unittest -v
coverage report --omit=tests/*,.eggs/*,osp/core/ontology/docs/EMMO/* --skip-covered
coverage report --omit=tests/*,.eggs/* --skip-covered

0 comments on commit 1b34bad

Please sign in to comment.