Skip to content

Commit

Permalink
Develop (#34)
Browse files Browse the repository at this point in the history
* Rework readme (#6)

* Renamed actions and added badges to readme

* Switched slash for dash

* Fix import structure (#10)

* Fixed import structure

* Removed pull_request target as push also seems to trigger on pull request?

* Fix visualization helpers (#13)

* Fixed bugs

* Added pull_request again as trigger for workflow

* Update build_deploy.yml

* Fix compressing core and installed pre-commit (#15)

* Pre-commit test

* Added local hook for zipping core

* Added .zip and .tar.gz autozips into core_archives folder

* Zip test

* tar.gz test

* Compressing works, only really ugly workaround for moving files

* Refered to the archives in the README

* Fix datasets (#17)

* Release v0.2a1 (#14)

* Rework readme (#6)

* Renamed actions and added badges to readme

* Switched slash for dash

* Fix import structure (#10)

* Fixed import structure

* Removed pull_request target as push also seems to trigger on pull request?

* Fix visualization helpers (#13)

* Fixed bugs

* Added pull_request again as trigger for workflow

* Deleted old log file and changed setup version

* Restructured dataset files and added package_data to setup.py, also changed max-line-length for black to 79

* New setup for loading datasets

* Added dataset inclusion

* Added archiving for datasets

* Test for matrix include (#18)

* Test for matrix include

* Added runOns variable

* Changed to a custom action

* Added inputFile

* Copied literal line

* Changed strategy order

* Check only ubuntu

* Extended matrix with all OS and extra CIBW_BUILD ENV flag

* Added default of only python 3.6 builds for 64-bit if push is not to master

* Added enter to README

* Release v0.2a2 (#20)

* Release v0.2a1 (#14)

* Rework readme (#6)

* Renamed actions and added badges to readme

* Switched slash for dash

* Fix import structure (#10)

* Fixed import structure

* Removed pull_request target as push also seems to trigger on pull request?

* Fix visualization helpers (#13)

* Fixed bugs

* Added pull_request again as trigger for workflow

* Deleted old log file and changed setup version

* Changed master trigger to release trigger

* Moved wildcard

* Moved wildcard of JMESPath

* Added dot

* Trying starts_with

* Switched arguments

* Excluded python 2.7 pypy

* New jmespath filter test

* Changed version number

* Add PyTest to repo and CI (#21)

* Added first pytest script for protein class and a script for performing local tests.

* Added pytest in CI

* Forgot -r for file

* Version of pytest with pytest at end of pipeline

* New pytest CI where pip installs local package

* Fixed tabs and added caching of python/pip environment

* Removed dot and added removal of build dirs to manage clean command

* Added cache ignores for env setup and ids for the caches

* Fixed cache IDs

* Renamed cache because GitHub does not allow for clearing caches...

* Moved python setup to be before cache loading

* Run that will install the dependencies

* Uncommented the cache-hit detection for installing dependencies

* Updated pre-commit version in hope that runner will create new cache

* Added more tests and added flake8 incompatability

* Other flake8 config try

* Reset to .flake8 file

* Downgrade of pre-commit to force dep. installation in CI

* Different pre-commit version

* Added depth_first tests

* Added depth_first_bnb tests

* Push to try and install all dependencies correctly

* Added back cache check for installing dependencies. New way of calling flake8, added class dependencies on tests

* Removed ls

* Core change test

* Core change test - new correctly

* Core archiving works

* Fixed pytest ordering and upgraded pandas version to trigger new cache

* Upgraded pandas

* Changed pandas version to 1.1.0

* Removed caching of CI and moved code to new PR

* Add CI caching for python environments (#23)

* Added first pytest script for protein class and a script for performing local tests.

* Added pytest in CI

* Forgot -r for file

* Version of pytest with pytest at end of pipeline

* New pytest CI where pip installs local package

* Fixed tabs and added caching of python/pip environment

* Removed dot and added removal of build dirs to manage clean command

* Added cache ignores for env setup and ids for the caches

* Fixed cache IDs

* Renamed cache because GitHub does not allow for clearing caches...

* Moved python setup to be before cache loading

* Run that will install the dependencies

* Uncommented the cache-hit detection for installing dependencies

* Updated pre-commit version in hope that runner will create new cache

* Added more tests and added flake8 incompatability

* Other flake8 config try

* Reset to .flake8 file

* Downgrade of pre-commit to force dep. installation in CI

* Different pre-commit version

* Added depth_first tests

* Added depth_first_bnb tests

* Push to try and install all dependencies correctly

* Added back cache check for installing dependencies. New way of calling flake8, added class dependencies on tests

* Removed ls

* Core change test

* Core change test - new correctly

* Core archiving works

* Fixed pytest ordering and upgraded pandas version to trigger new cache

* Upgraded pandas

* Changed pandas version to 1.1.0

* Dependency check

* new flake8 installation

* Flake8 action

* Added pip update flag

* Cleaned up the flake8 action usage

* Trying to install new deps

* Removed caching, only using dependencies during pytest

* Add documentation to project (#24)

* Ran the sphinx quickstart, ignored mypy on docs

* First version of docs

* Added installation instructions for python

* Finished installation page and added quickstart info (not done yet)

* Finished v1 of the quickstart guide

* Removed heterogeneous setup page and added todo for creating example

* Added manpages for the datasets and algorithms

* Added helpers and visualize documentation

* Added placeholders for the Protein properties

* Added methods of Protein to the documentation

* Small changes

* Reworked the README

* Added whitespace for enter

* Added github star and filler-logo

* Starting on logo

* Added logo

* Removed github fork banner

* Logo test

* Changed logo loading

* New test

* Trying image tag

* Trying image tag 2.0

* Trying image tag 2.0

* Trying relative link

* New size

* New logo test

* New logo try

* New logo

* Reworked logo

* Downgraded matplotlib to alllow CI pipeline

* Added edittable logo, fixed small rst things, fixed compression of cores

* Added some figures, added reference to license, added license

* Started on AminoAcid class (#28)

* Started on AminoAcid class

* Added comments in core, still bugs to sort out

* Fixed more bugs in the core when adding AminoAcid class

* Moved part of bind

* Integrated AminoAcid class and fixed Protein tests

* Mid way testing for new depth-first approach

* Added local check script and depth_first works for HPPH

* Fixed depth_first search new version

* Fixed depth_first_bnb algorithm using new system

* Fixed small core bugs, working on new logo

* Mid-way of changing bond_value  structure

* Cleaned up bugs from intermediate version. Bumped versions of requirements. Introduced max_weights string for keeping track of possible future scores. Merged bond_semetry model setup with the else model setup. Fixed bug with cur_len of protein always being 1. Fixed getting the weight of a amino bond

* Bumbed python version in github workflow for matplotlib version dependency

* Bumped workflow python version to 3.9 as numpy 1.23 requires so

* Removed h_idxs from prune function. Nothing has been tested

* Fixed Protein signature for pybind build

* Setup for debugging current protein issues

* Introduced core testing code

* Finished test script for amino acids

* Started on Protein core tests

* Fixed protein test compilation

* Fixed first couple protein generation checks

* Added more debug statements for core tests

* Fixed bugs with bond checks

* Fixed generation of weighted amino maps

* Finished all protein generation test

* Added debug options in script to run core tests with gdb

* Added removal of amino tests

* Updated some pytest asserts. Added pytest and core_test asserts for score updates

* Updated reference for black in pre-commit

* Try adding core build in github actions pipeline

* Fixed local algorithm core tests

* Fixed dfs_bnb

* Fixed pybind11 change to providing protein pointers

* Added special compilation case for MacOS

* Changed minimum Python version to 3.9 as 3.11 will release soon

* Changed always build to only build python 3.9 versions

* Changed CIwheel builds to be specific instead of exlcuding based

* Leaving documentation as is and adding issue for the future

* Added more licensing references

* Added config file for rtfd to set python version to 3.9

* Temp commit to switch branch

* Update core merge (#33)

* Started on AminoAcid class

* Added comments in core, still bugs to sort out

* Fixed more bugs in the core when adding AminoAcid class

* Moved part of bind

* Integrated AminoAcid class and fixed Protein tests

* Mid way testing for new depth-first approach

* Added local check script and depth_first works for HPPH

* Fixed depth_first search new version

* Fixed depth_first_bnb algorithm using new system

* Fixed small core bugs, working on new logo

* Mid-way of changing bond_value  structure

* Cleaned up bugs from intermediate version. Bumped versions of requirements. Introduced max_weights string for keeping track of possible future scores. Merged bond_semetry model setup with the else model setup. Fixed bug with cur_len of protein always being 1. Fixed getting the weight of a amino bond

* Bumbed python version in github workflow for matplotlib version dependency

* Bumped workflow python version to 3.9 as numpy 1.23 requires so

* Removed h_idxs from prune function. Nothing has been tested

* Fixed Protein signature for pybind build

* Setup for debugging current protein issues

* Introduced core testing code

* Finished test script for amino acids

* Started on Protein core tests

* Fixed protein test compilation

* Fixed first couple protein generation checks

* Added more debug statements for core tests

* Fixed bugs with bond checks

* Fixed generation of weighted amino maps

* Finished all protein generation test

* Added debug options in scriptn to run core tests with gdb

* Fixed the last_pos indexing error from place_amino. Changed the 'changed' variable to 'solutions_found'-like variable

* Solved typing issues

* Finished protein movement tests

* Added removal of amino tests

* Updated some pytest asserts. Added pytest and core_test asserts for score updates

* Updated reference for black in pre-commit

* Fixed score generation of core_test

* Fixed score update through removal

* Try adding core build in github actions pipeline

* Started on algorithm code

* Changed signature of depth_first to use pointers. Added testing code for 2d and 3d depth_first tests

* Fixed local algorithm core tests

* Fixed dfs_bnb

* Fixed pybind11 change to providing protein pointers

* Added dynamic_lookup for linking python in case of undefined symbols

* New way of setting -undefined flag

* Updated the way of passing -undefined setting for macos

* Added special compilation case for MacOS

* Saving Furo update for issue

* Changed minimum Python version to 3.9 as 3.11 will release soon

* Updated versions for wheel deployment

* Changed always build to only build python 3.9 versions

* Changed CIwheel builds to be specific instead of exlcuding based

* Leaving documentation as is and adding issue for the future

* Added more licensing references

* Added config file for rtfd to set python version to 3.9

* Removed commented code
  • Loading branch information
okkevaneck authored Oct 3, 2022
1 parent 488aec7 commit df433f8
Show file tree
Hide file tree
Showing 50 changed files with 2,621 additions and 461 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
extend-ignore = E203, W503
5 changes: 4 additions & 1 deletion .githooks/compress_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ COREDIR=prospr/core/src
DATADIR=prospr/data


# Move into the git root.
cd $(git rev-parse --show-toplevel)

# Create .zip core archive.
zip -jrq prospr_core.zip "${COREDIR}/"
zip -jqr prospr_core.zip "${COREDIR}/"
mv prospr_core.zip "${ARCHIVEDIR}/prospr_core.zip"

# Create .tar.gz core archive.
Expand Down
87 changes: 53 additions & 34 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,51 @@ name: CI-CD
on: push

jobs:
matrix_prep:
name: Prepare Matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3

- uses: nelonoel/branch-name@v1.0.1

- id: set-matrix
uses: JoshuaTheMiller/conditional-build-matrix@0.0.1
with:
inputFile: '.github/workflows/matrix_includes.json'
filter: '[?starts_with(`${{ env.BRANCH_NAME }}`, runOn)] || [?runOn == `always`]'

syntax_check:
name: Check for syntax errors.
name: Check for syntax errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Flake8 - Error on syntax errors or undefined names
uses: py-actions/flake8@v1.1.0
with:
args: --count --select=E9,F63,F7,F82 --show-source --statistics
update-pip: "true"

- name: Flake8 - Warn on everything else
uses: py-actions/flake8@v1.1.0
with:
args: --count --exit-zero --max-complexity=10 --statistics
max-line-length: 127
update-pip: "true"

pytest:
name: Pytest
needs: syntax_check
strategy:
matrix:
python-version: [3.6]
python-version: [3.9]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
Expand All @@ -20,60 +57,42 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
- name: Lint with flake8
run: |
# Stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
matrix_prep:
name: Prepare Matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
python -m pip install -r requirements.txt
./manage.sh build
python -m pip install -e .
- uses: nelonoel/branch-name@v1.0.1

- id: set-matrix
uses: JoshuaTheMiller/conditional-build-matrix@0.0.1
with:
inputFile: '.github/workflows/matrix_includes.json'
filter: '[?starts_with(`${{ env.BRANCH_NAME }}`, runOn)] || [?runOn == `always`]'
- name: Test with pytest
run: pytest

build_wheels:
name: Build wheels
needs: [syntax_check, matrix_prep]
needs: [pytest, matrix_prep]
strategy:
matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2

- name: Build wheels
uses: joerick/cibuildwheel@v1.10.0
uses: pypa/cibuildwheel@v2.10.1
env:
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_SKIP: ${{ matrix.cibw_skip }}
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.6"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9"

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
needs: syntax_check
needs: pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2
Expand All @@ -87,7 +106,7 @@ jobs:
- name: Check metadata
run: twine check dist/*

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/matrix_includes.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,55 @@
{
"runOn": "master",
"os": "ubuntu-latest",
"cibw_skip": "cp27-* cp35-* *-win32 pp27-*",
"cibw_build": ""
"cibw_skip": "",
"cibw_build": "cp39-* cp310-* cp311-* pp37-* pp38-* pp39-*"
},
{
"runOn": "master",
"os": "windows-latest",
"cibw_skip": "cp27-* cp35-* *-win32 pp27-*",
"cibw_build": ""
"cibw_skip": "",
"cibw_build": "cp39-* cp310-* cp311-* pp37-* pp38-* pp39-*"
},
{
"runOn": "master",
"os": "macos-latest",
"cibw_skip": "cp27-* cp35-* *-win32 pp27-*",
"cibw_build": ""
"cibw_skip": "",
"cibw_build": "cp39-* cp310-* cp311-* pp37-* pp38-* pp39-*"
},
{
"runOn": "release-",
"os": "ubuntu-latest",
"cibw_skip": "cp27-* cp35-* *-win32 pp27-*",
"cibw_build": ""
"cibw_skip": "",
"cibw_build": "cp39-* cp310-* cp311-* pp37-* pp38-* pp39-*"
},
{
"runOn": "release-",
"os": "windows-latest",
"cibw_skip": "cp27-* cp35-* *-win32 pp27-*",
"cibw_build": ""
"cibw_skip": "",
"cibw_build": "cp39-* cp310-* cp311-* pp37-* pp38-* pp39-*"
},
{
"runOn": "release-",
"os": "macos-latest",
"cibw_skip": "cp27-* cp35-* *-win32 pp27-*",
"cibw_build": ""
"cibw_skip": "",
"cibw_build": "cp39-* cp310-* cp311-* pp37-* pp38-* pp39-*"
},
{
"runOn": "always",
"os": "ubuntu-latest",
"cibw_skip": "",
"cibw_build": "cp36-manylinux_x86_64"
"cibw_build": "cp39-manylinux_x86_64"
},
{
"runOn": "always",
"os": "windows-latest",
"cibw_skip": "",
"cibw_build": "cp36-win_amd64"
"cibw_build": "cp39-win_amd64"
},
{
"runOn": "always",
"os": "macos-latest",
"cibw_skip": "",
"cibw_build": "cp36-macosx_x86_64"
"cibw_build": "cp39-macosx_x86_64"
}
]
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
# ================
# PROJECT IGNORES.
# ================
# Ignore test files.
*test.py

# Ignore core compiled Python files.
prospr/core/**/*.py
!prospr/core/**/__init__.py
Expand Down
7 changes: 5 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ repos:
rev: v3.2.0
hooks:
- id: trailing-whitespace
exclude: README.md
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
Expand All @@ -22,14 +23,16 @@ repos:
rev: v0.812
hooks:
- id: mypy
exclude: ^docs/
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 22.8.0
hooks:
- id: black
language_version: python3.8
language_version: python3.10
- repo: local
hooks:
- id: compress-files
name: compress-files
pass_filenames: false
entry: ./.githooks/compress_files.sh
language: script
10 changes: 10 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2

build:
os: "ubuntu-20.04"
tools:
python: "3.10"

# Build from the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
Loading

0 comments on commit df433f8

Please sign in to comment.