Skip to content

Commit

Permalink
Merge pull request #173 from MannLabs/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
jalew188 committed May 29, 2024
2 parents 0222f2e + eb4f1e7 commit 2ecc4ce
Show file tree
Hide file tree
Showing 159 changed files with 1,568 additions and 1,551 deletions.
6 changes: 2 additions & 4 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[bumpversion]
current_version = 1.1.9
current_version = 1.2.0
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
serialize =
serialize =
{major}.{minor}.{patch}
{major}.{minor}.{patch}

Expand All @@ -15,8 +15,6 @@ serialize =

[bumpversion:file:./docs/conf.py]

[bumpversion:file:./settings.ini]

[bumpversion:file:./release/one_click_linux_gui/control]

[bumpversion:file:./release/one_click_linux_gui/create_installer_linux.sh]
Expand Down
13 changes: 0 additions & 13 deletions .devcontainer.json

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/_run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# reusable workflow to run all tests
name: run-tests

on:
workflow_call:
inputs:
os:
required: true
type: string
python-version:
required: true
type: string
install-script:
required: true
type: string
jobs:
pre-commit:
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
auto-update-conda: true
python-version: ${{ inputs.python-version }}
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Perform pip installation with all stable dependencies
shell: bash -l {0}
run: |
cd misc
. ./${{ inputs.install-script }}
- name: Install additional dependencies required for testing
shell: bash -l {0}
run: |
conda activate peptdeep
pip install pytest nbmake==1.5.3
conda deactivate
- name: nbs_unitests
shell: bash -l {0}
run: |
conda activate peptdeep
cd tests
. ./run_tests.sh
conda deactivate
25 changes: 25 additions & 0 deletions .github/workflows/branch-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# checks to run on branches for each pull request
name: branch-checks

on:
pull_request:

jobs:
pre-commit:
name: Run all pre-commit hooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
# For feature branches, we don't test the full matrix (os x [stable, loose]) in order to save time & resources.
run-tests-loose:
name: Test loose pip installation on ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
uses: ./.github/workflows/_run_tests.yml
with:
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
install-script: "loose_pip_install.sh"
12 changes: 0 additions & 12 deletions .github/workflows/github_action_test_dummy.yml

This file was deleted.

78 changes: 27 additions & 51 deletions .github/workflows/pip_installation.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,42 @@
# Perform pip installation and run all tests

# For feature branches, we don't test the full matrix (os x [stable, loose]) in order to save time & resources.
# On each push to develop, the whole test matrix runs, additionally, its success is mandatory for merging to main.
# In the (assumed to be rare case) that these full matrix tests fail but the reduced matrix tests passed,
# we will learn about it latest before pushing to main. The merge that caused the issue can then be identified
# from the tests that ran on develop.
on:
push:
branches: [ main ]
pull_request:
branches: [ main, development ]
pull_request:
branches: [ main ]
workflow_dispatch:

name: Default installation and tests
name: Pip installation and tests

jobs:
stable_installation:
name: Test stable pip installation on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Test pip installation with all stable dependencies
shell: bash -l {0}
run: |
cd misc
. ./stable_pip_install.sh
- name: Unittests
shell: bash -l {0}
run: |
conda activate peptdeep
pip install -U git+https://github.com/mannlabs/alphabase.git@development
peptdeep
nbdev_test
conda deactivate
os: [ubuntu-latest, macos-13, windows-latest]
# macOS-latest and macos-latest-xlarge use Arm64, resulting in MPS OOM error in peptdeep
# os: [ubuntu-latest, macOS-latest, windows-latest, macos-latest-xlarge]
uses: ./.github/workflows/_run_tests.yml
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
install-script: "stable_pip_install.sh"

loose_installation:
name: Test loose pip installation on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
# runs-on: ${{ matrix.os }} # See https://github.com/orgs/community/discussions/62320
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Test pip installation with all loose dependencies
shell: bash -l {0}
run: |
cd misc
. ./loose_pip_install.sh
- name: Unittests
shell: bash -l {0}
run: |
conda activate peptdeep
pip install -U git+https://github.com/mannlabs/alphabase.git@development
peptdeep
nbdev_test
conda deactivate
os: [ubuntu-latest, macos-13, windows-latest]
# os: [ubuntu-latest, macOS-latest, windows-latest, macos-latest-xlarge]
uses: ./.github/workflows/_run_tests.yml
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
install-script: "loose_pip_install.sh"
12 changes: 6 additions & 6 deletions .github/workflows/publish_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release_installers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ _docs*
# *sidebar.yml
*_proc*
# .gitconfig is now autogenerated
.gitconfig
.gitconfig
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
# - repo: https://github.com/astral-sh/ruff-pre-commit
# rev: v0.4.0
# hooks:
# - id: ruff-format
# - id: ruff
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ sphinx:
# # Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: requirements/requirements_development.txt
- requirements: requirements/requirements_development.txt
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@
## Do you want to contribute to the documentation?

* Docs are automatically created from the notebooks in the nbs folder.

Loading

0 comments on commit 2ecc4ce

Please sign in to comment.