-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add beforeCommitChangelog hook for updating datalad_crawler/version.py #98
Conversation
Codecov Report
@@ Coverage Diff @@
## master #98 +/- ##
=======================================
Coverage 81.33% 81.33%
=======================================
Files 57 57
Lines 4650 4650
=======================================
Hits 3782 3782
Misses 868 868 Continue to review full report at Codecov.
|
.autorc
Outdated
[ | ||
"exec", | ||
{ | ||
"beforeCommitChangelog": "awk 'NR==1 {print \"__version__ = \\\"\" $2 \"\\\"\"}' CHANGELOG.md > datalad_crawler/version.py && git add datalad_crawler/version.py" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't it be reasonably easy to add a call to python setup.py --name
to avoid hardcoding of the package name here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the goal is to make the code copy-and-pastable between projects, that won't work in general, as setup.py --name
returns the project name, rather than the name of the Python package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for current target use cases it seems we are fine
$> grep name.*datalad datalad-{container,crawler}/setup.py
datalad-container/setup.py: name="datalad_container",
datalad-crawler/setup.py: name="datalad_crawler",
and it would work at least where we need it ATM. We can handle discrepancy if/when we run into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Note that, when pypandoc is not installed, there is extra output from setup.py --name
that messes with the substitution. This is fixed by #99.
d'oh - I forgot to add release tag :-/ will need to do a PR |
Closes #95; replaces #96.