From 3bcb79274af6f4b4de1eb91e9a5ef20f10144f3d Mon Sep 17 00:00:00 2001 From: VinzentRisch Date: Tue, 20 Aug 2024 16:39:00 +0200 Subject: [PATCH] more lint --- rescript/plugin_setup.py | 14 ++++++++------ rescript/testing.py | 15 --------------- rescript/tests/test_bv_brc.py | 4 ++-- 3 files changed, 10 insertions(+), 23 deletions(-) delete mode 100644 rescript/testing.py diff --git a/rescript/plugin_setup.py b/rescript/plugin_setup.py index 5f1393c..2f4101f 100644 --- a/rescript/plugin_setup.py +++ b/rescript/plugin_setup.py @@ -1301,15 +1301,16 @@ outputs=[('metadata', ImmutableMetadata)], input_descriptions={}, parameter_descriptions={ - 'data_type': 'BV-BCR data type. Check https://www.bv-brc.org/api/doc/ for ' - 'documentation.', - 'rql_query': 'Query in RQL format. Check https://www.bv-brc.org/api/doc/ for ' - 'documentation.' + 'data_type': 'BV-BCR data type. Check https://www.bv-brc.org/api/doc/ ' + 'for documentation.', + 'rql_query': 'Query in RQL format. Check ' + 'https://www.bv-brc.org/api/doc/ for documentation.' }, output_descriptions={ 'metadata': 'metadata'}, name='Fetch BV-BCR metadata.', - description="Fetch BV-BCR metadata for a specific data type with an RQL query.", + description="Fetch BV-BCR metadata for a specific data type with an RQL " + "query.", ) plugin.methods.register_function( @@ -1364,7 +1365,8 @@ }, name='Fetch genome features from BV-BRC.', - description='Fetch DNA and protein sequences of genome features from BV-BRC.', + description='Fetch DNA and protein sequences of genome features from ' + 'BV-BRC.', ) # Registrations diff --git a/rescript/testing.py b/rescript/testing.py deleted file mode 100644 index d4a63be..0000000 --- a/rescript/testing.py +++ /dev/null @@ -1,15 +0,0 @@ -import requests - - -response = requests.get("https://www.bv-brc.org/api/genome_sequence/?in(genome_id,(224308.43))") - -# Raise an error if the request was not successful -response.raise_for_status() - -# Load the response data as JSON -data = response.json() - -# Count the number of entries in the JSON dictionary -num_entries = len(data) - -print(num_entries) \ No newline at end of file diff --git a/rescript/tests/test_bv_brc.py b/rescript/tests/test_bv_brc.py index a28afd3..929fee7 100644 --- a/rescript/tests/test_bv_brc.py +++ b/rescript/tests/test_bv_brc.py @@ -361,7 +361,7 @@ def test_fetch_metadata_bv_brc(self, mock_download_data, mock_metadata.return_value = mock_metadata_instance # Call the function - result = fetch_metadata_bv_brc( + fetch_metadata_bv_brc( data_type="genome", rql_query="genome_id=in(1,2)" ) @@ -405,7 +405,7 @@ def test_fetch_taxonomy_bv_brc( mock_download_data.return_value = mock_response # Prepare mocks for file output - with patch('builtins.open', unittest.mock.mock_open()) as mock_file: + with patch('builtins.open', unittest.mock.mock_open()): directory = fetch_taxonomy_bv_brc( rql_query="taxon_id=in(taxon1,taxon2)", ranks=['rank1', 'rank2'],