ploomber / pkgmt

A toolkit for managing Python packages. 📦🐍
https://pkgmt.readthedocs.io/
MIT License
10 stars 10 forks source link

follow up `pkgmt version` #64

Closed edublancas closed 1 year ago

edublancas commented 1 year ago

once we finish #60

AttributeError: 'NoneType' object has no attribute 'group'
- [Inconsistent version] Version in  top section in CHANGELOG is '0.1.42dev', but version in __init__.py is '0.1.40dev', fix them so they match
edublancas commented 1 year ago

since we closed #60, let's work on this one

neelasha23 commented 1 year ago

Acceptance criteria:

  1. If version file is empty or __version__ string not present, raise click.ClickException : Please add version string in <version_file_path> , e.g., __version__ = '0.1dev'.
  2. Add version file path in error message when versions in version file and changelog do not match.
  3. Test cases for both projects with version file in pyproject.toml and otherwise.
  4. Changelog entry.
neelasha23 commented 1 year ago

@edublancas Is the AC looking ok?

edublancas commented 1 year ago

If version file is empty or version string not present, raise click.ClickException : Please add version string in , e.g., version = '0.1dev'.

here we can do something more generic, there's a function that parses the version value. if such function fails, we can raise an error and tell the user how the format should be

the rest looks good

neelasha23 commented 1 year ago

Yes I have added generic parsing for raising the error in the PR