-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix/gh actions and docs imporovements (#30)
* docs changes * updates to pypi workflow * formatting docs and badges * py3.8 for docs * updates to docs formatting and theme * removed old theme ref in conf.py * updated gh actions workflows * added pre-commit hooks, updated makefile * updated gitignore * refactored test path * updated rst files and sphinx requirement * formatting and import sorting * refactored tests for datasets * docstrings fixes * bump up version
- Loading branch information
Showing
55 changed files
with
946 additions
and
466 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
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 |
---|---|---|
@@ -1,35 +1,41 @@ | ||
name: PyPI | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_run: | ||
workflows: ["Build"] | ||
types: | ||
- completed | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
release: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
python-version: '3.8' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: python -m build | ||
- name: Publish package | ||
- name: publish_pypi | ||
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.SECRET_PYPI }} | ||
- name: Create Github release | ||
if: steps.publish_pypi.outcome == 'success' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CLI_GH_TOKEN }} | ||
run: | | ||
VERSION=$(python -c "from dlomix import __version__; print(__version__);") | ||
VERSION=$(python setup.py --version) | ||
gh release create v$VERSION --title $VERSION --generate-notes | ||
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
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,16 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.3.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
args: ["--profile", "black"] | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black |
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
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 |
---|---|---|
@@ -1,17 +1,44 @@ | ||
install: | ||
pip install --upgrade pip && pip install -e . | ||
|
||
uninstall: | ||
pip uninstall dlomix -y | ||
|
||
install-nodeps: | ||
pip install --upgrade pip && pip install -e . --no-deps | ||
|
||
|
||
install-dev: | ||
pip install --upgrade pip && pip install -e .[dev] | ||
|
||
.PHONY: test | ||
test: | ||
python -m pytest ./test/*.py --doctest-modules --junitxml=junit/test-results.xml --cov=dlomix --cov-report=xml --cov-report=html | ||
make uninstall | ||
make install | ||
mkdir -p cov/ | ||
|
||
python -m pytest tests/ --junitxml=junit/test-results.xml --cov=dlomix --cov-report html:cov/cov_html --cov-report xml:cov/cov.xml --cov-report lcov:cov/cov.info --cov-report annotate:cov/cov_annotate | ||
|
||
test-local: | ||
make uninstall | ||
make install-nodeps | ||
mkdir -p cov/ | ||
|
||
python -m pytest tests/ --junitxml=junit/test-results.xml --cov=dlomix --cov-report html:cov/cov_html --cov-report xml:cov/cov.xml --cov-report lcov:cov/cov.info --cov-report annotate:cov/cov_annotate | ||
|
||
|
||
format: | ||
black ./dlomix/* | ||
isort --profile black . | ||
black ./dlomix/*.py | ||
black ./run_scripts/*.py | ||
black ./tests/*.py | ||
|
||
lint: | ||
pylint --disable=R,C ./dlomix/* | ||
|
||
build-docs: | ||
cd docs && make clean html | ||
cd docs/_build/html/ && open index.html | ||
|
||
all: install format test |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
__version__ = "0.0.6" | ||
__version__ = "0.0.7" | ||
|
||
META_DATA = { | ||
"author": "Omar Shouman", | ||
"author_email": "[email protected]", | ||
"description": "Deep Learning for Proteomics", | ||
"package_name": "DLOmix", | ||
"copyright_text": "2023, Wilhelm Lab, TU Munich.", | ||
"copyright_text": "2024, Wilhelm Lab, TU Munich.", | ||
"github_url": "https://github.com/wilhelm-lab/dlomix", | ||
} |
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from .RetentionTimeDataset import * | ||
from .IntensityDataset import * | ||
from .RetentionTimeDataset import * | ||
|
||
__all__ = ["RetentionTimeDataset", "IntensityDataset"] |
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
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
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from .intensity import masked_spectral_distance, masked_pearson_correlation_distance | ||
from .intensity import masked_pearson_correlation_distance, masked_spectral_distance | ||
|
||
__all__ = [masked_spectral_distance, masked_pearson_correlation_distance] |
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
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
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
Oops, something went wrong.