Sourcing python-remove-tests-dir-hook Sourcing python-catch-conflicts-hook.sh Sourcing python-remove-bin-bytecode-hook.sh Sourcing pypa-build-hook Using pypaBuildPhase Sourcing python-runtime-deps-check-hook Using pythonRuntimeDepsCheckHook Sourcing pypa-install-hook Using pypaInstallPhase Sourcing python-imports-check-hook.sh Using pythonImportsCheckPhase Sourcing python-namespaces-hook Sourcing python-catch-conflicts-hook.sh Sourcing pytest-check-hook Running phase: unpackPhase unpacking source archive /nix/store/q4jxmbgh2m4sz5wx34196v8cpmy9x7vl-biorefs-cli source root is biorefs-cli setting SOURCE_DATE_EPOCH to timestamp 315619200 of file "biorefs-cli/tests/test_uniprot.py" Running phase: patchPhase Running phase: updateAutotoolsGnuConfigScriptsPhase Running phase: configurePhase no configure script, doing nothing Running phase: buildPhase Executing pypaBuildPhase Creating a wheel... pypa build flags: --no-isolation --outdir dist/ --wheel * Getting build dependencies for wheel... * Building wheel... Successfully built biorefs_cli-0.1.0-py3-none-any.whl Finished creating a wheel... Finished executing pypaBuildPhase Running phase: pythonRuntimeDepsCheckHook Executing pythonRuntimeDepsCheck Checking runtime dependencies for biorefs_cli-0.1.0-py3-none-any.whl Finished executing pythonRuntimeDepsCheck Running phase: installPhase Executing pypaInstallPhase Successfully installed biorefs_cli-0.1.0-py3-none-any.whl Finished executing pypaInstallPhase Running phase: pythonOutputDistPhase Executing pythonOutputDistPhase Finished executing pythonOutputDistPhase Running phase: fixupPhase shrinking RPATHs of ELF executables and libraries in /nix/store/qrjfb9k71g87b1ipx3iwb051yjq5b7dp-biorefs-cli-0.1.0 checking for references to /build/ in /nix/store/qrjfb9k71g87b1ipx3iwb051yjq5b7dp-biorefs-cli-0.1.0... patching script interpreter paths in /nix/store/qrjfb9k71g87b1ipx3iwb051yjq5b7dp-biorefs-cli-0.1.0 stripping (with command strip and flags -S -p) in /nix/store/qrjfb9k71g87b1ipx3iwb051yjq5b7dp-biorefs-cli-0.1.0/lib /nix/store/qrjfb9k71g87b1ipx3iwb051yjq5b7dp-biorefs-cli-0.1.0/bin shrinking RPATHs of ELF executables and libraries in /nix/store/d1qs99nvraiix2phmknf025hfv0lgms9-biorefs-cli-0.1.0-dist checking for references to /build/ in /nix/store/d1qs99nvraiix2phmknf025hfv0lgms9-biorefs-cli-0.1.0-dist... patching script interpreter paths in /nix/store/d1qs99nvraiix2phmknf025hfv0lgms9-biorefs-cli-0.1.0-dist Rewriting #!/nix/store/gxzhl7aaiid7zp3y47jqqiq7zg5mqpwp-python3-3.14.6/bin/python3.14 to #!/nix/store/gxzhl7aaiid7zp3y47jqqiq7zg5mqpwp-python3-3.14.6 wrapping `/nix/store/qrjfb9k71g87b1ipx3iwb051yjq5b7dp-biorefs-cli-0.1.0/bin/biorefs-cli'... Executing pythonRemoveTestsDir Finished executing pythonRemoveTestsDir Running phase: installCheckPhase 47 files already formatted RUF100 [*] Unused `noqa` directive (non-enabled: `S314`) --> biorefs_cli/commands/paper.py:441:37 | 439 | if not xml_text.strip(): 440 | return [] 441 | root = ET.fromstring(xml_text) # noqa: S314 - NCBI/PubMed XML; no defusedxml dependency. | ^^^^^^^^^^^^ 442 | return [ 443 | parse_pubmed_article(article, include) | help: Remove unused `noqa` directive | 440 | return [] - root = ET.fromstring(xml_text) # noqa: S314 - NCBI/PubMed XML; no defusedxml dependency. 441 + root = ET.fromstring(xml_text) 442 | return [ | RUF100 [*] Unused `noqa` directive (non-enabled: `S314`) --> biorefs_cli/commands/paper.py:621:37 | 619 | if not xml_text.strip(): 620 | return unavailable("pmc:empty-response") 621 | root = ET.fromstring(xml_text) # noqa: S314 - NCBI/PMC XML; no defusedxml dependency. | ^^^^^^^^^^^^ 622 | article = root if strip_ns(root.tag) == "article" else first(root, "article") 623 | if article is None: | help: Remove unused `noqa` directive | 620 | return unavailable("pmc:empty-response") - root = ET.fromstring(xml_text) # noqa: S314 - NCBI/PMC XML; no defusedxml dependency. 621 + root = ET.fromstring(xml_text) 622 | article = root if strip_ns(root.tag) == "article" else first(root, "article") | RUF100 [*] Unused `noqa` directive (non-enabled: `S602`) --> biorefs_cli/config.py:101:38 | 99 | def run_secret_command(command: str, *, timeout_seconds: int) -> str: 100 | try: 101 | completed = subprocess.run( # noqa: S602 - config intentionally stores shell commands. | ^^^^^^^^^^^^ 102 | command, 103 | shell=True, | help: Remove unused `noqa` directive | 100 | try: - completed = subprocess.run( # noqa: S602 - config intentionally stores shell commands. 101 + completed = subprocess.run( 102 | command, | I001 [*] Import block is un-sorted or un-formatted --> tests/test_assay.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | from typing import TYPE_CHECKING, cast 4 | | 5 | | import pytest 6 | | from biorefs_cli.commands.assay import ( 7 | | PubChemAssayClient, 8 | | handle_http_error, 9 | | parse_assay_description, 10 | | parse_concise_activity, 11 | | parse_include, 12 | | ) 13 | | from biorefs_cli.errors import RateLimitError 14 | | from biorefs_cli.http import HttpClient, JsonObject, JsonValue 15 | | from biorefs_cli.main import main | |_________________________________^ 16 | 17 | if TYPE_CHECKING: | help: Organize imports | 5 | import pytest 6 + 7 | from biorefs_cli.commands.assay import ( | I001 [*] Import block is un-sorted or un-formatted --> tests/test_compound.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | from typing import TYPE_CHECKING 4 | | 5 | | import pytest 6 | | from biorefs_cli.commands import compound 7 | | from biorefs_cli.errors import CLIError 8 | | from biorefs_cli.main import build_parser | |_________________________________________^ 9 | 10 | if TYPE_CHECKING: | help: Organize imports | 5 | import pytest 6 + 7 | from biorefs_cli.commands import compound | I001 [*] Import block is un-sorted or un-formatted --> tests/test_core_helpers.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | import json 4 | | import stat 5 | | from typing import TYPE_CHECKING 6 | | 7 | | import pytest 8 | | from biorefs_cli.config import ( 9 | | Config, 10 | | check_configured_secrets, 11 | | config_to_public_dict, 12 | | load_config, 13 | | merge_config, 14 | | run_secret_command, 15 | | write_config, 16 | | ) 17 | | from biorefs_cli.errors import ( 18 | | ConfigError, 19 | | CredentialCheckError, 20 | | HTTPError, 21 | | RateLimitError, 22 | | ) 23 | | from biorefs_cli.http import HttpClient, HttpResponse, RetryPolicy 24 | | from biorefs_cli.output import escape_cell, markdown_heading, markdown_table, print_json 25 | | from biorefs_cli.rate_limit import RateLimitPolicy | |__________________________________________________^ 26 | 27 | if TYPE_CHECKING: | help: Organize imports | 7 | import pytest 8 + 9 | from biorefs_cli.config import ( | I001 [*] Import block is un-sorted or un-formatted --> tests/test_gene.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | import json 4 | | from typing import cast 5 | | from urllib.parse import parse_qs, urlparse 6 | | 7 | | import pytest 8 | | from biorefs_cli.commands import gene 9 | | from biorefs_cli.config import Config 10 | | from biorefs_cli.errors import CLIError, RateLimitError 11 | | from biorefs_cli.http import HttpClient, HttpResponse, JsonObject, RetryPolicy 12 | | from biorefs_cli.main import build_parser, main 13 | | from biorefs_cli.ncbi_client import NCBIClient 14 | | from biorefs_cli.rate_limit import RateLimiter | |______________________________________________^ 15 | 16 | GENE_SUMMARY: JsonObject = { | help: Organize imports | 7 | import pytest 8 + 9 | from biorefs_cli.commands import gene | I001 [*] Import block is un-sorted or un-formatted --> tests/test_http_post.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | import json 4 | | 5 | | import pytest 6 | | from biorefs_cli.errors import HTTPError 7 | | from biorefs_cli.http import HttpClient, HttpResponse, RetryPolicy | |__________________________________________________________________^ help: Organize imports | 5 | import pytest 6 + 7 | from biorefs_cli.errors import HTTPError | I001 [*] Import block is un-sorted or un-formatted --> tests/test_ncbi_command.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | import json 4 | | import shlex 5 | | import sys 6 | | import urllib.parse 7 | | from typing import TYPE_CHECKING 8 | | 9 | | import pytest 10 | | from biorefs_cli.commands import ncbi 11 | | from biorefs_cli.config import Config 12 | | from biorefs_cli.http import HttpClient, HttpResponse, RetryPolicy 13 | | from biorefs_cli.main import build_parser, main 14 | | from biorefs_cli.ncbi_client import NCBIClient 15 | | from biorefs_cli.rate_limit import RateLimiter, RateLimitPolicy | |_______________________________________________________________^ 16 | 17 | if TYPE_CHECKING: | help: Organize imports | 9 | import pytest 10 + 11 | from biorefs_cli.commands import ncbi | I001 [*] Import block is un-sorted or un-formatted --> tests/test_ncbi_extra.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | import argparse 4 | | from typing import TYPE_CHECKING, cast 5 | | 6 | | import pytest 7 | | from biorefs_cli.commands import ncbi 8 | | from biorefs_cli.errors import CLIError | |_______________________________________^ 9 | 10 | if TYPE_CHECKING: | help: Organize imports | 6 | import pytest 7 + 8 | from biorefs_cli.commands import ncbi | I001 [*] Import block is un-sorted or un-formatted --> tests/test_nucleotide.py:3:1 | 1 | """Nucleotide command tests.""" 2 | 3 | / from __future__ import annotations 4 | | 5 | | import json 6 | | from typing import cast 7 | | from urllib.parse import parse_qs, urlparse 8 | | 9 | | import pytest 10 | | from biorefs_cli.commands import nucleotide 11 | | from biorefs_cli.config import Config 12 | | from biorefs_cli.errors import CLIError, RateLimitError 13 | | from biorefs_cli.http import HttpClient, HttpResponse, JsonObject 14 | | from biorefs_cli.main import build_parser, main 15 | | from biorefs_cli.ncbi_client import NCBIClient | |______________________________________________^ help: Organize imports | 9 | import pytest 10 + 11 | from biorefs_cli.commands import nucleotide | I001 [*] Import block is un-sorted or un-formatted --> tests/test_openalex.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | import argparse 4 | | from typing import TYPE_CHECKING, cast 5 | | 6 | | import pytest 7 | | from biorefs_cli.commands import openalex 8 | | from biorefs_cli.config import Config 9 | | from biorefs_cli.http import HttpClient | |_______________________________________^ 10 | 11 | if TYPE_CHECKING: | help: Organize imports | 6 | import pytest 7 + 8 | from biorefs_cli.commands import openalex | I001 [*] Import block is un-sorted or un-formatted --> tests/test_paper.py:9:1 | 7 | from collections.abc import Sequence 8 | 9 | / import pytest 10 | | from biorefs_cli.commands.paper import ( 11 | | PaperClient, 12 | | PaperInputError, 13 | | cmd_convert, 14 | | one_identifier, 15 | | parse_jats_xml, 16 | | parse_pubmed_xml, 17 | | ) 18 | | from biorefs_cli.errors import RateLimitError 19 | | from biorefs_cli.main import main | |_________________________________^ 20 | 21 | PUBMED_XML = """ | help: Organize imports | 9 | import pytest 10 + 11 | from biorefs_cli.commands.paper import ( | I001 [*] Import block is un-sorted or un-formatted --> tests/test_paper_extra.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | import argparse 4 | | from typing import Any, cast 5 | | 6 | | import pytest 7 | | from biorefs_cli.commands.paper import ( 8 | | PaperClient, 9 | | PaperInputError, 10 | | bibtex, 11 | | cmd_cite, 12 | | cmd_fulltext, 13 | | cmd_related, 14 | | crossref_year, 15 | | europepmc_unavailable, 16 | | fetch_record, 17 | | format_citation, 18 | | normalize_crossref_work, 19 | | normalize_doi, 20 | | normalize_idconv, 21 | | normalize_identifier, 22 | | normalize_pmcid, 23 | | normalize_pmid, 24 | | parse_include, 25 | | parse_jats_xml, 26 | | parse_sections, 27 | | print_convert, 28 | | print_fetch, 29 | | print_fulltext, 30 | | print_related, 31 | | print_search, 32 | | ris, 33 | | source_urls, 34 | | strict_validate, 35 | | unavailable, 36 | | ) 37 | | from biorefs_cli.errors import HTTPError | |________________________________________^ 38 | 39 | MINIMAL_PUBMED_XML = """ | help: Organize imports | 6 | import pytest 7 + 8 | from biorefs_cli.commands.paper import ( | I001 [*] Import block is un-sorted or un-formatted --> tests/test_protein.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | import json 4 | | from typing import cast 5 | | from urllib.parse import parse_qs, urlencode, urlparse 6 | | 7 | | import pytest 8 | | from biorefs_cli.commands.protein import ( 9 | | ProteinService, 10 | | build_search_term, 11 | | normalize_accession, 12 | | parse_protein_summaries, 13 | | ) 14 | | from biorefs_cli.errors import CLIError, RateLimitError 15 | | from biorefs_cli.http import HttpResponse, JsonObject 16 | | from biorefs_cli.main import main | |_________________________________^ help: Organize imports | 7 | import pytest 8 + 9 | from biorefs_cli.commands.protein import ( | I001 [*] Import block is un-sorted or un-formatted --> tests/test_render_helpers.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | import argparse 4 | | from typing import TYPE_CHECKING, cast 5 | | 6 | | import pytest 7 | | from biorefs_cli.commands import assay, compound, gene, nucleotide, openalex, protein 8 | | from biorefs_cli.errors import CLIError, HTTPError, RateLimitError | |__________________________________________________________________^ 9 | 10 | if TYPE_CHECKING: | help: Organize imports | 6 | import pytest 7 + 8 | from biorefs_cli.commands import assay, compound, gene, nucleotide, openalex, protein | I001 [*] Import block is un-sorted or un-formatted --> tests/test_scaffold.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | import pytest 4 | | from biorefs_cli.main import build_parser, main | |_______________________________________________^ 5 | 6 | TOP_LEVEL_COMMANDS = ( | help: Organize imports | 3 | import pytest 4 + 5 | from biorefs_cli.main import build_parser, main | I001 [*] Import block is un-sorted or un-formatted --> tests/test_structure_fetch.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | import json 4 | | from pathlib import Path 5 | | 6 | | import pytest 7 | | from biorefs_cli.commands.structure import ( 8 | | AlphaFoldFile, 9 | | FetchClient, 10 | | FetchResult, 11 | | FetchService, 12 | | first_prediction, 13 | | write_structure, 14 | | ) 15 | | from biorefs_cli.config import Config 16 | | from biorefs_cli.errors import CLIError, HTTPError 17 | | from biorefs_cli.http import HttpClient, HttpResponse 18 | | from biorefs_cli.main import main | |_________________________________^ help: Organize imports | 6 | import pytest 7 + 8 | from biorefs_cli.commands.structure import ( | I001 [*] Import block is un-sorted or un-formatted --> tests/test_structure_info.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | from typing import TYPE_CHECKING, cast 4 | | 5 | | import pytest 6 | | from biorefs_cli.commands.structure import ( 7 | | InfoService, 8 | | build_info_result, 9 | | parse_entry, 10 | | ) 11 | | from biorefs_cli.main import main | |_________________________________^ 12 | 13 | if TYPE_CHECKING: | help: Organize imports | 5 | import pytest 6 + 7 | from biorefs_cli.commands.structure import ( | I001 [*] Import block is un-sorted or un-formatted --> tests/test_structure_render.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | import pytest 4 | | from biorefs_cli.commands.structure import ( 5 | | parse_include, 6 | | print_info_table, 7 | | print_search_table, 8 | | validate_organism, 9 | | ) 10 | | from biorefs_cli.errors import CLIError | |_______________________________________^ help: Organize imports | 3 | import pytest 4 + 5 | from biorefs_cli.commands.structure import ( | I001 [*] Import block is un-sorted or un-formatted --> tests/test_structure_search.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | import argparse 4 | | from typing import TYPE_CHECKING, cast 5 | | 6 | | import pytest 7 | | from biorefs_cli.commands.structure import ( 8 | | SearchQuery, 9 | | SearchService, 10 | | build_query_from_args, 11 | | build_search_payload, 12 | | clean_sequence, 13 | | normalize_pdb_id, 14 | | normalize_uniprot_accession, 15 | | parse_hits, 16 | | ) 17 | | from biorefs_cli.errors import CLIError, HTTPError 18 | | from biorefs_cli.main import main 19 | | from biorefs_cli.rcsb_graphql import EntryMeta | |______________________________________________^ 20 | 21 | if TYPE_CHECKING: | help: Organize imports | 6 | import pytest 7 + 8 | from biorefs_cli.commands.structure import ( | I001 [*] Import block is un-sorted or un-formatted --> tests/test_uniprot.py:1:1 | 1 | / from __future__ import annotations 2 | | 3 | | import json 4 | | from typing import TYPE_CHECKING, cast 5 | | 6 | | import pytest 7 | | from biorefs_cli.commands.uniprot import ( 8 | | UniProtService, 9 | | build_search_query, 10 | | normalize_accession, 11 | | parse_entry, 12 | | ) 13 | | from biorefs_cli.errors import CLIError, RateLimitError 14 | | from biorefs_cli.main import main | |_________________________________^ 15 | 16 | if TYPE_CHECKING: | help: Organize imports | 6 | import pytest 7 + 8 | from biorefs_cli.commands.uniprot import ( | Found 22 errors. [*] 22 fixable with the `--fix` option.