Note the childs to children changes in Bio/Phylo/Consensus.py
included fixing internal variable names only.
Not applying all the catergories ==> categories fixes
to the (deprecated) EMBOSS wrappers as some would be
functional changes.
Also no more LaTeX files (for spell checking)
This is a language feature in Python 3.7 onwards.
This is also the behaviour in CPython 3.6 and the PyPy
implementation of Python 3.6.
We are not currently aware of any other Python 3.6 implementation
(where dictionaries might not be sorted), so this is simpler now
that we require at least Python 3.6 for Biopython.
Update docstrings on ordered dicts (thanks Chris Rands,
spotted in review).
This is simpler to think about, and also means looping over the
index to iterate over a file (or files) will be done in the
disk-order, which will be faster.
(Previously iteration over the index would happen in the sorted
order of the index key hashes, essentially random, thus there
would be a lot of disk random access jumping back and forth
through the file to parse the records in arbitrary order.)
Internally the SeqIO/SearchIO index_db function will now use
explicit sorting via the file number and offset so that the
keys and iteration order reflect that on disk.
Internally the SeqIO/SearchIO index function will now use an
OrderedDict on Python 3.5 or older.
Python 3.6 has an ordered dict, but this was declared an
implementation detail only, rather than a language standard.
PyPy has always had an ordered dict.
Python 3.7 onwards has an ordered dict as part of the
language definition, see:
https://mail.python.org/pipermail/python-dev/2017-December/151283.html
We do not in general want to use OrderedDict which is designed
for different use cases (making lots of changes to the dictionary
content), see:
https://mail.python.org/pipermail/python-dev/2017-December/151266.html
Original author Jeff Chang (@jefftc), other named copyright
holders (me), and the other contributors since from the git
log have all agreed, see GitHub issue #898.
- Andrew Dalke (@adalke)
- Brad Chapman (@chapmanb)
- Carlos Peña (@carlosp420)
- Chris Mitchell (@chrismit aka @Chris7)
- Christian Brueffer (@cbrueffer)
- Connor McCoy (@cmccoy)
- Francesco Gastaldello (@gasta88)
- Matt Ruffalo (@mruffalo)
- Michiel de Hoon (@mdehoon)
- Travis Wrightsman (@twrightsman)
- Wayne Decatur (@fomightez)
- Wibowo Arindrarto (@bow)
The logic changes for this are quite small: instead of checking whether
we think `handleish` should be passed to `open`, just try that first. If
that succeeds, yield the new file handle; otherwise yield the object
as-is.
With this change in behavior, it is no longer BioPython's responsibility
to know whether a certain object can be passed to `open`. This allows a
user to use a `pathlib.Path` object (or `os.DirEntry` returned from
`os.scandir`) under Python >= 3.6. Behavior in previous versions of
Python is unchanged.
D413 Missing blank line after last section
D412 No blank lines allowed between a section header and its content
(Seems adopting numpydoc naming means the flake8 plugin now
is stricter about section formatting and/or the machine I
did the previous commits on had an out of date flake plugin?)
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.
Solves temporarily disabling RST markup as of commit
3cfb6334a17ce8b783c93f8e00baf214cdcb8668 by the simple
trick of putting the docstrings in raw string mode.