[Bug 2044393] Review Request: python-teamcity-messages - Python Unit Test Reporting to TeamCity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=2044393



--- Comment #9 from Hunor Csomortáni <hcsomort@xxxxxxxxxx> ---
Sources to use
==============

Mirek is right, you can use the release tarball from GitHub. I had the
impression that there is a strong requirement for Python packages to use the
PyPI sources, but re-reading the relevant section from the Packaging
Guidelines, it seems that the archive containing the tests (and license and
docs) should be preferred:

https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_source_files_from_pypi


Pinned version of virtualenv
============================

Going through the Git history it seems that the version of virtualenv was
pinned when the upgrade from v16 to v20 happened, and was done to work around
some braking API changes:

https://github.com/JetBrains/teamcity-messages/commit/79f9429a61b8d644d8939b8c3395bc154ae2e17a#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7

This was later bumped to the latest version in the v20 series, but there is no
explanation provided neither in the commit message, nor in the PR discussion
why continuing to pin the version was deemed to be necessary:

https://github.com/JetBrains/teamcity-messages/pull/247
https://github.com/JetBrains/teamcity-messages/commit/71795a80ca407d34ac1973c1faf4c600ff04f74b

So I assume it was a change done mechanically :) I think you should try opening
a PR with upstream, removing that pinning and see what their feedback is.
Meanwhile, you can carry that change as a patch downstream, and mention the
upstream PR in the comment for the patch.


Running only the unit tests
===========================

I find using 'python setup.py test' to run the tests a little bit archaic, but
it's referenced in more than just 'tox.ini', so modernizing this would be a
bigger work in upstream. However, it seems that there is mechanism which allows
passing some user arguments to 'tox', which could be used to limit the tests to
be executed only to the unit tests. Usage examples can be found in the commit
message which introduced this:

https://github.com/JetBrains/teamcity-messages/commit/ca073bbf289ef4170188025665a488339aab5273

Based on the documentation of the '%tox' macro
(https://src.fedoraproject.org/rpms/pyproject-rpm-macros/blob/rawhide/f/README.md)
the following should work:

    %tox -- -- -a tests/unit-tests

I recommend making a comment above this line, to tell that the doubel '--' *is
intentional* and include a link to the pyproject macros documentation page.

Note, that the '%tox' macro uses only the current Python environment to run
'tox', so there is no need to remove old envs from 'tox.ini' (that was a wrong
advise from my side).

I did not try the above. If it doesn't work, please let me know.

If it works: would it be possible to remove the 'with tests' conditional, and
let the tests run every build? Maybe this would require some manual
'BuildRequires'?


Other
=====

* Change '%pyproject_buildrequires -t' to '%pyproject_buildrequires -r', there
are no dependencies defined in 'tox'.

* Even if you don't use %pyproject_check_import anymore I would suggest to keep
%pyproject_wheel and %pyproject_install. They are good macros, nevertheless :)

* Note, that although for you Copr builds you need to bump the 'Release' tag,
for the purpose of this review, that should stay '1', as this is going to be
the first release in Fedora for version 1.30.


-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
https://bugzilla.redhat.com/show_bug.cgi?id=2044393
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux