Skip to content

Silence source import warning in dev mode - #3653

Merged
peterjc merged 1 commit into
biopython:masterfrom
peterjc:bug2318
Jul 19, 2021
Merged

peterjc merged 1 commit into
biopython:masterfrom
peterjc:bug2318

Conversation

@peterjc

@peterjc peterjc commented Jul 5, 2021

Copy link
Copy Markdown
Member

Closes #2318, cross reference #1991 and #2007

  • 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, have run pre-commit 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
    already, or do not wish to be listed. (This acknowledgement is optional.)

@peterjc

peterjc commented Jul 5, 2021

Copy link
Copy Markdown
Member Author

Based on the setuptools behaviour documented here, and the biopython.egg-link file I see locally in testing on macOS and Linux:

https://setuptools.readthedocs.io/en/latest/userguide/development_mode.html

Note this additional check only happens if the warning was about to be issued - there should be no additional import overhead on the typical use case of a standard installation (from source or wheel).

Code based on #2318 (comment) from @JoaoRodrigues

@codecov

codecov Bot commented Jul 5, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #3653 (35b8bed) into master (28f4fd2) will decrease coverage by 1.74%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3653      +/-   ##
==========================================
- Coverage   83.65%   81.90%   -1.75%     
==========================================
  Files         313      293      -20     
  Lines       51819    48717    -3102     
==========================================
- Hits        43349    39903    -3446     
- Misses       8470     8814     +344     
Impacted Files Coverage Δ
Bio/__init__.py 56.52% <0.00%> (-36.34%) ⬇️
Bio/Phylo/CDAOIO.py 4.46% <0.00%> (-80.36%) ⬇️
Bio/phenotype/pm_fitting.py 12.28% <0.00%> (-75.44%) ⬇️
Bio/PDB/mmtf/__init__.py 28.57% <0.00%> (-61.91%) ⬇️
Bio/Graphics/__init__.py 25.00% <0.00%> (-58.34%) ⬇️
Bio/Phylo/CDAO.py 42.85% <0.00%> (-57.15%) ⬇️
Bio/Phylo/_utils.py 25.00% <0.00%> (-52.41%) ⬇️
Bio/codonalign/codonseq.py 44.16% <0.00%> (-44.31%) ⬇️
Bio/Phylo/_cdao_owl.py 89.47% <0.00%> (-10.53%) ⬇️
Bio/KEGG/KGML/KGML_pathway.py 73.58% <0.00%> (-6.67%) ⬇️
... and 37 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 28f4fd2...35b8bed. Read the comment docs.

@peterjc
peterjc merged commit 43ebacc into biopython:master Jul 19, 2021
@peterjc
peterjc deleted the bug2318 branch July 19, 2021 10:15
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.

editable/develop install warning: You may be importing Biopython from inside the source tree.

1 participant