Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: new implementation of the labware ontology based on owlready2 / EMMOntopy #40

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[bumpversion]
current_version = 0.0.1
commit = True
tag = True

[bumpversion:file:VERSION]

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:labop_labware/__init__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf

[*.bat]
indent_style = tab
end_of_line = crlf

[LICENSE]
insert_final_newline = false

[Makefile]
indent_style = tab
File renamed without changes.
7 changes: 7 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[flake8]
ignore = E203, W503
select = B,B9,C,E,F,W
max-complexity = 10
max-line-length = 120
per-file-ignores =
test/*:S101
29 changes: 29 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# this file is used by git large file support (git-lfs) to move
# large / binary files to a special location / database
*.jar filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.ZIP filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tar.bz2 filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.PNG filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.JPG filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.JPEG filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.PDF filter=lfs diff=lfs merge=lfs -text
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.MP3 filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text
*.WAV filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.mov filter=lfs diff=lfs merge=lfs -text
*.ods filter=lfs diff=lfs merge=lfs -text
*.xls filter=lfs diff=lfs merge=lfs -text
*.xlsx filter=lfs diff=lfs merge=lfs -text
*.odt filter=lfs diff=lfs merge=lfs -text
*.doc filter=lfs diff=lfs merge=lfs -text
*.docx filter=lfs diff=lfs merge=lfs -text

133 changes: 127 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,129 @@
# this file is used by git to ignore certain files or directories
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# sqlite database
*.sqlite
*.sqlite3

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
docs/source/
_build

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# IntelliJ Idea family of suites
.idea/
*.iml

# IDE settings - Visual Stuido code
.vscode/

# PyCharm
.idea

# Mac stuff
.DS_Store
__pycache__
.ipynb_checkpoints
*.out
README.html
build
*.egg-info

# Generated files
bin/
.build_*

# owlready
catalog-*.xml
16 changes: 16 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

# Acknowledgements and Credits

The OSO labware project thanks


Contributors
------------

* Mickey Kim <[email protected]> ! Thanks for the phantastic cookiecutter template !


Development Lead
----------------

* mark doerr <[email protected]>
101 changes: 101 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
.. highlight:: shell

Development
===========

Get Started!
------------

Ready to contribute? Here's how to set up `labop_labware` for local development.

#. Clone the `labop_labware` repo from GitLab::

$ git clone [email protected]:https://gitlab.com/opensourcelab/scientificdata/ontologies/openscienceontology/labware.git

#. Ensure `poetry is installed`_.
#. Install dependencies and start your virtualenv::

$ poetry install
$ poetry shell

#. Create a branch for local development::

$ git checkout -b feature/IssueNumber_name-of-your-bugfix-or-feature

# please do not use the '#' in branch names !

Now you can make your changes locally.

#. When you're done making changes, check that your changes pass the
tests, including testing other Python versions, with tox::

$ tox

#. Commit your changes and push your branch to GitLab::

$ git add .
$ git commit -m "Your detailed description of your changes."
$ git push origin feature/IssueNumber_name-of-your-bugfix-or-feature

#. Submit a merge request through GitLab

.. _poetry is installed: https://python-poetry.org/docs/

Merge Request Guidelines
-------------------------

Before you submit a merge request, check that it meets these guidelines:

1. The merge request should only include changes relating to one ticket.
2. The merge request should include tests to cover any added changes and
check that all existing and new tests pass.
3. If the merge request adds functionality, the docs should be updated.
Put your new functionality into a function with a docstring, and add
the feature to the list in README.rst.
4. The team should be informed of any impactful changes.

Documentation
--------------

The Sphinx Documentation Sytem is used,

markdown is supported via the mystparser ( https://cerodell.github.io/sphinx-quickstart-guide/build/html/markdown.html )

To build the documentation, run

$ invoke docs

Tips
----

#. To run a subset of tests::

$ pytest tests.test_labop_labware

Deploying to PyPI
-----------------

For every release:

#. Update HISTORY.rst

#. Update version number (can also be patch or major)::

bump2version minor

#. Run the static analysis and tests::

tox

#. Commit the changes::

git add HISTORY.rst
git commit -m "Changelog for upcoming release <#.#.#>"

#. Push the commit::

git push

#. Add the release tag (version) on GitLab: https://gitlab.com/https://gitlab.com/opensourcelab/scientificdata/ontologies/openscienceontology/labware/-/tags

The GitLab CI pipeline will then deploy to PyPI if tests pass.
8 changes: 8 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

# History of labop_labware


* 0.0.1 (2022-12-11)


* First release ....
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022, mark doerr

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading