Commit 676846b6 authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 1.75+dfsg

parent 6af7df89
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -40,8 +40,14 @@ build_script:
  - SET PATH=C:\Py;C:\Py\Scripts;C:\Py\Library\bin;%PATH%
  - conda config --set always_yes yes
  - conda update conda
  - conda install setuptools numpy mysql-connector-python psycopg2 matplotlib networkx reportlab scipy coverage
  - if "PY_MAJOR_VER"=="2" conda install unittest2
# Pinning pillow==5.4.1 as version 6 breaks on current latest reportlab
# https://bitbucket.org/rptlab/reportlab/issues/176/incompatibility-with-pillow-600
  - conda install setuptools numpy psycopg2 matplotlib networkx reportlab scipy coverage pillow==5.4.1

# Pinning mysql-connector-python==8.0.13 for Python 3 as 8.0.16 breaks our tests
# https://github.com/biopython/biopython/issues/2120
# We don't install mysql-connector-python for Python 2
  - if "%PY_MAJOR_VER%"=="3" conda install mysql-connector-python==8.0.13
  - python setup.py build

test_script:

.flake8

0 → 100644
+90 −0
Original line number Diff line number Diff line
# =================================================
# flake8:
#   pycodestyle: E### (error), W### (warning)
#   pyflake:     F### (error)
# pydocstyle: D1## - Missing Docstrings
#             D2## - Whitespace Issues
#             D4## - Docstring Content issues
# flake8-bugbear: B###
# flake8-quotes: Q###
# flake8-commas: C#### (in case installed locally)
# flake8-black : BLK### (in case installed locally)
# flake8-pie : PIE### (in case installed locally)
# =================================================
[flake8]
doctests = True
# Exclude some file types and folders that shouldn't be checked:
exclude = .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.github,build,
ignore =
    # =============================================================
    # Biopython's 'standard' ignores we can agree to always accept:
    # =============================================================
    D203, # 1 blank line required before class docstring
          # deliberately ignore in favour of passing D211: No blank lines
          # allowed before class docstring
    W503, # line-break before binary operator
          # deliberately ignore (in favour of some day enforcing W504?)
    # ===========================================
    # Ignores that we have to accept for a while:
    # ===========================================
    E123, # closing bracket does not match indentation of opening bracket's line
          # TODO? (main/Bio/Tests: 3/91/31 occurrences)
    E203, # whitespace before ':'
          # gives false positives after running black, see
          # https://github.com/PyCQA/pycodestyle/issues/373
    E501, # line too long
          # Maybe we find a sensible limit, e.g. 88 (black) and enforce it
    W504, # line break after binary operator (Bio/Tests/Scripts: 225/119/7) TODO?
    B007, # Loop control variable not used within the loop body.
          # If this is intended, start the name with an underscore
    # =========================================
    # Optional ignores for local installations:
    # =========================================
    BLK100, # Black would make changes, only on local installations (so far)
    PIE781, # Assigning to temp variable and then returning, not enforcing

# ========================
# Folder specific ignores:
# ========================
per-file-ignores =
    Bio/*:E122,E126,F401,F841,D105,B009,B010,B011,C812,C815
    Tests/*:F401,F841,D101,D102,D103,B009,B010,B011,C812

    # Due to a bug in flake8, we need the following lines for running the
    # pre-commit hook. If you made edits above, please change also here!
    /Bio/*:E122,E126,F401,F841,D105,B009,B010,B011,C812,C815
    /Tests/*:F401,F841,D101,D102,D103,B009,B010,B011,C812

# =============================
# per-file-ignores error codes:
# =============================
#Bio/*:E122 continuation line missing indentation or outdented TODO? (264 occurrences)
#      E126 continuation line over-indented for hanging indent TODO?  (54 occurrences)
#      F401 module imported but unused TODO? (107 occurrences)
#      F841 local variable is assigned to but never used TODO? (55 occurrences)
#      D105 missing docstring magic method (121 occurrences)
#      B009 do not call getattr with a constant attribute value,
#           it is not any safer than normal property access
#      B010 do not call setattr with a constant attribute value,
#           it is not any safer than normal property access
#      B011 do not call assert False since python -O removes these calls;
#           instead callers should raise AssertionError().
#      C812 missing trailing comma
#      C815 missing trailing comma in Python 3.5+
#Tests/*:F401 module imported but unused TODO? (88 occurrences)
#        F841 local variable is assigned to but never used TODO? (64 occurrences)
#        D101 missing docstring in public class (207 occurrences)
#        D102 missing docstring in public method (956 occurrences)
#        D103 missing docstring in public functions (52 occurrences)
#        B009 do not call getattr with a constant attribute value,
#             it is not any safer than normal property access
#        B010 do not call setattr with a constant attribute value,
#             it is not any safer than normal property access
#        B011 do not call assert False since python -O removes these calls;
#             instead callers should raise AssertionError()
#        C812 missing trailing comma

# =======================
# flake8-quotes settings:
# =======================
inline-quotes = double
+4 −0
Original line number Diff line number Diff line
@@ -21,3 +21,7 @@ Tests/SubsMat/acc_rep_mat.pik binary

# MMTF is a binary file format,
Tests/PDB/4CUP.mmtf binary

# UCSC Nib files are binary:
Tests/Nib/test_bigendian.nib binary
Tests/Nib/test_littleendian.nib binary
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
Bio/Alphabet @peterjc

Bio/Align/* @peterjc
Bio/Align/_aligners.c @mdehoon
Bio/AlignIO/* @peterjc
Tests/test_AlignIO* @peterjc

+3 −3
Original line number Diff line number Diff line
@@ -6,9 +6,9 @@ This pull request addresses issue #...
- [ ] I hereby agree to dual licence this and any previous contributions under both
the _Biopython License Agreement_ **AND** the _BSD 3-Clause License_.

- [ ] I have read the ``CONTRIBUTING.rst`` file and understand that AppVeyor and
TravisCI will be used to confirm the Biopython unit tests and ``flake8`` style
checks pass with these changes.
- [ ] I have read the ``CONTRIBUTING.rst`` file, have run ``flake8`` locally, and
understand that AppVeyor and TravisCI will be used to confirm the Biopython unit
tests and style checks pass with these changes.

- [ ] I have added my name to the alphabetical contributors listings in the files
``NEWS.rst`` and ``CONTRIB.rst`` as part of this pull request, am listed
Loading