Skip to content

Remove redundant self test GenomeDiagram related. - #1930

Merged
peterjc merged 1 commit into
biopython:masterfrom
svalqui:issue_820_Graphics_GenomeDiagram
Feb 13, 2019
Merged

peterjc merged 1 commit into
biopython:masterfrom
svalqui:issue_820_Graphics_GenomeDiagram

Conversation

@svalqui

@svalqui svalqui commented Feb 12, 2019

Copy link
Copy Markdown
Contributor

This pull request addresses issue #820

  • 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.)

@svalqui
svalqui requested a review from peterjc as a code owner February 12, 2019 22:40
testdata1 = [(1, 10), (5, 15), (10, 20), (20, 40)]
testdata2 = [(250, .34), (251, .7), (252, .7), (253, .54), (254, .65)]

gdgs.add_graph(testdata1, 'TestData 1')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no use of . add_graph in Tests/test_GenomeDiagram.py so this is not covered.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no 'add_graph' in _GraphSet.py, I think is superseded with new_graph.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, so this old self-test had stopped working too. We can clarify this in the merge commit comment.

for set in sets:
print(set)

print(gdt.get_element_limits())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no use of . get_element_limits in Tests/test_GenomeDiagram.py so that should also be added to the unit tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no 'get_element_limits' in _Track. No sure what happened to that method but is not there.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, so the old self-test had stopped working then? This is a perfect example of one of the reasons why I want to move all the old self-tests into the main test framework which will run them regularly and automatically.

We can clarify this in the merge commit comment.

@peterjc

peterjc commented Feb 12, 2019

Copy link
Copy Markdown
Member

You might also find it useful to look at the coverage measurements as reported at https://codecov.io/gh/biopython/biopython/tree/master/Bio/Graphics/GenomeDiagram

@codecov

codecov Bot commented Feb 13, 2019

Copy link
Copy Markdown

Codecov Report

Merging #1930 into master will decrease coverage by 1.32%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1930      +/-   ##
==========================================
- Coverage   85.02%   83.69%   -1.33%     
==========================================
  Files         310      309       -1     
  Lines       49958    49908      -50     
==========================================
- Hits        42477    41772     -705     
- Misses       7481     8136     +655
Impacted Files Coverage Δ
Bio/Graphics/GenomeDiagram/_Track.py 81.91% <ø> (ø) ⬆️
Bio/Graphics/GenomeDiagram/_FeatureSet.py 67.64% <ø> (ø) ⬆️
Bio/Graphics/GenomeDiagram/_GraphSet.py 60% <ø> (ø) ⬆️
Bio/Phylo/CDAOIO.py 5.42% <0%> (-80.1%) ⬇️
Bio/Phylo/CDAO.py 42.85% <0%> (-57.15%) ⬇️
Bio/PDB/mmtf/__init__.py 33.33% <0%> (-55.56%) ⬇️
Bio/PopGen/GenePop/EasyController.py 22.68% <0%> (-54.64%) ⬇️
Bio/PopGen/GenePop/Controller.py 10.42% <0%> (-54.25%) ⬇️
Bio/Wise/__init__.py 50.87% <0%> (-29.83%) ⬇️
Bio/Phylo/Applications/_Phyml.py 71.42% <0%> (-28.58%) ⬇️
... and 22 more

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 ed27efd...3851631. Read the comment docs.

@peterjc

peterjc commented Feb 13, 2019

Copy link
Copy Markdown
Member

Thanks for answering my queries - I think we can merge this but I will make a note that parts of old self-tests didn't work anymore in the comment.

Just waiting for TravisCI to finish... it might be stuck?

@peterjc
peterjc merged commit b676bf5 into biopython:master Feb 13, 2019
@peterjc

peterjc commented Feb 13, 2019

Copy link
Copy Markdown
Member

Squash-and-merged, thank you.

peterjc added a commit that referenced this pull request Feb 13, 2019
This was used in the recently removed self-test, see #1930.

However, rather than triggering an unused import, we seem to
have triggered a flake8 false positive where range is defined as
a class method:

$ flake8 Bio/
Bio/Graphics/GenomeDiagram/_Track.py:226:5: F811 redefinition of unused 'range' from line 27
@svalqui
svalqui deleted the issue_820_Graphics_GenomeDiagram branch April 1, 2019 02:12
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