Skip to content

Commit

Permalink
Merge pull request #12 from monarch-initiative/formatted-code
Browse files Browse the repository at this point in the history
Format code using `tox`
  • Loading branch information
cmungall authored Dec 5, 2023
2 parents ca6454b + 9c68907 commit 44bbb30
Show file tree
Hide file tree
Showing 107 changed files with 3,375 additions and 3,135 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/monarch-initiative/monarch-project-template/",
"commit": "0fce395fe859618d3feb3ac9ebd2f8b94d743b2b",
"commit": "e5f758215fa58b92093e71b632f804569fde9dba",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
uses: actions/checkout@v3.0.2
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:
Expand All @@ -21,8 +21,8 @@ jobs:

- name: Install dependencies.
run: |
poetry install -E docs
poetry install --with docs
- name: Build documentation.
run: |
echo ${{ secrets.GH_TOKEN }} >> src/curate_gpt/token.txt
Expand All @@ -31,8 +31,8 @@ jobs:
cd docs/
poetry run sphinx-apidoc -o . ../src/curate_gpt/ --ext-autodoc -f
poetry run sphinx-build -b html . _build
cp -r _build/html/* ../gh-pages/
cp -r _build/* ../gh-pages/
- name: Deploy documentation.
if: ${{ github.event_name == 'push' }}
uses: JamesIves/github-pages-deploy-action@v4.4.1
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
release:
types: [created]

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
Expand All @@ -20,7 +20,7 @@ jobs:

- name: Install Poetry
run: pip install poetry poetry-dynamic-versioning

- name: Install dependencies
run: poetry install --no-interaction

Expand All @@ -32,5 +32,3 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}


7 changes: 5 additions & 2 deletions .github/workflows/qc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.8", "3.9", "3.10" ]
python-version: [ "3.8", "3.11" ]

steps:
- uses: actions/checkout@v3.0.2
Expand All @@ -26,8 +26,11 @@ jobs:
- 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 flake8
run: poetry run tox -e lint

- name: Test with pytest and generate coverage file
run: poetry run tox -e py
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,8 @@ dmypy.json
.pyre/

# User defined
stagedb/*
!tests/input/dbs/go-nucleus-chroma/*.sqlite3
stagedb/*
*.rej
tests/input/dbs/go-nucleus-chroma/*/*.bin
tests/output/*
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
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
22 changes: 21 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,24 @@ 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.
> 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/monarch-initiative/curate-gpt/issues/
[pulls]: https://github.com/monarch-initiative/curate-gpt/pulls/

We recommend also reading [GitHub Pull Requests: 10 Tips to Know](https://blog.mergify.com/github-pull-requests-10-tips-to-know/)
9 changes: 4 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Configuration file for the Sphinx documentation builder.
#
"""Configuration file for the Sphinx documentation builder."""
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

Expand Down Expand Up @@ -47,13 +46,13 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

templates_path = ['_templates']
templates_path = ["_templates"]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
Expand Down
Loading

0 comments on commit 44bbb30

Please sign in to comment.