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

Add beforeCommitChangelog hook for updating datalad_crawler/version.py #98

Merged
merged 2 commits into from
Apr 19, 2021

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Apr 19, 2021

Closes #95; replaces #96.

@jwodder jwodder added the internal Changes only affect the internal API label Apr 19, 2021
@codecov
Copy link

codecov bot commented Apr 19, 2021

Codecov Report

Merging #98 (3806cb2) into master (713d2c2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f5db05...3806cb2. Read the comment docs.

.autorc Outdated
[
"exec",
{
"beforeCommitChangelog": "awk 'NR==1 {print \"__version__ = \\\"\" $2 \"\\\"\"}' CHANGELOG.md > datalad_crawler/version.py && git add datalad_crawler/version.py"
Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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.

@yarikoptic
Copy link
Member

Thank you @jwodder, I have merged #99, so let's give it a shot!

@yarikoptic yarikoptic merged commit 349fcc5 into master Apr 19, 2021
@yarikoptic
Copy link
Member

d'oh - I forgot to add release tag :-/ will need to do a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Changes only affect the internal API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need to "mint"/push datalad_crawler/version.py
2 participants