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

access package version in tools/gitcount #197

Merged
merged 1 commit into from Oct 3, 2021

Conversation

jGaboardi
Copy link
Member

xref pysal/spaghetti#654, pysal/libpysal#434

In order to take advantage of using tools/gitcount.ipynb with the newly adopted versioneerschema, the version import cell must be split into two cells and changed from:

# get __version__
f = "../{package}/__init__.py".format(package=package_name)
with open(f, "r") as initfile:
     exec(initfile.readline())

to:

# get __version__
%run ../spopt/_version.py
__version__ = get_versions()["version"]

@jGaboardi jGaboardi self-assigned this Sep 23, 2021
@codecov
Copy link

codecov bot commented Sep 23, 2021

Codecov Report

Merging #197 (a83bbd8) into main (06ae670) will increase coverage by 0.2%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #197     +/-   ##
=======================================
+ Coverage   65.1%   65.3%   +0.2%     
=======================================
  Files         23      23             
  Lines       2458    2458             
  Branches     494     494             
=======================================
+ Hits        1600    1605      +5     
+ Misses       786     777      -9     
- Partials      72      76      +4     
Impacted Files Coverage Δ
spopt/_version.py 33.8% <0.0%> (+1.5%) ⬆️

@jGaboardi jGaboardi requested a review from gegen07 October 1, 2021 19:24
Copy link
Member

@gegen07 gegen07 left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Member

@martinfleis martinfleis left a comment

Choose a reason for hiding this comment

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

The diff looks fine (I haven't run the notebook).

@jGaboardi jGaboardi merged commit 42356de into pysal:main Oct 3, 2021
@jGaboardi jGaboardi deleted the update_gitcount branch October 3, 2021 14:11
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.

None yet

3 participants