repo stringclasses 454
values | file_path stringlengths 5 201 | extension stringclasses 1
value | content stringlengths 8 509k | num_lines int64 3 16.9k | size_bytes int64 8 511k |
|---|---|---|---|---|---|
astropy | astropy/io/misc/tests/test_parquet.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from io import FileIO
import numpy as np
import pytest
from numpy.testing import assert_array_equal
from astropy import units as u
from astropy.coordinates import (
Angle,
CartesianRepresentation,
EarthLocation,
Latitude,
Longitude,
... | 1,051 | 30,990 |
astropy | astropy/io/misc/tests/test_pandas.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from io import StringIO
import numpy as np
import pytest
from astropy import units as u
from astropy.coordinates import SkyCoord
from astropy.io import ascii
from astropy.io.misc.pandas import connect
from astropy.table import QTable, Table
from astropy... | 123 | 3,643 |
astropy | astropy/io/misc/tests/test_yaml.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module tests some of the methods related to YAML serialization.
"""
from io import StringIO
import numpy as np
import pytest
from yaml import SafeDumper
import astropy.coordinates as coords
import astropy.units as u
from astropy.coordinates im... | 372 | 10,385 |
astropy | astropy/io/misc/tests/test_pickle_helpers.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pickle
import pytest
from astropy.io.misc import fnpickle, fnunpickle
from astropy.utils.exceptions import AstropyDeprecationWarning
def test_fnpickling_simple(tmp_path):
"""
Tests the `fnpickle` and `fnupickle` functions' basic operatio... | 108 | 2,876 |
astropy | astropy/io/misc/tests/test_parquet_votable.py | .py | import copy
import numpy as np
import pytest
import astropy.units as u
from astropy.io.misc.parquet import read_parquet_votable, write_parquet_votable
from astropy.table import Table
from astropy.utils.data import get_pkg_data_filename
from astropy.utils.exceptions import AstropyUserWarning
from astropy.utils.misc im... | 201 | 6,856 |
astropy | astropy/io/misc/pandas/connect.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# This file connects the readers/writers to the astropy.table.Table class
import functools
from pathlib import Path
import astropy.io.registry as io_registry
from astropy.table import Table
from astropy.utils.compat.optional_deps import (
HAS_BS4,
... | 95 | 3,190 |
astropy | astropy/io/votable/volint.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Script support for validating a VO file.
"""
import argparse
def main(args=None):
from . import table
parser = argparse.ArgumentParser(
description="Check a VOTable file for compliance to the VOTable specification"
)
# TODO:... | 22 | 573 |
astropy | astropy/io/votable/table.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This file contains a contains the high-level functions to read a
VOTable file.
"""
# STDLIB
import io
import os
import sys
import textwrap
import warnings
from astropy.utils import data
from astropy.utils.xml import iterparser
# LOCAL
from . import... | 430 | 13,564 |
astropy | astropy/io/votable/exceptions.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""VOTable exceptions and warnings.
.. _warnings:
Warnings
--------
.. note::
Most of the following warnings indicate violations of the VOTable
specification. They should be reported to the authors of the
tools that produced the VOTable file... | 1,613 | 51,308 |
astropy | astropy/io/votable/setup_package.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from os.path import join
import numpy as np
from setuptools import Extension
def get_extensions(build_type="release"):
VO_DIR = "astropy/io/votable/src"
return [
Extension(
"astropy.io.votable.tablewriter",
[jo... | 25 | 586 |
astropy | astropy/io/votable/util.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Various utilities and cookbook-like things.
"""
# STDLIB
import codecs
import contextlib
import gzip
import io
import os
import re
from packaging.version import Version
__all__ = [
"coerce_range_list_param",
"convert_to_writable_filelike",
... | 254 | 6,344 |
astropy | astropy/io/votable/__init__.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This package reads and writes data formats used by the Virtual
Observatory (VO) initiative, particularly the VOTable XML format.
"""
from astropy import config as _config
from .exceptions import (
IOWarning,
UnimplementedWarning,
VOTableC... | 53 | 1,254 |
astropy | astropy/io/votable/xmlutil.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Various XML-related utilities.
"""
# ASTROPY
from astropy.logger import log
from astropy.utils import data
from astropy.utils.xml import check as xml_check
from astropy.utils.xml import validate
# LOCAL
from .exceptions import W02, W03, W04, W05, vo_... | 126 | 3,528 |
astropy | astropy/io/votable/connect.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import numpy as np
from astropy.io import registry as io_registry
from astropy.table import Table
from astropy.table.column import BaseColumn
from astropy.units import Quantity
from astropy.utils.misc import NOT_OVERWRITING_MSG
from . import... | 283 | 10,558 |
astropy | astropy/io/votable/tree.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# TODO: Test FITS parsing
# STDLIB
import base64
import codecs
import gzip
import io
import json
import os
import re
import urllib.request
# THIRD-PARTY
import numpy as np
from numpy import ma
# LOCAL
from astropy import __version__ as astropy_version
f... | 4,729 | 153,523 |
astropy | astropy/io/votable/dataorigin.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Extract Data Origin in VOTable.
References
----------
DataOrigin is a vocabulary described in the IVOA note: https://www.ivoa.net/documents/DataOrigin/
Notes
-----
This API retrieve Metadata from INFO in VOTable.
The information can be found at diffe... | 638 | 18,828 |
astropy | astropy/io/votable/converters.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module handles the conversion of various VOTABLE datatypes
to/from TABLEDATA_ and BINARY_ formats.
"""
# STDLIB
import re
import struct
import sys
from math import prod
# THIRD-PARTY
import numpy as np
from numpy import ma
# ASTROPY
from astrop... | 1,552 | 45,735 |
astropy | astropy/io/votable/ucd.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This file contains routines to verify the correctness of UCD strings.
"""
# STDLIB
import re
# LOCAL
from astropy.utils import data
__all__ = ["check_ucd", "parse_ucd"]
class UCDWords:
"""
Manages a list of acceptable UCD words.
Works... | 197 | 5,757 |
astropy | astropy/io/votable/validator/main.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Validates a large collection of web-accessible VOTable files,
and generates a report as a directory tree of HTML files.
"""
# STDLIB
import os
# LOCAL
from astropy.utils.data import get_pkg_data_filename
from . import html, result
__all__ = ["make_... | 158 | 4,745 |
astropy | astropy/io/votable/validator/__init__.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from . import main
from .main import make_validation_report
__doc__ = main.__doc__
del main
| 7 | 157 |
astropy | astropy/io/votable/validator/html.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# STDLIB
import contextlib
import os
import re
from math import ceil
from astropy import online_docs_root
from astropy.io.votable import exceptions
from astropy.utils.xml.writer import XMLWriter, xml_escape
html_header = """<?xml version="1.0" encoding=... | 313 | 9,889 |
astropy | astropy/io/votable/validator/result.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Contains a class to handle a validation result for a single VOTable
file.
"""
# STDLIB
import hashlib
import http.client
import os
import pickle
import shutil
import subprocess
import urllib.error
import urllib.request
import warnings
from xml.parsers... | 382 | 11,779 |
astropy | astropy/io/votable/tests/test_converter.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import io
# THIRD-PARTY
import numpy as np
import pytest
from numpy.testing import assert_array_equal
# LOCAL
from astropy.io.votable import converters, exceptions, tree
from astropy.io.votable.table import parse_single_table
from astropy.utils.data imp... | 337 | 10,840 |
astropy | astropy/io/votable/tests/test_resource.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# LOCAL
import io
from astropy.io.votable import parse
from astropy.utils.data import get_pkg_data_filename
def test_resource_groups():
# Read the VOTABLE
votable = parse(get_pkg_data_filename("data/resource_groups.xml"))
resource = votable... | 50 | 1,274 |
astropy | astropy/io/votable/tests/test_exception.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
# LOCAL
from astropy.io.votable import converters, exceptions, tree
def test_reraise():
def fail():
raise RuntimeError("This failed")
with pytest.raises(RuntimeError, match="From here"):
try:
fail()
... | 59 | 1,725 |
astropy | astropy/io/votable/tests/test_tree.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import filecmp
import io
import numpy as np
import pytest
from astropy.io.votable import tree
from astropy.io.votable.exceptions import (
E26,
W07,
W08,
W15,
W21,
W27,
W37,
W41,
W47,
W54,
W57,
)
from astropy.io... | 711 | 22,634 |
astropy | astropy/io/votable/tests/test_vo.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This is a set of regression tests for vo.
"""
# STDLIB
import difflib
import gzip
import io
import pathlib
import re
import sys
from unittest import mock
# THIRD-PARTY
import numpy as np
import pytest
from numpy.testing import assert_array_equal
# L... | 1,235 | 40,575 |
astropy | astropy/io/votable/tests/test_dataorigin.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
import astropy.io.votable
import astropy.io.votable.dataorigin as dataorigin
from astropy.table import Column, Table
from astropy.utils.exceptions import AstropyDeprecationWarning
def __generate_votable_test():
table = Table(
... | 156 | 5,899 |
astropy | astropy/io/votable/tests/test_ucd.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
from astropy.io.votable import ucd
def test_none():
assert ucd.check_ucd(None)
examples = {
"phys.temperature": [("ivoa", "phys.temperature")],
"pos.eq.ra;meta.main": [("ivoa", "pos.eq.ra"), ("ivoa", "meta.main")],
"meta... | 117 | 3,577 |
astropy | astropy/io/votable/tests/test_schema_versions.py | .py | import re
import sys
import pytest
from astropy.io.votable.xmlutil import validate_schema
from astropy.utils.data import get_pkg_data_filename
# Each test file uses a feature that is new with its version.
V_1_2_TABLE = get_pkg_data_filename("data/empty_table.xml")
V_1_3_TABLE = get_pkg_data_filename("data/binary2_ma... | 79 | 2,480 |
astropy | astropy/io/votable/tests/test_util.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
A set of tests for the util.py module.
"""
import pytest
from astropy.io.votable import util
def test_range_list():
assert util.coerce_range_list_param((5,)) == ("5.0", 1)
def test_range_list2():
assert util.coerce_range_list_param((5e-7,... | 68 | 1,671 |
astropy | astropy/io/votable/tests/test_table.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Test the conversion to/from astropy.table.
"""
import io
import os
import pathlib
import struct
import warnings
import numpy as np
import pytest
from astropy import units as u
from astropy.io.votable import conf, from_table, is_votable, tree, valida... | 997 | 31,009 |
astropy | astropy/io/votable/tests/test_coosys.py | .py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import io
import pytest
from astropy.coordinates import FK4, FK5, ICRS, AltAz, Galactic, Supergalactic
from astropy.io.votable.exceptions import E16, W27, W57
from astropy.io.votable.table import parse
from astropy.io.votable.tree import CooSys
from astr... | 140 | 4,866 |
biopython | setup.py | .py | #!/usr/bin/env python
"""Freely available tools for computational molecular biology."""
from setuptools import setup
import sys
import warnings
_DEPRECATION_MESSAGE = (
"Invoking setup.py is deprecated and will be removed in a future release of Biopython.\n"
"Please use `pip install` or `python -m build` ins... | 20 | 681 |
biopython | Doc/conf.py | .py | #!/usr/bin/env python3
"""Biopython Sphinx documentation build configuration file.
After generating ``*.rst`` files from the source code, this
file controls running ``sphinx-build`` to turn these into
human readable documentation.
"""
import os
import shutil
import sys
import tempfile
from Bio import __version__
# ... | 396 | 13,144 |
biopython | Doc/examples/ACT_example.py | .py | # This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
"""Example of using GenomeDiagram cross-links to mimic ACT."""
import os
import sys
from reportlab.lib import colors
from reportlab.lib.units impor... | 133 | 4,467 |
biopython | Doc/examples/fasta_iterator.py | .py | # This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
"""Example using Bio.SeqIO to parse a FASTA file."""
from Bio import SeqIO
def extract_organisms(file_to_parse, fmt):
"""Extract species names... | 31 | 940 |
biopython | Doc/examples/clustal_run.py | .py | #!/usr/bin/env python
# Copyright 2000 Brad Chapman. All rights reserved.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Run clustalw and parse the output.
Example code to show how to create ... | 52 | 1,617 |
biopython | Doc/examples/swissprot.py | .py | # This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
"""Example of connecting with exPASy and parsing SwissProt records."""
# biopython
from Bio import ExPASy
from Bio import SwissProt
# 'O23729', 'O... | 27 | 743 |
biopython | Doc/examples/fasta_dictionary.py | .py | # Copyright 2000 Brad Chapman. All rights reserved.
# Revisions copyright 2007 Peter Cock. All rights reserved.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Example using Bio.SeqIO to load ... | 64 | 2,093 |
biopython | Doc/examples/Proux_et_al_2002_Figure_6.py | .py | # This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
"""GenomeDiagram script to mimic Proux et al 2002 Figure 6.
You can use the Entrez module to download the 3 required GenBank files
This is an exten... | 234 | 7,276 |
biopython | Doc/examples/www_blast.py | .py | #!/usr/bin/env python
# Copyright 2000 Brad Chapman. All rights reserved.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Example showing how to deal with internet BLAST from Biopython.
This c... | 53 | 1,754 |
biopython | Doc/examples/nmr/simplepredict.py | .py | #!/usr/bin/env python
# Copyright 2004 Robert Bussell, Jr. All rights reserved.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Generate NOE crosspeak peaklists from diagonal peaklist.
** What... | 150 | 5,356 |
biopython | Scripts/scop_pdb.py | .py | #!/usr/bin/env python
# Copyright 2001 by Gavin E. Crooks. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Extract SCOP domain ATOM and HETATOM records from PDB."""
import g... | 170 | 5,201 |
biopython | Scripts/query_pubmed.py | .py | #!/usr/bin/env python
# Copyright 2000 by Jeffrey Chang. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Query PubMed and print MEDLINE format results."""
import getopt
imp... | 90 | 2,452 |
biopython | Scripts/update_ncbi_codon_table.py | .py | # This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Helper script to update Codon tables from the NCBI.
These tables are based on parsing the NCBI file:
ftp://ftp.ncbi.nih.gov/entrez/misc/data/gc.prt
... | 128 | 4,691 |
biopython | Scripts/PDB/hsexpo.py | .py | #!/usr/bin/python
# Copyright (C) 2002, Thomas Hamelryck (thamelry@vub.ac.be)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Calculates solvent exposure for a PDB file using one of 5 different m... | 149 | 3,764 |
biopython | Scripts/PDB/generate_three_to_one_dict.py | .py | # File download/unzip written 2012 by Lenna X. Peterson (arklenna@gmail.com)
# Dictionary extraction written 2011 by Hongbo Zhu
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Download PDB Chemi... | 121 | 3,695 |
biopython | Scripts/Restriction/rebase_update.py | .py | #!/usr/bin/env python
#
# Restriction Analysis Libraries.
# Copyright (C) 2004. Frederic Sohm.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
"""Update the Rebase EMBOSS files and NCBI ... | 65 | 2,130 |
biopython | Scripts/Restriction/ranacompiler.py | .py | #!/usr/bin/env python
#
# Restriction Analysis Libraries.
# Copyright (C) 2004. Frederic Sohm.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
# This script is used to produce the dictiona... | 1,077 | 39,653 |
biopython | Scripts/SeqGui/SeqGui.py | .py | # Copyright 2000 by Katharine Lindner (Cayte).
# Copyright 2016 by Markus Piotrowski.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
# The original SeqGui was written by Kath... | 183 | 6,244 |
biopython | Scripts/Performance/biosql_performance_read.py | .py | #!/usr/bin/env python
# Copyright 2002 Brad Chapman. All rights reserved.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Test timing of getting records from a BioSQL database."""
import time
... | 59 | 1,536 |
biopython | Scripts/Performance/biosql_performance_load.py | .py | #!/usr/bin/env python
# Copyright 2002 Brad Chapman. All rights reserved.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Test timing of loading records into a BioSQL database."""
import time
... | 44 | 1,183 |
biopython | Scripts/xbbtools/xbb_widget.py | .py | #!/usr/bin/env python
# Copyright 2000 by Thomas Sicheritz-Ponten.
# Copyright 2016 by Markus Piotrowski.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
# Created: Wed Jun 21 ... | 531 | 18,592 |
biopython | Scripts/xbbtools/xbb_blast.py | .py | #!/usr/bin/env python
# Copyright 2000 by Thomas Sicheritz-Ponten.
# Copyright 2016 by Markus Piotrowski.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
# Created: Thu Jul 13 ... | 213 | 7,704 |
biopython | Scripts/xbbtools/xbb_search.py | .py | #!/usr/bin/env python
# Copyright 2000 by Thomas Sicheritz-Ponten.
# Copyright 2016 by Markus Piotrowski.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
# Created: Sun Dec 3 ... | 197 | 6,056 |
biopython | Scripts/xbbtools/xbb_utils.py | .py | #!/usr/bin/env python
# Copyright 2000 by Thomas Sicheritz-Ponten.
# Copyright 2016 by Markus Piotrowski.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
# Created: Thu Jul 13 ... | 53 | 1,849 |
biopython | Scripts/xbbtools/xbb_blastbg.py | .py | #!/usr/bin/env python
# Copyright 2000 by Thomas Sicheritz-Ponten.
# Copyright 2016 by Markus Piotrowski.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
# Created: Sat Dec 2 ... | 145 | 4,609 |
biopython | Scripts/xbbtools/nextorf.py | .py | #!/usr/bin/env python
# Created: Thu Feb 15 14:22:12 2001
# Last changed: Time-stamp: <01/02/18 11:16:42 thomas>
# Copyright 2000 by Thomas Sicheritz-Ponten. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included... | 286 | 9,709 |
biopython | Scripts/xbbtools/xbb_translations.py | .py | #!/usr/bin/env python
# Copyright 2000 by Thomas Sicheritz-Ponten.
# Copyright 2016 by Markus Piotrowski.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
# Created: Wed Jun 21 ... | 155 | 5,756 |
biopython | Scripts/xbbtools/xbb_help.py | .py | #!/usr/bin/env python
# Copyright 2000 by Thomas Sicheritz-Ponten.
# Copyright 2016 by Markus Piotrowski.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
# Created: Tue Sep 4 ... | 105 | 3,209 |
biopython | Scripts/xbbtools/xbbtools.py | .py | #!/usr/bin/env python
# Copyright 2000 by Thomas Sicheritz-Ponten.
# Copyright 2016 by Markus Piotrowski.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
# Created: Thu Jul 13 ... | 29 | 701 |
biopython | Scripts/GenBank/check_output_simple.py | .py | #!/usr/bin/env python
# Copyright 2000 Brad Chapman. All rights reserved.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Display the SeqFeatures produced by the parser.
This produces a ton of... | 57 | 1,669 |
biopython | Scripts/GenBank/check_output.py | .py | #!/usr/bin/env python
# Copyright 2000 Brad Chapman. All rights reserved.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Check for the ability to read and write identical GenBank records.
This... | 98 | 2,832 |
biopython | Tests/test_SearchIO_hmmer3_text_index.py | .py | # Copyright 2012 by Wibowo Arindrarto. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for SearchIO hmmer3-text indexing."""
import unittest
from search_tests_common ... | 340 | 18,801 |
biopython | Tests/test_BioSQL_MySQLdb_online.py | .py | # This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Run BioSQL tests using MySQL."""
import unittest
import requires_internet
# Really do want "import *" to get all the test clases:
from common_Bio... | 35 | 1,022 |
biopython | Tests/test_Phylo_igraph.py | .py | # Copyright (C) 2023 by Fabio Zanini (fabio.zanini@unsw.edu.au)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Unit tests for Bio.Phylo functions with external dependencies."""
import unittest
fr... | 57 | 2,020 |
biopython | Tests/search_tests_common.py | .py | # Copyright 2012 by Wibowo Arindrarto. All rights reserved.
# Revisions Copyright 2012-2015 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Common code for Sear... | 158 | 6,444 |
biopython | Tests/test_Align_clustal.py | .py | # Copyright 2006-2014 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for Bio.Align.clustal module."""
import unittest
from io import StringIO
from tempfi... | 1,083 | 62,649 |
biopython | Tests/test_SeqIO_Xdna.py | .py | # Copyright 2019 Damien Goutte-Gattat. All rights reserved.
#
# This file is part of the Biopython distribution and governed by your
# choice of the "Biopython License Agreement" or the "BSD 3-Clause License".
# Please see the LICENSE file that should have been included as part of this
# package.
"""Tests for the SeqI... | 235 | 8,321 |
biopython | Tests/test_pairwise_alignment_map.py | .py | # This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for mapping pairwise alignments."""
import os
import random
import unittest
try:
import numpy as np
except ImportError:
from Bio im... | 999 | 42,062 |
biopython | Tests/test_Align_mauve.py | .py | # Copyright 2006-2014 by Peter Cock. All rights reserved.
# Revisions copyright 2011 Brandon Invergo. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for Bio.Align.mauve... | 1,060 | 41,843 |
biopython | Tests/test_SeqRecord.py | .py | # Copyright 2009-2017 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""SeqFeature related tests for SeqRecord objects from Bio.SeqIO.
Initially this takes match... | 671 | 24,941 |
biopython | Tests/test_PDB_CEAligner.py | .py | # Copyright 2022 by Joao Rodrigues. All rights reserved.
#
# This file is part of the Biopython distribution and governed by your
# choice of the "Biopython License Agreement" or the "BSD 3-Clause License".
# Please see the LICENSE file that should have been included as part of this
# package.
"""Unit tests for the Bio... | 112 | 3,605 |
biopython | Tests/test_PDB_PDBMLParser.py | .py | """
Tests for the PDBML parser in the PDB package.
These tests rely on the principle that the structure returned by the PDBML parser should be the same as the structure
returned by the mmCIF parser for any PDB structure.
"""
import unittest
import warnings
from Bio.PDB import MMCIFParser
from Bio.PDB import PDBMLPar... | 46 | 1,628 |
biopython | Tests/test_Phylo.py | .py | # Copyright (C) 2009 by Eric Talevich (eric.talevich@gmail.com)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Unit tests for the Bio.Phylo module."""
import os
import tempfile
import unittest
fr... | 562 | 23,595 |
biopython | Tests/test_PDB_PSEA.py | .py | # Copyright 2022 by Valentin Vareskic (valentin.vareskic@gmail.com).
# All rights reserved. This code is part of the Biopython distribution
# and governed by its license. Please see the LICENSE file that should
# have been included as part of this package.
"""Tests for PDB PSEA."""
import io
import os
import sys
imp... | 153 | 3,907 |
biopython | Tests/test_codonalign.py | .py | # Copyright (C) 2013 by Zheng Ruan (zruan1991@gmail.com)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Unit tests for the Bio.codonalign modules."""
import tempfile
import unittest
import warnin... | 477 | 17,567 |
biopython | Tests/test_Phylo_NeXML.py | .py | # Copyright (C) 2013 by Ben Morris (ben@bendmorris.com)
# based on code by Eric Talevich (eric.talevich@gmail.com)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Unit tests for the NeXML and NeXML... | 110 | 3,250 |
biopython | Tests/test_Phd.py | .py | # Revisions copyright 2009 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for Phd module."""
import unittest
from Bio import SeqIO
from Bio.Sequencing ... | 482 | 20,470 |
biopython | Tests/test_CAPS.py | .py | # Copyright 2001 by Iddo Friedberg. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for CAPS module."""
import unittest
from Bio import CAPS
from Bio.Align import Ali... | 155 | 6,676 |
biopython | Tests/test_GraphicsDistribution.py | .py | # Copyright 2001 by Brad Chapman. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Test the creation of graphics of distribution information.
Provides tests for the Graphics.D... | 88 | 2,677 |
biopython | Tests/test_Align_a2m.py | .py | # Copyright 2006-2014 by Peter Cock. All rights reserved.
# Copyright 2022 by Michiel de Hoon. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for Bio.Align.a2m module.... | 907 | 54,855 |
biopython | Tests/test_PAML_yn00.py | .py | # Copyright (C) 2011, 2019 by Brandon Invergo (b.invergo@gmail.com)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for PAML yn00 module."""
import glob
import os
import os.path
import unitt... | 179 | 7,165 |
biopython | Tests/test_SCOP_Hie.py | .py | # Copyright 2001 by Gavin E. Crooks. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Unit test for Hie."""
import unittest
from Bio.SCOP import Hie
class HieTests(unittes... | 42 | 1,318 |
biopython | Tests/test_AlignIO_ClustalIO.py | .py | # Copyright 2006-2014 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for Bio.AlignIO.ClustalIO module."""
import unittest
from io import StringIO
from ... | 292 | 14,579 |
biopython | Tests/test_SCOP_Residues.py | .py | # Copyright 2001 by Gavin E. Crooks. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Unit test for Residues."""
import unittest
from Bio.SCOP.Residues import Residues
cla... | 72 | 2,354 |
biopython | Tests/test_KeyWList.py | .py | # Copyright 1999 by Jeffrey Chang. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for KeyWList."""
import os.path
import unittest
from Bio.SwissProt import KeyWList
... | 126 | 5,892 |
biopython | Tests/test_SeqIO_SnapGene.py | .py | # Copyright 2019 Damien Goutte-Gattat. All rights reserved.
#
# This file is part of the Biopython distribution and governed by your
# choice of the "Biopython License Agreement" or the "BSD 3-Clause License".
# Please see the LICENSE file that should have been included as part of this
# package.
"""Tests for the SeqI... | 373 | 14,194 |
biopython | Tests/test_SeqIO_UniprotIO.py | .py | # Copyright 2010 by Andrea Pierleoni
# Revisions copyright 2010-2015 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Test for the Uniprot parser on Uniprot XML ... | 671 | 28,288 |
biopython | Tests/test_KGML_graphics_online.py | .py | #
# Copyright 2014 by Leighton Pritchard. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for online functionality of the KGML modules."""
# Builtins
import os
import ... | 87 | 2,711 |
biopython | Tests/test_SeqIO_online.py | .py | # Copyright 2007-2010 by Peter Cock. All rights reserved.
# Revisions copyright 2007-2008 by Michiel de Hoon. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Testing online c... | 104 | 3,529 |
biopython | Tests/test_SeqIO_PdbIO.py | .py | # Copyright 2012 by Eric Talevich. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for SeqIO PdbIO module."""
import unittest
import warnings
try:
import numpy as ... | 204 | 7,625 |
biopython | Tests/seq_tests_common.py | .py | # This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Common code for SeqRecord object tests."""
import unittest
import warnings
from test_SeqIO import SeqIOTestBaseClass
from Bio.Seq import Undefine... | 298 | 13,152 |
biopython | Tests/test_GraphicsGeneral.py | .py | # Copyright 2001 by Brad Chapman. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Test for graphics things that don't really deserve there own test module."""
import os
impor... | 72 | 2,593 |
biopython | Tests/test_PDB_SASA.py | .py | # Copyright 2020 Joao Rodrigues. All rights reserved.
#
# This file is part of the Biopython distribution and governed by your
# choice of the "Biopython License Agreement" or the "BSD 3-Clause License".
# Please see the LICENSE file that should have been included as part of this
# package.
"""Unit tests for the Bio.P... | 160 | 5,587 |
biopython | Tests/test_PQR.py | .py | # Copyright 2019-2020 by Konstantinos Zisis and Artemi Bendandi. All rights reserved.
#
# Converted by Konstantinos Zisis and Artemi Bendandi from an older unit test
# copyright 2009 by Eric Talevich.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that sh... | 191 | 7,264 |
biopython | Tests/test_SeqIO_write.py | .py | # Copyright 2007-2010 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for SeqIO write module."""
import os
import unittest
import warnings
from io import... | 311 | 10,705 |
biopython | Tests/test_PDB_FragmentMapper.py | .py | # Copyright 2017 by Sourav Singh. All rights reserved.
# Revisions copyright 2017 by Peter Cock. All rights reserved.
#
# This file is part of the Biopython distribution and governed by your
# choice of the "Biopython License Agreement" or the "BSD 3-Clause License".
# Please see the LICENSE file that should have been... | 45 | 1,328 |
biopython | Tests/test_translate.py | .py | # This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests of the transcription and translation methods of Seq objects."""
import unittest
from Bio import Seq
class TestTranscriptionTranslation(un... | 93 | 3,286 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.