Page MenuHomeFreeBSD

[NEW PORT] devel/py-bumpversion: Version-bump your software with a single command
AbandonedPublic

Authored by loader on Aug 23 2018, 11:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 30, 9:00 AM
Unknown Object (File)
Wed, Nov 27, 4:34 AM
Unknown Object (File)
Tue, Nov 26, 4:24 AM
Unknown Object (File)
Mon, Nov 25, 11:16 AM
Unknown Object (File)
Sun, Nov 24, 9:54 AM
Unknown Object (File)
Sat, Nov 23, 12:19 PM
Unknown Object (File)
Fri, Nov 22, 1:55 PM
Unknown Object (File)
Nov 19 2024, 10:49 PM
Subscribers

Details

Reviewers
koobs
Summary

Proposed commit log message:

[NEW PORT]: devel/py-bumpversion: Version-bump your software with a single command

A small command line tool to simplify releasing software by updating
all version strings in your source code by the correct increment. 

WWW: https://github.com/peritus/bumpversion

Reviewed_by: koobs
Approved by: koobs (mentor)
Differential_Revision: D16863
Test Plan
  • portlint: OK (looks fine.)
  • testport: OK (poudriere: 1200078, [armv7, aarch64], 'BUILD_ALL_PYTHON_FLAVORS=1', [py27, py34, py35, py36, py37] tested)
  • unittest: OK (

Python2.7 on aarch64: 86 passed, 1 xfailed in 294.70 seconds
Python3.4 on aarch64: 87 passed in 324.28 seconds
Python3.5 on aarch64: 87 passed in 319.77 seconds
Python3.6 on aarch64: 87 passed in 321.63 seconds
Python3.7 on aarch64: 87 passed in 311.89 seconds
)

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 19823
Build 19360: arc lint + arc unit

Event Timeline

Add OPTIONS: GIT and MERCURIAL as RUN_DEPENDS

loader retitled this revision from devel/py-bumpversion: Version-bump your software with a single command to [NEW PORT] devel/py-bumpversion: Version-bump your software with a single command.Sep 26 2018, 4:28 AM
koobs requested changes to this revision.Sep 26 2018, 4:47 AM
koobs added inline comments.
devel/py-bumpversion/Makefile
23

# No tests in sdist ?

31–32

"When describing options, view it from the perspective of the user: “What functionality does it change?” and “Why would I want to enable this?” Do not just repeat the name. For example, describing the NLS option as “include NLS support” does not help the user ..."

via https://www.freebsd.org/doc/en/books/porters-handbook/book.html#makefile-options

Something like "Git|Mercurial repository support" is better, than describing the imperative (run-depends), ports framework specific consequences of the option.

While we're here, maybe add shared descriptions for these in bsd.options.desc.mk`. There are several ports that use these *_DESC's already. If the descriptions are more specific than the description above, it's better to leave them overriding the default. Eg: sysutils/password-store/Makefile:GIT_DESC= Enable git storage

It's a good opportunity for you to do a sweeping commit (one commit, single logical change, affecting multiple ports)

37–40

Why isn't USE_PYTHON=concurrent sufficient to not warrant these?

If concurrent does symlink bumpversion to bumpversion-UNIQUE_SUFFIX why are these still required?

Do the tests fail even with the symlinks, or something else?

In either case, add a comment above the block/operations so that it's clear why.

43

PYTHONPATH can go in a/the TEST_ENV variable no?

This revision now requires changes to proceed.Sep 26 2018, 4:47 AM
loader marked 4 inline comments as done.

add a comment for post-patch target, add PYTHONPATH to TEST_ENV

devel/py-bumpversion/Makefile
23

No tests in sdist from CHEESESHOP.

Missing responses to: https://reviews.freebsd.org/D16863?id=47167#369395 - In particular:

  • "While we're here, maybe add shared descriptions for these in bsd.options.desc.mk`" onward
  • "Why isn't USE_PYTHON=concurrent sufficient to not warrant these?"

remove GIT_DESC and MERCURIAL_DESC

Missing responses to: https://reviews.freebsd.org/D16863?id=47167#369395 - In particular:

  • "While we're here, maybe add shared descriptions for these in bsd.options.desc.mk`" onward

Sorry, my bad. I just opened D17459 for it.

  • "Why isn't USE_PYTHON=concurrent sufficient to not warrant these?"

The post-patch: target is to change tests.py to run subprocess of bin/bumpversion${UNIQUE_SUFFIX}
from the ${STAGEDIR} instead of ${PREFIX}/bin/bumpversion${UNIQUE_SUFFIX}, this allows running
tests without installing the ports.

  • "Why isn't USE_PYTHON=concurrent sufficient to not warrant these?"

The post-patch: target is to change tests.py to run subprocess of bin/bumpversion${UNIQUE_SUFFIX}
from the ${STAGEDIR} instead of ${PREFIX}/bin/bumpversion${UNIQUE_SUFFIX}, this allows running
tests without installing the ports.

Tests are always run after having installed the port.

In D16863#372727, @mat wrote:
  • "Why isn't USE_PYTHON=concurrent sufficient to not warrant these?"

The post-patch: target is to change tests.py to run subprocess of bin/bumpversion${UNIQUE_SUFFIX}
from the ${STAGEDIR} instead of ${PREFIX}/bin/bumpversion${UNIQUE_SUFFIX}, this allows running
tests without installing the ports.

Tests are always run after having installed the port.

https://svnweb.freebsd.org/ports/head/Mk/bsd.port.mk?revision=481023&view=markup#l5267

5267 	_TEST_DEP=              stage

running make test only requires the stage target, it will not reach the fake-pkg: target to install the port into ${PREFIX} ...

Change OPTION name MERCURIAL to HG

@loader This can land if its all up to date (now that the shared options description change has landed)

I'm going to close this review, the upstream is not actively maintained any more
https://github.com/peritus/bumpversion/commit/cc3c8cfd77380ef50eeac740efe627509a248101

and unit tests can't work with pytest 4

/usr/local/lib/python3.8/site-packages/pluggy/hooks.py:286: in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/local/lib/python3.8/site-packages/pluggy/manager.py:93: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
/usr/local/lib/python3.8/site-packages/pluggy/manager.py:84: in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
/usr/local/lib/python3.8/site-packages/_pytest/python.py:234: in pytest_pycollect_makeitem
    res = list(collector._genfunctions(name, obj))
/usr/local/lib/python3.8/site-packages/_pytest/python.py:410: in _genfunctions
    self.ihook.pytest_generate_tests(metafunc=metafunc)
/usr/local/lib/python3.8/site-packages/pluggy/hooks.py:286: in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/local/lib/python3.8/site-packages/pluggy/manager.py:93: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
/usr/local/lib/python3.8/site-packages/pluggy/manager.py:84: in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
/usr/local/lib/python3.8/site-packages/_pytest/python.py:137: in pytest_generate_tests
    metafunc.parametrize(*marker.args, **marker.kwargs)
/usr/local/lib/python3.8/site-packages/_pytest/python.py:999: in parametrize
    argnames, parameters = ParameterSet._for_parametrize(
/usr/local/lib/python3.8/site-packages/_pytest/mark/structures.py:131: in _for_parametrize
    if len(param.values) != len(argnames):
E   TypeError: object of type 'MarkDecorator' has no len()