From f6775617b6c34bdb86b7009b3361f3b828bb84ea Mon Sep 17 00:00:00 2001 From: James Parkhurst Date: Mon, 21 Jul 2025 14:53:41 +0100 Subject: [PATCH 1/5] Changed to use enums rather than strings --- profet/alphafold.py | 16 ++++++++++++---- profet/cache.py | 13 ++++++++++--- profet/enums.py | 6 ++++++ profet/pdb.py | 13 +++++++++---- profet/profet.py | 9 ++++++--- 5 files changed, 43 insertions(+), 14 deletions(-) create mode 100644 profet/enums.py diff --git a/profet/alphafold.py b/profet/alphafold.py index 681eee7..49a8851 100644 --- a/profet/alphafold.py +++ b/profet/alphafold.py @@ -9,6 +9,7 @@ from requests_html import HTMLSession import requests from bs4 import BeautifulSoup +from .enums import FileType class Alphafold_DB: @@ -40,11 +41,13 @@ def check_structure(self, uniprot_id: str) -> bool: """ uniprot_id = uniprot_id.upper() - url = self.make_url(uniprot_id, "pdb") + url = self.make_url(uniprot_id, FileType.pdb) r = requests.get(url) return r.status_code != 404 - def get_file_url(self, uniprot_id: str, filetype: str = "cif") -> str: + def get_file_url( + self, uniprot_id: str, filetype: FileType = FileType.cif + ) -> str: """ Get file url relative to an id from the the Alphafold entry page @@ -56,6 +59,7 @@ def get_file_url(self, uniprot_id: str, filetype: str = "cif") -> str: The URL of the file to download """ + filetype = FileType(filetype) # Do we recognise the filetpye, otherwise raise an exception. if filetype in ["pdb", "cif"]: @@ -77,7 +81,9 @@ def get_file_url(self, uniprot_id: str, filetype: str = "cif") -> str: # Return the URL return url["href"] - def make_url(self, uniprot_id: str, filetype: str = "cif") -> str: + def make_url( + self, uniprot_id: str, filetype: FileType = FileType.cif + ) -> str: """ Make the URL for the protein @@ -89,6 +95,7 @@ def make_url(self, uniprot_id: str, filetype: str = "cif") -> str: The URL of the file to download """ + filetype = FileType(filetype) uniprot_id = uniprot_id.upper() af_id = "AF-" + uniprot_id + "-F1" @@ -109,7 +116,7 @@ def make_url(self, uniprot_id: str, filetype: str = "cif") -> str: def get_pdb( self, uniprot_id: str, - filetype: str = "cif", + filetype: FileType = FileType.cif, ) -> tuple: """ Returns pdb/cif as strings, saves to file if requested. @@ -123,6 +130,7 @@ def get_pdb( Tuple containing the filename and file from the database """ + filetype = FileType(filetype) # af_id = self.df.loc[self.df['Uniprot_ID'] == uniprot_id.upper()]["AF_ID"].to_numpy()[0] # version = self.df.loc[self.df['Uniprot_ID'] == uniprot_id.upper()]["version"].to_numpy()[0] # af_id = "AF-"+uniprot_id+"-F1" diff --git a/profet/cache.py b/profet/cache.py index c043769..2d4e969 100644 --- a/profet/cache.py +++ b/profet/cache.py @@ -1,5 +1,6 @@ import json import os +from .enums import FileType class PDBFileCache(object): @@ -35,7 +36,7 @@ def __init__(self, directory: str = None): # The manifest filename self.manifest = os.path.join(self.directory, "manifest.txt") - def path(self, uniprot_id: str, filetype: str = "cif") -> str: + def path(self, uniprot_id: str, filetype: FileType = FileType.cif) -> str: """ Get the proposed path @@ -47,6 +48,7 @@ def path(self, uniprot_id: str, filetype: str = "cif") -> str: The absolute path """ + filetype = FileType(filetype) assert filetype in ["pdb", "cif"] return os.path.join(self.directory, uniprot_id.lower()) + "." + filetype @@ -64,7 +66,7 @@ def find(self, uniprot_id: str) -> list: return [ filename for filename in [ - self.path(uniprot_id, filetype) for filetype in ["pdb", "cif"] + self.path(uniprot_id, filetype) for filetype in FileType ] if os.path.exists(filename) ] @@ -137,7 +139,11 @@ def items(self): yield uniprot_id, self.path(uniprot_id, filetype[1:]) def _update_manifest( - self, uniprot_id: str, fileorigin: str, filetype: str, filename: str + self, + uniprot_id: str, + fileorigin: str, + filetype: FileType, + filename: str, ): """ Update the manifest file @@ -149,6 +155,7 @@ def _update_manifest( filename: The filename """ + filetype = FileType(filetype) # Read the current manifest if os.path.exists(self.manifest): diff --git a/profet/enums.py b/profet/enums.py new file mode 100644 index 0000000..2b7bf02 --- /dev/null +++ b/profet/enums.py @@ -0,0 +1,6 @@ +from enum import Enum + + +class FileType(str, Enum): + pdb = "pdb" + cif = "cif" diff --git a/profet/pdb.py b/profet/pdb.py index d033dc5..b8a017d 100644 --- a/profet/pdb.py +++ b/profet/pdb.py @@ -1,5 +1,6 @@ from urllib.request import urlretrieve from rcsbapi.search import TextQuery +from .enums import FileType class PDB_DB: @@ -50,7 +51,9 @@ def check_structure(self, uniprot_id: str) -> bool: return True return False - def make_url(self, uniprot_id: str, filetype: str = "pdb") -> str: + def make_url( + self, uniprot_id: str, filetype: FileType = FileType.pdb + ) -> str: """ Make the URL for the protein @@ -63,6 +66,7 @@ def make_url(self, uniprot_id: str, filetype: str = "pdb") -> str: """ + filetype = FileType(filetype) uniprot_id = uniprot_id.upper() url = f"https://files.rcsb.org/download/{uniprot_id}.{filetype}" return url @@ -70,7 +74,7 @@ def make_url(self, uniprot_id: str, filetype: str = "pdb") -> str: def get_pdb( self, uniprot_id: str, - filetype: str = "cif", + filetype: FileType = FileType.cif, ) -> tuple: """ Returns pdb/cif as strings, saves to file if requested @@ -84,6 +88,7 @@ def get_pdb( """ + filetype = FileType(filetype) if not self.results: self.results = [self.uniprot_id_to_pdb_id(uniprot_id)] @@ -97,9 +102,9 @@ def get_pdb( filedata = file.read() except Exception: if filetype == "pdb": - filetype = "cif" + filetype = FileType.cif else: - filetype = "pdb" + filetype = FileType.pdb url = self.make_url(pdb_id, filetype) filename, result = urlretrieve(url) with open(filename) as file: diff --git a/profet/profet.py b/profet/profet.py index 58fce1b..e2aa9e1 100644 --- a/profet/profet.py +++ b/profet/profet.py @@ -2,6 +2,7 @@ from .pdb import PDB_DB from .cache import PDBFileCache from .cleaver import Cleaver +from .enums import FileType import os @@ -54,7 +55,7 @@ def cache(self) -> PDBFileCache: def file_from_db( self, prot_id: str, - filetype: str = "cif", + filetype: FileType = FileType.cif, db: str = "pdb", ) -> tuple: """ @@ -69,6 +70,7 @@ def file_from_db( Tuple containing the filename and file from the database """ + filetype = FileType(filetype) return {"pdb": self.pdb.get_pdb, "alphafold": self.alpha.get_pdb}[db]( prot_id, filetype=filetype ) @@ -76,7 +78,7 @@ def file_from_db( def get_file( self, uniprot_id: str, - filetype: str = "cif", + filetype: FileType = FileType.cif, filesave: bool = False, db: str = "pdb", ) -> tuple: @@ -96,6 +98,7 @@ def get_file( 2. File from the database, or None if it is not available in any database. """ + filetype = FileType(filetype) # Get the PDB cache cache = PDBFileCache(directory=self.save_directory) @@ -211,7 +214,7 @@ def remove( """ # Get the PDB cache cache = PDBFileCache(directory=self.save_directory) - identifier, _, _ = self.pdb.get_pdb(uniprot_id, filetype="cif") + identifier, _, _ = self.pdb.get_pdb(uniprot_id, filetype=FileType.cif) if uniprot_id in cache: filename = cache[uniprot_id] signal_list = self.Cleaver.signal_residuenumbers_requester( From 050edce4da86f4156ad1faa67e8296e55cf4a1d5 Mon Sep 17 00:00:00 2001 From: James Parkhurst Date: Mon, 21 Jul 2025 15:37:52 +0100 Subject: [PATCH 2/5] Cast to string --- profet/alphafold.py | 2 +- profet/pdb.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/profet/alphafold.py b/profet/alphafold.py index 49a8851..c89f1d9 100644 --- a/profet/alphafold.py +++ b/profet/alphafold.py @@ -95,7 +95,7 @@ def make_url( The URL of the file to download """ - filetype = FileType(filetype) + filetype = str(FileType(filetype)) uniprot_id = uniprot_id.upper() af_id = "AF-" + uniprot_id + "-F1" diff --git a/profet/pdb.py b/profet/pdb.py index b8a017d..d5dd8e8 100644 --- a/profet/pdb.py +++ b/profet/pdb.py @@ -66,7 +66,7 @@ def make_url( """ - filetype = FileType(filetype) + filetype = str(FileType(filetype)) uniprot_id = uniprot_id.upper() url = f"https://files.rcsb.org/download/{uniprot_id}.{filetype}" return url From 93b05b07e841aa19a93ef6b6163067ab22526d6a Mon Sep 17 00:00:00 2001 From: James Parkhurst Date: Mon, 21 Jul 2025 15:47:27 +0100 Subject: [PATCH 3/5] Fixed typing issuet --- profet/alphafold.py | 4 ++-- profet/pdb.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/profet/alphafold.py b/profet/alphafold.py index c89f1d9..2246e2c 100644 --- a/profet/alphafold.py +++ b/profet/alphafold.py @@ -95,7 +95,7 @@ def make_url( The URL of the file to download """ - filetype = str(FileType(filetype)) + filetype = FileType(filetype) uniprot_id = uniprot_id.upper() af_id = "AF-" + uniprot_id + "-F1" @@ -108,7 +108,7 @@ def make_url( + "-model_v" + str(version) + "." - + filetype + + str(filetype) ) return url diff --git a/profet/pdb.py b/profet/pdb.py index d5dd8e8..1c36e55 100644 --- a/profet/pdb.py +++ b/profet/pdb.py @@ -66,9 +66,9 @@ def make_url( """ - filetype = str(FileType(filetype)) + filetype = FileType(filetype) uniprot_id = uniprot_id.upper() - url = f"https://files.rcsb.org/download/{uniprot_id}.{filetype}" + url = f"https://files.rcsb.org/download/{uniprot_id}.{str(filetype)}" return url def get_pdb( From c725cdca2180a45ae14027fc3c936a269850d70c Mon Sep 17 00:00:00 2001 From: James Parkhurst Date: Mon, 21 Jul 2025 16:01:19 +0100 Subject: [PATCH 4/5] Fixed url issue --- profet/alphafold.py | 2 +- profet/pdb.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/profet/alphafold.py b/profet/alphafold.py index 2246e2c..9a8017f 100644 --- a/profet/alphafold.py +++ b/profet/alphafold.py @@ -108,7 +108,7 @@ def make_url( + "-model_v" + str(version) + "." - + str(filetype) + + filetype.name ) return url diff --git a/profet/pdb.py b/profet/pdb.py index 1c36e55..b81c7b4 100644 --- a/profet/pdb.py +++ b/profet/pdb.py @@ -68,7 +68,7 @@ def make_url( filetype = FileType(filetype) uniprot_id = uniprot_id.upper() - url = f"https://files.rcsb.org/download/{uniprot_id}.{str(filetype)}" + url = f"https://files.rcsb.org/download/{uniprot_id}.{filetype.name}" return url def get_pdb( From f9ddc26b64b6575e6b843a830fdbf406fd4cd28c Mon Sep 17 00:00:00 2001 From: James Parkhurst Date: Thu, 31 Jul 2025 16:48:50 +0100 Subject: [PATCH 5/5] Changed alan-turing-institute to ccpem --- CONTRIBUTING.md | 20 ++++++++++---------- README.md | 12 ++++++------ docs/source/installation.rst | 2 +- run_profet.ipynb | 33 ++++++++++++++++++++------------- setup.cfg | 8 ++++---- 5 files changed, 41 insertions(+), 34 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8475def..f9f787f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,20 +29,20 @@ All types of contributions are encouraged and valued. See the [Table of Contents ## Code of Conduct This project and everyone participating in it is governed by the -[profet Code of Conduct](https://github.com/alan-turing-institute/profetblob/master/CODE_OF_CONDUCT.md). +[profet Code of Conduct](https://github.com/ccpem/profetblob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to <>. ## I Have a Question -> If you want to ask a question, we assume that you have read the available [Documentation](https://github.com/alan-turing-institute/profet). +> If you want to ask a question, we assume that you have read the available [Documentation](https://github.com/ccpem/profet). -Before you ask a question, it is best to search for existing [Issues](https://github.com/alan-turing-institute/profet/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first. +Before you ask a question, it is best to search for existing [Issues](https://github.com/ccpem/profet/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first. If you then still feel the need to ask a question and need clarification, we recommend the following: -- Open an [Issue](https://github.com/alan-turing-institute/profet/issues/new). +- Open an [Issue](https://github.com/ccpem/profet/issues/new). - Provide as much context as you can about what you're running into. - Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. @@ -61,8 +61,8 @@ We will then take care of the issue as soon as possible. A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible. - Make sure that you are using the latest version. -- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://github.com/alan-turing-institute/profet). If you are looking for support, you might want to check [this section](#i-have-a-question)). -- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/alan-turing-institute/profetissues?q=label%3Abug). +- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://github.com/ccpem/profet). If you are looking for support, you might want to check [this section](#i-have-a-question)). +- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/ccpem/profetissues?q=label%3Abug). - Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue. - Collect information about the bug: - Stack trace (Traceback) @@ -76,7 +76,7 @@ A good bug report shouldn't leave others needing to chase you up for more inform We use GitHub issues to track bugs and errors. If you run into an issue with the project: -- Open an [Issue](https://github.com/alan-turing-institute/profet/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.) +- Open an [Issue](https://github.com/ccpem/profet/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.) - Explain the behavior you would expect and the actual behavior. - Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case. - Provide the information you collected in the previous section. @@ -95,14 +95,14 @@ This section guides you through submitting an enhancement suggestion for profet, #### Before Submitting an Enhancement - Make sure that you are using the latest version. -- Read the [documentation](https://github.com/alan-turing-institute/profet) carefully and find out if the functionality is already covered. -- Perform a [search](https://github.com/alan-turing-institute/profet/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. +- Read the [documentation](https://github.com/ccpem/profet) carefully and find out if the functionality is already covered. +- Perform a [search](https://github.com/ccpem/profet/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. - Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library. #### How Do I Submit a Good Enhancement Suggestion? -Enhancement suggestions are tracked as [GitHub issues](https://github.com/alan-turing-institute/profet/issues). +Enhancement suggestions are tracked as [GitHub issues](https://github.com/ccpem/profet/issues). - Use a **clear and descriptive title** for the issue to identify the suggestion. - Provide a **step-by-step description of the suggested enhancement** in as many details as possible. diff --git a/README.md b/README.md index 3663625..a3ead8a 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ A Python 3 **pro**tein structure **fet**cher. Retrieves the cif or pdb files fr [![PyPI version shields.io](https://img.shields.io/pypi/v/profet.svg)](https://pypi.python.org/pypi/profet/) [![PyPI pyversions](https://img.shields.io/pypi/pyversions/profet.svg)](https://pypi.python.org/pypi/profet/) -[![Building](https://github.com/alan-turing-institute/profet/actions/workflows/python-package.yml/badge.svg)](https://github.com/alan-turing-institute/profet/actions/workflows/python-package.yml) -[![Publishing](https://github.com/alan-turing-institute/profet/actions/workflows/python-publish.yml/badge.svg)](https://github.com/alan-turing-institute/profet/actions/workflows/python-publish.yml) -[![Documentation](https://github.com/alan-turing-institute/profet/actions/workflows/sphinx.yml/badge.svg)](https://github.com/alan-turing-institute/profet/actions/workflows/sphinx.yml) +[![Building](https://github.com/ccpem/profet/actions/workflows/python-package.yml/badge.svg)](https://github.com/ccpem/profet/actions/workflows/python-package.yml) +[![Publishing](https://github.com/ccpem/profet/actions/workflows/python-publish.yml/badge.svg)](https://github.com/ccpem/profet/actions/workflows/python-publish.yml) +[![Documentation](https://github.com/ccpem/profet/actions/workflows/sphinx.yml/badge.svg)](https://github.com/ccpem/profet/actions/workflows/sphinx.yml) ## Dependencies @@ -38,7 +38,7 @@ pip install profet To install the development version, which contains the latest features and fixes, install directly from GitHub using: ```sh -pip install git+git://github.com/alan-turing-institute/profet +pip install git+git://github.com/ccpem/profet ``` To test the installation, you need to have pytest and pytest-cov packagages installed which can be done as follows. @@ -128,11 +128,11 @@ a .pdb file. The file will be cached in the "~/.pdb" directory for future use. ## Documentation -You can find more documentation including a description of the python api [here](https://alan-turing-institute.github.io/profet/). +You can find more documentation including a description of the python api [here](https://ccpem.github.io/profet/). ## Issues and Feature Requests -If you run into an issue, or if you find a workaround for an existing issue, we would very much appreciate it if you could post your question or code as a [GitHub issue](https://github.com/alan-turing-institute/profet/issues). +If you run into an issue, or if you find a workaround for an existing issue, we would very much appreciate it if you could post your question or code as a [GitHub issue](https://github.com/ccpem/profet/issues). ## Contributions diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 963febb..99c1dfe 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -12,7 +12,7 @@ fixes, install directly from GitHub using: .. code-block:: bash - pip install git+git://github.com/alan-turing-institute/profet` + pip install git+git://github.com/ccpem/profet` Test the installation, navigate to the root directory and run diff --git a/run_profet.ipynb b/run_profet.ipynb index d3030f5..8b0ac20 100644 --- a/run_profet.ipynb +++ b/run_profet.ipynb @@ -1,7 +1,6 @@ { "cells": [ { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -12,9 +11,24 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "ModuleNotFoundError", + "evalue": "No module named 'requests_html'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[1], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mprofet\u001b[39;00m\n\u001b[1;32m 3\u001b[0m ONLY_ALPHAFOLD \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mF4HvG8\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 4\u001b[0m ONLY_PDB \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m7U6Q\u001b[39m\u001b[38;5;124m\"\u001b[39m\n", + "File \u001b[0;32m~/Software/profet/profet/__init__.py:6\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mImportError\u001b[39;00m:\n\u001b[1;32m 4\u001b[0m __version__ \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124munknown\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m----> 6\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mprofet\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Fetcher\n", + "File \u001b[0;32m~/Software/profet/profet/profet.py:1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01malphafold\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Alphafold_DB\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mpdb\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m PDB_DB\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcache\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m PDBFileCache\n", + "File \u001b[0;32m~/Software/profet/profet/alphafold.py:9\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;124;03m\"\"\"https://alphafold.ebi.ac.uk/files/AF-F4HVG8-F1-model_v2.cif\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;124;03mhttps://alphafold.ebi.ac.uk/files/AF-F4HVG8-F1-model_v2.pdb\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;124;03mhttps://alphafold.ebi.ac.uk/files/AF-F4HVG8-F1-predicted_aligned_error_v2.json\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[38;5;124;03mread entry: https://alphafold.ebi.ac.uk/entry/F4HVG8\u001b[39;00m\n\u001b[1;32m 7\u001b[0m \u001b[38;5;124;03mfind cif, download that file\"\"\"\u001b[39;00m\n\u001b[0;32m----> 9\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mrequests_html\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m HTMLSession\n\u001b[1;32m 10\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mrequests\u001b[39;00m\n\u001b[1;32m 11\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mbs4\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m BeautifulSoup\n", + "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'requests_html'" + ] + } + ], "source": [ "import profet\n", "\n", @@ -24,7 +38,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -50,7 +63,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -92,7 +104,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -126,7 +137,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -160,7 +170,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -189,7 +198,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -226,7 +234,7 @@ ], "metadata": { "kernelspec": { - "display_name": ".venv", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -240,9 +248,8 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" - }, - "orig_nbformat": 4 + "version": "3.12.3" + } }, "nbformat": 4, "nbformat_minor": 2 diff --git a/setup.cfg b/setup.cfg index 8feee10..43d784e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,9 +5,9 @@ author_email = bcostagomes@turing.ac.uk description = Protein structure Fetcher from online databases long_description = file: README.md long_description_content_type = text/markdown -url = https://github.com/alan-turing-institute/profet +url = https://github.com/ccpem/profet project_urls = - Bug Tracker = https://github.com/alan-turing-institute/profet/issues + Bug Tracker = https://github.com/ccpem/profet/issues classifiers = Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 @@ -41,5 +41,5 @@ build_sphinx = sphinx-argparse -[tool:pytest] -addopts = --cov=profet --cov-report term --cov-report html +#[tool:pytest] +#addopts = --cov=profet --cov-report term --cov-report html