-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First pass at a tool for expressionifying named superclasses.
One use case for this is to expressionize BFO; see BFO-ontology/BFO#221 for context
- Loading branch information
0 parents
commit 75dd8b6
Showing
36 changed files
with
60,436 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"template": "https://github.com/monarch-initiative/monarch-project-template", | ||
"commit": "71f0cbdbfc1f68c2a4c771d13c9bd82a362ef046", | ||
"checkout": null, | ||
"context": { | ||
"cookiecutter": { | ||
"project_name": "rdf-expressionizer", | ||
"github_org_name": "INCATools", | ||
"__project_slug": "rdf_expressionizer", | ||
"project_description": "translates named classes to equivalent class expressions", | ||
"min_python_version": "3.9", | ||
"file_name": "main", | ||
"greeting_recipient": "World", | ||
"full_name": "Author 1", | ||
"email": "[email protected]", | ||
"__author": "Author 1 <[email protected]>", | ||
"license": "BSD-3", | ||
"github_token_for_doc_deployment": "GH_TOKEN", | ||
"github_token_for_pypi_deployment": "PYPI_TOKEN", | ||
"_template": "https://github.com/monarch-initiative/monarch-project-template" | ||
} | ||
}, | ||
"directory": null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Auto-deployment of Documentation | ||
on: | ||
push: | ||
branches: [ main ] | ||
jobs: | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
|
||
- name: Set up Python 3. | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install Poetry. | ||
uses: snok/[email protected] | ||
|
||
- name: Install dependencies. | ||
run: | | ||
poetry install --with docs | ||
- name: Build documentation. | ||
run: | | ||
echo ${{ secrets.GH_TOKEN }} >> src/rdf_expressionizer/token.txt | ||
mkdir gh-pages | ||
touch gh-pages/.nojekyll | ||
cd docs/ | ||
poetry run sphinx-apidoc -o . ../src/rdf_expressionizer/ --ext-autodoc -f | ||
poetry run sphinx-build -b html . _build | ||
cp -r _build/* ../gh-pages/ | ||
- name: Deploy documentation. | ||
if: ${{ github.event_name == 'push' }} | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
force: true | ||
folder: gh-pages | ||
token: ${{ secrets.GH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Publish Python Package | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build-n-publish: | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install Poetry | ||
run: pip install poetry poetry-dynamic-versioning | ||
|
||
- name: Install dependencies | ||
run: poetry install --no-interaction | ||
|
||
- name: Build source and wheel archives | ||
run: poetry build | ||
|
||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: rdf-expressionizer QC | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [ "3.8", "3.11" ] | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
- name: Install dependencies | ||
run: poetry install --no-interaction | ||
|
||
- name: Check common spelling errors | ||
run: poetry run tox -e codespell | ||
|
||
- name: Check code quality with flake8 | ||
run: poetry run tox -e lint | ||
|
||
- name: Test with pytest and generate coverage file | ||
run: poetry run tox -e py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
*.old | ||
*-rewired.owl | ||
*-augmented.owl | ||
tests/output/ | ||
.idea | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# 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 | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
default_language_version: | ||
python: python3 | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: trailing-whitespace | ||
- repo: https://github.com/psf/black | ||
rev: 23.7.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.0.278 | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.4 | ||
hooks: | ||
- id: codespell | ||
additional_dependencies: | ||
- tomli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Contribution Guidelines | ||
|
||
When contributing to this repository, please first discuss the changes you wish to make via an issue, email, or any other method, with the owners of this repository before issuing a pull request. | ||
|
||
## How to contribute | ||
|
||
### Reporting bugs or making feature requests | ||
|
||
To report a bug or suggest a new feature, please go to the [INCATools/rdf-expressionizer issue tracker](https://github.com/INCATools/rdf-expressionizer/issues), as we are | ||
consolidating issues there. | ||
|
||
Please supply enough details to the developers to enable them to verify and troubleshoot your issue: | ||
|
||
* Provide a clear and descriptive title as well as a concise summary of the issue to identify the problem. | ||
* Describe the exact steps which reproduce the problem in as many details as possible. | ||
* Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior. | ||
* Explain which behavior you expected to see instead and why. | ||
* Provide screenshots of the expected or actual behaviour where applicable. | ||
|
||
|
||
### The development lifecycle | ||
|
||
1. Create a bug fix or feature development branch, based off the `main` branch of the upstream repo, and not your fork. Name the branch appropriately, briefly summarizing the bug fix or feature request. If none come to mind, you can include the issue number in the branch name. Some examples of branch names are, `bugfix/breaking-pipfile-error` or `feature/add-click-cli-layer`, or `bugfix/issue-414` | ||
2. Make sure your development branch has all the latest commits from the `main` branch. | ||
3. After completing work and testing locally, push the code to the appropriate branch on your fork. | ||
4. Create a pull request from the bug/feature branch of your fork to the `main` branch of the upstream repository. | ||
|
||
Note: All the development must be done on a branch on your fork. | ||
|
||
ALSO NOTE: github.com lets you create a pull request from the main branch, automating the steps above. | ||
|
||
> A code review (which happens with both the contributor and the reviewer present) is required for contributing. | ||
### How to write a great issue | ||
|
||
Please review GitHub's overview article, | ||
["Tracking Your Work with Issues"][about-issues]. | ||
|
||
<a id="great-pulls"></a> | ||
|
||
### How to create a great pull/merge request | ||
|
||
Please review GitHub's article, ["About Pull Requests"][about-pulls], | ||
and make your changes on a [new branch][about-branches]. | ||
|
||
[about-branches]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches | ||
[about-issues]: https://docs.github.com/en/issues/tracking-your-work-with-issues/about-issues | ||
[about-pulls]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests | ||
[issues]: https://github.com/INCATools/rdf-expressionizer/issues/ | ||
[pulls]: https://github.com/INCATools/rdf-expressionizer/pulls/ | ||
|
||
We recommend also reading [GitHub Pull Requests: 10 Tips to Know](https://blog.mergify.com/github-pull-requests-10-tips-to-know/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
Copyright (c) 2024, Monarch Initiative | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name of pytest-rdf-expressionizer nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Oops, something went wrong.