Skip to content

Commit

Permalink
Merge pull request isambard-uob#19 from universvm/master
Browse files Browse the repository at this point in the history
Add cython as dependency to the install
  • Loading branch information
ChrisWellsWood authored Dec 12, 2023
2 parents f2a8a17 + d113282 commit 6f02ebd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install flake8 pytest hypothesis cython
python setup.py install
pip install .
pip install -r dev-requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[build-system]
requires = ["setuptools", "wheel", "Cython"]
build-backend = "setuptools.build_meta"

[project]
name = "AMPAL"
version = "1.5.1"
requires-python = ">= 3.8"
readme = "README.md"
dependencies = [
"Cython",
"networkx==3.1",
"numpy==1.22",
"requests",
]
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def readme():

setup(
name="AMPAL",
version="1.5.0",
version="1.5.1",
description="A simple framework for representing biomolecular structure.",
long_description=readme(),
long_description_content_type="text/markdown; charset=UTF-8; variant=GFM",
Expand All @@ -31,12 +31,15 @@ def readme():
packages=find_packages("src"),
package_dir={"": "src"},
include_package_data=True,
setup_requires=[
"Cython",
],
# This code automatically builds the Cython extensions.
ext_modules=cythonize(
[
Extension("ampal.geometry", ["src/ampal/geometry.pyx"]),
]
),
install_requires=["Cython", "networkx", "numpy==1.22", "requests"],
install_requires=["Cython", "networkx==3.1", "numpy==1.22", "requests"],
zip_safe=False,
)
4 changes: 1 addition & 3 deletions src/ampal/amino_acids.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,6 @@ def get_aa_letter(aa_code):

return aa_letter


def get_aa_info(code):
"""Get dictionary of information relating to a new amino acid code not currently in the database.
Expand Down Expand Up @@ -795,7 +794,7 @@ def get_aa_info(code):
)
r = requests.get(url_string)
# Raise error if content not obtained.
if not r.ok:
if not r.ok or "does not exist" in r.text:
raise IOError("Could not get to url {0}".format(url_string))

# Parse r.text in an ugly way to get the required information.
Expand All @@ -814,7 +813,6 @@ def get_aa_info(code):
}
return aa_dict


def add_amino_acid_to_json(
code, description, letter="X", modified=None, force_add=False
):
Expand Down

0 comments on commit 6f02ebd

Please sign in to comment.