Reverted unwanted changes (mostly arrays in tests, but also
some whitespace in doctests).
Remaining changes are standardising spacing between module
docstring and imports, and lower-case \x<hex> in strings.
See https://github.com/codespell-project/codespell
We have lots of false positives, so currently this
needs manual review and/or a list of biological
terms to ignore like "Ser" and "OTU".
Moved bytearray_to_str into MysqlConnectorAdaptor
Peter: Made the new method into a staticmethod with a
leading underscore (private) as part of rebasing this.
* enable flake8 testing of doctests in Bio, BioSQL; fix tests
* use literal blocks for examples which won't work
* fix passing mutable object as default arguments
The original author Andrew Dalke (@adalke), named copyright
holders and contributors according to the git log have all
agreed, see #898.
- Andrew Dalke (@adalke)
- Cymon Cox (@cymon)
- Aaron Kitzmiller (@aaronk)
- Brad Chapman (@chapmanb)
- Brian Osborne <briano@bioteam.net>
- Christian Brueffer (@cbrueffer)
- Connor T. Skennerton (@ctSkennerton)
- Evan Parker (@eparker05)
- Iddo Friedberg (@idoerg)
- Jeroen Van Goey (@BioGeek)
- Markus Piotrowski (@MarkusPiotrowski)
- Michiel de Hoon (@mdehoon)
- Nick Semenkovich (@semenko)
- Peter Cock (@peterhc)
- Suresh Panneerselvam <sureshcbt@gmail.com>
- Tiago Antao (@tiagoantao)
- Travis Wrightsman (@twrightsman)
- Wibowo Arindrarto (@bow)
- @morrme
$ flake8 BioSQL/ --select E123 --config /dev/null --ignore
BioSQL/BioSeqDatabase.py:555:5: E123 closing bracket does not match indentation of opening bracket's line
This was mostly due to the latest version of the pep8
tool being stricter and wanting the __docformat__ line
after the module level imports.
Rather than moving them all, I removed them - and we'll
switch to using reStructuredText as the default when
converting the docstrings into API HTML pages for the
website.
This commit also includes assorted other PEP8 fixes which
our recommend git pre-commit hook spotted, and I fixed by
hand.
Squashed commit from Pull Request #809.
Set the left and right values of the taxon table
Set the left value to the max in case there are multiple top levels
provide an executemany method to _CursorWrapper and Adaptor
(Peter: I also fixed minor white space complaints from PEP8 checking)
Fix for GitHub issue #741 by changing the sqlite3 database schema
to use foreign keys. A new test has been added in that explicitly
tests to make sure associated data with a bioentry is removed.
To accommodate the use of foreign keys the connection to an sqlite
database must set the PRAGMA, which is now done automatically when
opening the database.
The upstream BioSQL schema for sqlite3 has also been updated, see
https://github.com/biosql/biosql/pull/3
Quick of python history that unless you subclass object
then on Python 2 you get an 'old-style' class which as
some subtle differences from a 'new-style' class.
Numerous examples still present where the white space is used
to make a data-structure much easier to read (arrays etc).
Part of tackling GitHub issue #406
BioSQL will use a specific MySQL adapter class when
necessary but in other cases it will default to the
general Adapter class. This closes issue #370.
Additionally, Adapter now inherits from object and
some docstrings were added to existing classes and
methods.
Note VARCHAR BINARY problem under Python 3 (bytes vs unicode), thus
includes a Cursor wrapper for mysql.connector under python3 to
convert bytes to strings.