-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #173 from MannLabs/development
Development
- Loading branch information
Showing
159 changed files
with
1,568 additions
and
1,551 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 was deleted.
Oops, something went wrong.
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,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 |
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 @@ | ||
# 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" |
This file was deleted.
Oops, something went wrong.
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,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" |
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 |
---|---|---|
|
@@ -143,4 +143,4 @@ _docs* | |
# *sidebar.yml | ||
*_proc* | ||
# .gitconfig is now autogenerated | ||
.gitconfig | ||
.gitconfig |
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,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 |
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.