Skip to content

Catch import errors during run_tests.py doctest - #1909

Merged
peterjc merged 3 commits into
biopython:masterfrom
peterjc:doc_import_fix
Jan 25, 2019
Merged

peterjc merged 3 commits into
biopython:masterfrom
peterjc:doc_import_fix

Conversation

@peterjc

@peterjc peterjc commented Jan 25, 2019

Copy link
Copy Markdown
Member

This addresses recent AppVeyor failures apparently linked to the inclusion of Bio.Graphics.KGML_vis in the doctests run by run_tests.py since #1900, and the version of pillow installed under AppVeyor 64bit Windows Python 2.7, see: #1906 (comment)

I could also "fix" this by explicitly installing pillow==4.2 which might be worth doing as well? See e.g.
https://ci.appveyor.com/project/peterjc/biopython/builds/21865494

  • 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 added my name to the alphabetical contributors listings in the files
    NEWS.rst and CONTRIB.rst as part of this pull request, am listed
    already, or do not wish to be listed. (This acknowledgement is optional.)

See https://github.com/peterjc/flake8-black

(I'm using this on another project, so my development
machine does have my flake8-black plugin installed.)
Recently added Bio.Graphics.KGML_vis to doctests, and on
64bit Windows Python 2.7 under AppVeyor this is triggering
an ImportError.
This is caught when running the doctests via run_tests.py
@peterjc

peterjc commented Jan 25, 2019

Copy link
Copy Markdown
Member Author

@rwst does this look sensible to see, cross reference #1906

@peterjc

peterjc commented Jan 25, 2019 •

Copy link
Copy Markdown
Member Author

Update: Resolved on re-running TravisCI, this time got configparser==3.7.0 installed.

--

Recent Python 2.7 style check which passed,

style installed: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.,chardet==3.0.4,configparser==3.5.0,doc8==0.8.0,docutils==0.14,enum34==1.1.6,flake8==3.6.0,flake8-blind-except==0.1.1,flake8-docstrings==1.3.0,flake8-polyfill==1.0.2,flake8-rst-docstrings==0.0.8,mccabe==0.6.1,pbr==5.1.1,pycodestyle==2.4.0,pydocstyle==3.0.0,pyflakes==2.0.0,restructuredtext-lint==1.2.2,six==1.12.0,snowballstemmer==1.2.1,stevedore==1.30.0
style run-test-pre: PYTHONHASHSEED='2153723868'
style runtests: commands[0] | flake8 --max-line-length 82 setup.py
style runtests: commands[1] | flake8 BioSQL/
style runtests: commands[2] | flake8 Scripts/
...

This Python 2.7 style check failed (seemingly not picking up the BioSQL/.flake8 settings:

style installed: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.,chardet==3.0.4,configparser==3.5.2,doc8==0.8.0,docutils==0.14,enum34==1.1.6,flake8==3.6.0,flake8-blind-except==0.1.1,flake8-docstrings==1.3.0,flake8-polyfill==1.0.2,flake8-rst-docstrings==0.0.8,mccabe==0.6.1,pbr==5.1.1,pycodestyle==2.4.0,pydocstyle==3.0.0,pyflakes==2.0.0,restructuredtext-lint==1.2.2,six==1.12.0,snowballstemmer==1.2.1,stevedore==1.30.0
style run-test-pre: PYTHONHASHSEED='1759935216'
style runtests: commands[0] | flake8 --max-line-length 82 setup.py
style runtests: commands[1] | flake8 BioSQL/
BioSQL/DBUtils.py:144:80: E501 line too long (83 > 79 characters)
BioSQL/BioSeqDatabase.py:152:80: E501 line too long (85 > 79 characters)
...

Looks like configparser==3.5.0 to configparser==3.5.2 was to blame, and indeed:

jaraco/configparser#27

Going to re-run the TravisCI instance and it will hopefully pickup the just fixed configparser==3.5.3 release

@codecov

codecov Bot commented Jan 25, 2019

Copy link
Copy Markdown

Codecov Report

Merging #1909 into master will decrease coverage by <.01%.
The diff coverage is 72.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1909      +/-   ##
==========================================
- Coverage   84.98%   84.97%   -0.01%     
==========================================
  Files         310      310              
  Lines       49913    49921       +8     
==========================================
+ Hits        42417    42422       +5     
- Misses       7496     7499       +3
Impacted Files Coverage Δ
Bio/Graphics/KGML_vis.py 70.33% <72.72%> (-0.32%) ⬇️
Bio/Graphics/BasicChromosome.py 93.71% <0%> (-0.32%) ⬇️
Bio/File.py 87.27% <0%> (+0.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0593e2f...9f533dc. Read the comment docs.

@rwst

rwst commented Jan 25, 2019

Copy link
Copy Markdown
Contributor

@rwst does this look sensible to see, cross reference #1906

I see no problems.

@peterjc
peterjc merged commit 6d5afd8 into biopython:master Jan 25, 2019
@peterjc
peterjc deleted the doc_import_fix branch January 25, 2019 16:49
@peterjc

peterjc commented Jan 25, 2019

Copy link
Copy Markdown
Member Author

@rwst thanks - merged.

You should be able to remove the import check for Bio.Graphics.KGML_vis on #1906 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants