Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch setuptools_scm to write version.py file #1512

Merged
merged 1 commit into from
Jan 25, 2021

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Jan 23, 2021

See #1509 for details. This should remove any overhead of using pkg_resources when importing satpy.

@ghost
Copy link

ghost commented Jan 23, 2021

DeepCode's analysis on #217318 found:

  • ℹ️ 1 minor issue. 👇

Top issues

Description Example fixes
Unused version imported from satpy.version as __version__ Occurrences: 🔧 Example fixes

👉 View analysis in DeepCode’s Dashboard | Configure the bot

@djhoese djhoese added enhancement code enhancements, features, improvements optimization and removed enhancement code enhancements, features, improvements labels Jan 23, 2021
@codecov
Copy link

codecov bot commented Jan 23, 2021

Codecov Report

Merging #1512 (2173180) into master (2df64af) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1512   +/-   ##
=======================================
  Coverage   91.62%   91.63%           
=======================================
  Files         246      246           
  Lines       36008    36004    -4     
=======================================
- Hits        32993    32991    -2     
+ Misses       3015     3013    -2     
Flag Coverage Δ
behaviourtests 4.38% <100.00%> (-0.01%) ⬇️
unittests 92.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
satpy/__init__.py 100.00% <100.00%> (+11.76%) ⬆️

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 2df64af...2173180. Read the comment docs.

@mraspaud
Copy link
Member

Ok so what happens to the version number when:

  • one installs from github
  • one has made changes to the code and commited locally?
  • one creates a sdist or bdist from a local branch with new commits?

@djhoese
Copy link
Member Author

djhoese commented Jan 25, 2021

This PR doesn't change anything about the existing behavior as far as local installations except for performance. The version number still doesn't update unless you re-install. This should fix the github zip/tarball installation now since that was previously not fully enabled (missing dependency). That means someone installing from a github release I think.

@mraspaud
Copy link
Member

ok

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for looking into this! sounds good with some import optimisation.

@djhoese djhoese merged commit f35c9d9 into pytroll:master Jan 25, 2021
@djhoese djhoese deleted the add-version-py branch January 25, 2021 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace pkg_resources usage with version.py file
2 participants