Skip to content

Commit

Permalink
Fixed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
okkevaneck committed Oct 6, 2022
2 parents d3a063a + 97d51d3 commit 30e5705
Show file tree
Hide file tree
Showing 11 changed files with 110 additions and 20 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -74,10 +74,12 @@ jobs:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Build wheels
uses: pypa/[email protected].1
uses: pypa/[email protected].2
env:
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_SKIP: ${{ matrix.cibw_skip }}
Expand All @@ -95,7 +97,9 @@ jobs:
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Install dependencies
run: python -m pip install twine build
Expand All @@ -115,15 +119,17 @@ jobs:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: "3.9"

- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
12 changes: 6 additions & 6 deletions .github/workflows/matrix_includes.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@
"runOn": "master",
"os": "ubuntu-latest",
"cibw_skip": "",
"cibw_build": "cp39-* cp310-* cp311-* pp37-* pp38-* pp39-*"
"cibw_build": "cp39-* cp310-* pp37-* pp38-* pp39-*"
},
{
"runOn": "master",
"os": "windows-latest",
"cibw_skip": "",
"cibw_build": "cp39-* cp310-* cp311-* pp37-* pp38-* pp39-*"
"cibw_build": "cp39-* cp310-* pp37-* pp38-* pp39-*"
},
{
"runOn": "master",
"os": "macos-latest",
"cibw_skip": "",
"cibw_build": "cp39-* cp310-* cp311-* pp37-* pp38-* pp39-*"
"cibw_build": "cp39-* cp310-* pp37-* pp38-* pp39-*"
},
{
"runOn": "release-",
"os": "ubuntu-latest",
"cibw_skip": "",
"cibw_build": "cp39-* cp310-* cp311-* pp37-* pp38-* pp39-*"
"cibw_build": "cp39-* cp310-* pp37-* pp38-* pp39-*"
},
{
"runOn": "release-",
"os": "windows-latest",
"cibw_skip": "",
"cibw_build": "cp39-* cp310-* cp311-* pp37-* pp38-* pp39-*"
"cibw_build": "cp39-* cp310-* pp37-* pp38-* pp39-*"
},
{
"runOn": "release-",
"os": "macos-latest",
"cibw_skip": "",
"cibw_build": "cp39-* cp310-* cp311-* pp37-* pp38-* pp39-*"
"cibw_build": "cp39-* cp310-* pp37-* pp38-* pp39-*"
},
{
"runOn": "always",
Expand Down
Binary file modified archives/prospr_core.tar.gz
Binary file not shown.
Binary file modified archives/prospr_core.zip
Binary file not shown.
12 changes: 10 additions & 2 deletions prospr/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
from prospr_core import Protein, depth_first, depth_first_bnb
from prospr_core import AminoAcid, Protein, depth_first, depth_first_bnb
from .datasets import load_vanEck250, load_vanEck1000

__all__ = ["Protein", "depth_first", "depth_first_bnb"]
__all__ = [
"AminoAcid",
"Protein",
"depth_first",
"depth_first_bnb",
"load_vanEck250",
"load_vanEck1000",
]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ build-backend = "setuptools.build_meta"
line-length = 79

[tool.pytest]
minversion = 6.2
minversion = 7.1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from setuptools import setup
from pybind11.setup_helpers import Pybind11Extension, build_ext

__version__ = "0.2a3"
__version__ = "0.2a4"

# Define core module extension.
ext_modules = [
Expand Down
6 changes: 4 additions & 2 deletions tests/core/test_depth_first.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"""
File: test_depth_first.py
Description: This file contains the pytest tests for the depth_first search
core code.
core code.
License: This file is licensed under the GNU LGPL V3 license by
Okke van Eck (2020 - 2022). See the LICENSE file for the
specifics.
"""

from prospr import Protein, depth_first
Expand All @@ -19,7 +22,6 @@ def protein_3d():
return Protein("HPPHPHPHPH", 3, model="HP")


# @pytest.mark.order(after="test_protein.TestProtein")
@pytest.mark.order(order=2)
class TestDepthFirst:
def test_protein_2d_depth_first(self, protein_2d):
Expand Down
6 changes: 4 additions & 2 deletions tests/core/test_depth_first_bnb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"""
File: test_depth_first_bnb.py
Description: This file contains the pytest tests for the depth_first_bnb
search core code.
search core code.
License: This file is licensed under the GNU LGPL V3 license by
Okke van Eck (2020 - 2022). See the LICENSE file for the
specifics.
"""

from prospr import Protein, depth_first_bnb
Expand All @@ -19,7 +22,6 @@ def protein_3d():
return Protein("HPPHPHPHPH", 3, model="HP")


# @pytest.mark.order(after="test_protein.TestProtein")
@pytest.mark.order(order=2)
class TestDepthFirstBnB:
def test_protein_2d_depth_first_bnb(self, protein_2d):
Expand Down
3 changes: 3 additions & 0 deletions tests/core/test_protein.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"""
File: test_protein.py
Description: This file contains the pytest tests for the Protein core code.
License: This file is licensed under the GNU LGPL V3 license by
Okke van Eck (2020 - 2022). See the LICENSE file for the
specifics.
"""

from prospr import Protein
Expand Down
69 changes: 69 additions & 0 deletions tests/data/test_datasets.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/usr/bin/env python3
"""
File: test_depth_first.py
Description: This file contains the pytest tests for loading data from the
datasets.
License: This file is licensed under the GNU LGPL V3 license by
Okke van Eck (2020 - 2022). See the LICENSE file for the
specifics.
"""

from prospr import load_vanEck250, load_vanEck1000


class TestDatasets:
def test_vanEck250(self):
"""
Test loading data from vanEck250 works.
"""
l10 = load_vanEck250()
l10_2 = load_vanEck250(10)
l20 = load_vanEck250(20)
l30 = load_vanEck250(30)
l40 = load_vanEck250(40)
l50 = load_vanEck250(50)
l60 = load_vanEck250(60)
l70 = load_vanEck250(70)
l80 = load_vanEck250(80)
l90 = load_vanEck250(90)
l100 = load_vanEck250(100)

assert not l10.empty
assert not l10_2.empty
assert not l20.empty
assert not l30.empty
assert not l40.empty
assert not l50.empty
assert not l60.empty
assert not l70.empty
assert not l80.empty
assert not l90.empty
assert not l100.empty

def test_vanEck1000(self):
"""
Test loading data from vanEck1000 works.
"""
l10 = load_vanEck1000()
l10_2 = load_vanEck1000(10)
l20 = load_vanEck1000(20)
l30 = load_vanEck1000(30)
l40 = load_vanEck1000(40)
l50 = load_vanEck1000(50)
l60 = load_vanEck1000(60)
l70 = load_vanEck1000(70)
l80 = load_vanEck1000(80)
l90 = load_vanEck1000(90)
l100 = load_vanEck1000(100)

assert not l10.empty
assert not l10_2.empty
assert not l20.empty
assert not l30.empty
assert not l40.empty
assert not l50.empty
assert not l60.empty
assert not l70.empty
assert not l80.empty
assert not l90.empty
assert not l100.empty

0 comments on commit 30e5705

Please sign in to comment.