Skip to content

Commit 32a7268

Browse files
authored
sssom using cookiecutter (#382)
* Restructured proj files * more updates * updated sssom-schema * All tests pass .... linkml free!!! * formatted and corrected * updated workflows * commenting cache * Add tox * add tox within poetry * formatted * ~whitelist_externals~ => allowlist_externals * added docstring * docstr happy * os.path instead of Path * tweaks to workflow * cleanup * reverted to original * added manifest * added maifest check to qc * removed manifest from tox and qc * simplify * fixed indent * reverted back to using poetry * edits to qc.yaml and poetry update * added tox * poetry==1.3.2 * updated lock file * test with path * reverted * redundant line * ' => " * redundant * redundant * formatted * deleted unnecessary files and updated poetry * "cjm" for author_id => "orcid:1234" * "cjm" for author_id => "orcid:1234" * added shell=True * update poetry version to 1.4.2 in gh actions workflow * cleanup to workflow * simplify workflow * reverted back * testing something new with workflow * added tox * added space * back to 1.3.2 * Added functions within init
1 parent 94cf132 commit 32a7268

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+3163
-3617
lines changed

.cruft.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"template": "https://github.com/monarch-initiative/monarch-project-template.git",
3+
"commit": "7a5148b11fd6f4f70da7ef921789e0d5fe720e01",
4+
"checkout": null,
5+
"context": {
6+
"cookiecutter": {
7+
"project_name": "sssom-py",
8+
"github_org_name": "mapping-commons",
9+
"__project_slug": "sssom",
10+
"project_description": "SSSOM (Simple Standard for Sharing Ontology Mappings) is a TSV and RDF/OWL standard for ontology mappings.",
11+
"min_python_version": "3.7",
12+
"file_name": "main",
13+
"greeting_recipient": "World",
14+
"full_name": "Harshad Hegde",
15+
"email": "[email protected]",
16+
"__author": "Harshad Hegde <[email protected]>",
17+
"license": "MIT",
18+
"github_token_for_doc_deployment": "GH_TOKEN",
19+
"github_token_for_pypi_deployment": "SSSOM_TOKEN",
20+
"_template": "https://github.com/monarch-initiative/monarch-project-template.git"
21+
}
22+
},
23+
"directory": null
24+
}

.github/workflows/doc_pages.yml renamed to .github/workflows/deploy-docs.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Checkout
10-
uses: actions/checkout@master
10+
uses: actions/checkout@v3.0.2
1111
with:
1212
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
1313

@@ -16,22 +16,28 @@ jobs:
1616
with:
1717
python-version: 3.9
1818

19+
- name: Install Poetry.
20+
uses: snok/[email protected]
21+
1922
- name: Install dependencies.
2023
run: |
21-
pip install -e .[docs]
22-
24+
poetry install -E docs
25+
2326
- name: Build documentation.
2427
run: |
28+
echo ${{ secrets.GH_TOKEN }} >> src/sssom/token.txt
2529
mkdir gh-pages
2630
touch gh-pages/.nojekyll
2731
cd docs/
28-
make clean html
32+
poetry run sphinx-apidoc -o . ../src/sssom/ --ext-autodoc -f
33+
poetry run sphinx-build -b html . _build
2934
cp -r _build/html/* ../gh-pages/
3035
3136
- name: Deploy documentation.
3237
if: ${{ github.event_name == 'push' }}
33-
uses: JamesIves/github-pages-deploy-action@v4.3.0
38+
uses: JamesIves/github-pages-deploy-action@v4.4.1
3439
with:
3540
branch: gh-pages
3641
force: true
37-
folder: gh-pages
42+
folder: gh-pages
43+
token: ${{ secrets.GH_TOKEN }}

.github/workflows/pypi-publish.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,26 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v3.0.2
1515

16-
- name: Set up Python
17-
uses: actions/[email protected]
18-
with:
19-
python-version: 3.9
16+
- name: Set up Python
17+
uses: actions/[email protected]
18+
with:
19+
python-version: 3.9
2020

21-
- name: Install pip
22-
run: |
23-
pip install --upgrade pip
24-
pip install twine
25-
python setup.py sdist
21+
- name: Install Poetry
22+
run: pip install poetry poetry-dynamic-versioning
23+
24+
- name: Install dependencies
25+
run: poetry install --no-interaction
26+
27+
- name: Build source and wheel archives
28+
run: poetry build
29+
30+
- name: Publish distribution 📦 to PyPI
31+
uses: pypa/[email protected]
32+
with:
33+
user: __token__
34+
password: ${{ secrets.SSSOM_TOKEN }}
2635

27-
- name: Publish distribution 📦 to PyPI
28-
uses: pypa/[email protected]
29-
with:
30-
user: __token__
31-
password: ${{ secrets.SSSOM_TOKEN }}
36+

.github/workflows/qc.yml

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
name: SSSOM qc
1+
name: sssom-py QC
22

33
on:
4-
# Triggers the workflow on push or pull request events but only for the master branch
54
push:
65
branches: [ master ]
76
pull_request:
@@ -12,25 +11,32 @@ jobs:
1211
runs-on: ${{ matrix.os }}
1312
strategy:
1413
matrix:
15-
python-version: ["3.8", "3.9", "3.10"]
16-
os: [ ubuntu-latest, windows-latest ]
14+
os: [ubuntu-latest, windows-latest]
15+
python-version: [ "3.8", "3.9", "3.10" ]
1716

1817
steps:
19-
- uses: actions/checkout@v3
20-
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
22-
with:
23-
python-version: ${{ matrix.python-version }}
24-
25-
- name: Install dependencies
26-
run: |
27-
pip install --upgrade pip
28-
pip install tox
29-
- name: Check manifest
30-
run: tox -e manifest
31-
- name: Lint with flake8
32-
run: tox -e flake8
33-
- name: Test with MyPy
34-
run: tox -e mypy
35-
- name: Test with pytest
36-
run: tox -e py
18+
- uses: actions/[email protected]
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install Poetry
26+
run: |
27+
pip install --upgrade pip
28+
pip install poetry==1.3.2
29+
30+
- name: Install dependencies
31+
run: |
32+
poetry install --extras tests
33+
poetry add tox
34+
35+
- name: Check code quality with flake8
36+
run: poetry run tox -e flake8
37+
38+
- name: Check static typing with MyPy
39+
run: poetry run tox -e mypy
40+
41+
- name: Test with pytest and generate coverage file
42+
run: poetry run tox -e py

.gitignore

Lines changed: 132 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,137 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95+
__pypackages__/
96+
97+
# Celery stuff
98+
celerybeat-schedule
99+
celerybeat.pid
100+
101+
# SageMath parsed files
102+
*.sage.py
103+
104+
# Environments
105+
.env
106+
.venv
107+
env/
108+
venv/
109+
ENV/
110+
env.bak/
111+
venv.bak/
112+
113+
# Spyder project settings
114+
.spyderproject
115+
.spyproject
116+
117+
# Rope project settings
118+
.ropeproject
119+
120+
# mkdocs documentation
121+
/site
122+
123+
# mypy
124+
.mypy_cache/
125+
.dmypy.json
126+
dmypy.json
127+
128+
# Pyre type checker
129+
.pyre/
130+
131+
# User added
132+
*/__pycache__/*
1133
.venv
2134
venv
3-
sssom/__pycache__/
4135
.idea
5136
sssom.egg-info
6137
build/

CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contribution Guidelines
2+
3+
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.
4+
5+
## How to contribute
6+
7+
### Reporting bugs or making feature requests
8+
9+
To report a bug or suggest a new feature, please go to the [mapping-commons/sssom-py issue tracker](https://github.com/mapping-commons/sssom-py/issues), as we are
10+
consolidating issues there.
11+
12+
Please supply enough details to the developers to enable them to verify and troubleshoot your issue:
13+
14+
* Provide a clear and descriptive title as well as a concise summary of the issue to identify the problem.
15+
* Describe the exact steps which reproduce the problem in as many details as possible.
16+
* Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior.
17+
* Explain which behavior you expected to see instead and why.
18+
* Provide screenshots of the expected or actual behaviour where applicable.
19+
20+
21+
### The development lifecycle
22+
23+
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`
24+
2. Make sure your development branch has all the latest commits from the `main` branch.
25+
3. After completing work and testing locally, push the code to the appropriate branch on your fork.
26+
4. Create a pull request from the bug/feature branch of your fork to the `main` branch of the upstream repository.
27+
28+
Note: All the development must be done on a branch on your fork.
29+
30+
ALSO NOTE: github.com lets you create a pull request from the main branch, automating the steps above.
31+
32+
> A code review (which happens with both the contributor and the reviewer present) is required for contributing.

0 commit comments

Comments
 (0)