pyjanitor-devs / pyjanitor

Clean APIs for data cleaning. Python implementation of R package Janitor
https://pyjanitor-devs.github.io/pyjanitor
MIT License
1.33k stars 167 forks source link

[INF] Add tags to versions #643

Closed hectormz closed 4 years ago

hectormz commented 4 years ago

Brief Description

Two of our versions are tagged in git (0.1.1 & 0.18.1). I'd like to retroactively (and moving forward when bumping versions) to add version tags. On my own personal repositories, I can add tags retroactively and push them. To do the same here I am not sure if there is an option on Github, or if I would still do so locally and push tags.

The goal here would be to make it easier to navigate versions, especially when looking at planned deprecations etc.

I am not necessarily proposing the creating of releases with source code on Github (as with 0.1.1 & 0.18.1), but I'm not opposed if that is easy, and there's real interest in that.

I've added the tags on my dev branch. I'm not sure how this works if you version a bumpversion on dev, and there is another commit merging dev into master.

@ericmjl @szuckerman @zbarry

ericmjl commented 4 years ago

@hectormz, this is a very good idea. I haven't been very diligent with tagging on git, but I think it's a good practice.

Would you, by any chance, be able to write down your process for doing the tagging? I've been meaning to write a "release checklist" that I can have everybody follow in case I can't be around to tag a new release in time. I'll probably then incorporate your process into the release checklist.

hectormz commented 4 years ago

@ericmjl that would be a good idea! Maybe in a Maintaining.rst or Maintenance.rst etc. In this case, I actually manually went through the commits in my git gui (Fork, which is great btw!). Afterwards I just pushed the tags:

git push --tags origin

I think the same could be done for the main dev branch, only pushing the tags. I don't believe you can simply make tags on Github, but you can make releases, which makes tags in the process, but it's just not exactly the same.

pyjanitor has a .bumpversion.cfg, so I'm assuming you use (or used bumpversion/bump2version)? We should add that to the requirements-dev.txt.

Based on the configs in the file:

[bumpversion]
current_version = 0.20.4
commit = True
tag = True

[bumpversion:file:setup.py]

[bumpversion:file:janitor/__init__.py]

running:

bumpversion major|minor|patch

should update all the version info in files, create a bump version commit, and add a version tag as well. Then it's a matter of making sure the tags get pushed to remote.

In the document for releasing, it would be nice to discuss what necessitates releasing a new version, and the type (time passed, bug/typo fixes, breaking changes etc).

zbarry commented 4 years ago

Great idea 👍

hectormz commented 4 years ago

I was able to push my tags to dev. Going forward I think we can use bumpversion/bump2version and when (if ever), we want to write in proper Github Releases.

ericmjl commented 4 years ago

@hectormz I learned something new today! I keep forgetting to push with tags (I just do git push, and my bash alias gps points to just plain vanilla git push as well.)

hectormz commented 4 years ago

🤙🤙 @ericmjl I think in the checklist after bumpversion we can add:

git push <remote> <branch> --follow-tags

which according to this SO answer is the "sane" way to push tags as it

It pushes both commits and only tags that are both:

    - annotated
    - reachable (an ancestor) from the pushed commits

I don't completely understand the differences between annotated and unannotated flags, but I tested our bumpversion tags, and they qualify.

hectormz commented 4 years ago

I suppose this is currently resolved for versions to date, and will be permanently resolved via #644 in a way

ericmjl commented 4 years ago

Alrighty, I'm going to close this issue for now.