You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorporate pytest-gitlab plugin back into python-gitlab #3046
I (and probably others @JohnVillalovos 😅 ) spent quite a few weekends adding and improving this pytest setup so IMO it would be nice to see the benefits of this shared here and also make it more discoverable for our users rather than have it a separate package that users might not trust if they can't recognize or see the sources.
I can't find the source for the project (seems to not be openly available though it reuses LGPL, purely by looking at the sdist). But I'll try to reach out to the author and see if we can incorporate it here. Otherwise the fixtures will almost definitely diverge anyway.
All looks good and in good faith. I just think it would make sense to have at least parts of that upstreamed back here and exposed along with the package. I've seen some libraries do this as well, providing their pytest plugins as a kind of public API.
Will reach out but not really a priority just yet :)
Sentry for example has sentry.testutils inside the package itself with a similar idea, so if we want to keep it lightweight we could even just move the reusable fixtures from our conftest and tests/ subdirs to gitlab/testing and then they get published along the package if add an entrypoint:
I've seen this pattern elsewhere but can't find other examples right now. But it would be the easiest for us and maybe also for the users (just one package to install).
We used to pack all our unit tests inside gitlab/ before migrating to pytest, so I'm sure people won't complain about a few extra KB 😀
Hey @thht 👋 I think that's you behind the pytest-gitlab project right?
Would you be interested in upstreaming some of the pytest plugin back here as part of the package? There's no rush and it's not a priority, just wanted to let you know before the projects diverge too much 🙇
Hello there!
Yes, that's me. And yes, it would be great to get the code upstream. I'm a bit short on time right now. I can either start a branch and PR beginning of next year or help/contribute if somebody else started the effort.
And the project basically does what you describe in your comment plus it adds some convenience things.
Activity
JohnVillalovos commentedon Nov 25, 2024
I hope it doesn't have some malware in the package!
The source should be in the *.whl and *.tar.gz: https://pypi.org/project/pytest-gitlab/0.3.1/#files
nejch commentedon Nov 25, 2024
I found the sources now: https://gitlab.com/thht_science_software/pytest-gitlab
All looks good and in good faith. I just think it would make sense to have at least parts of that upstreamed back here and exposed along with the package. I've seen some libraries do this as well, providing their pytest plugins as a kind of public API.
Will reach out but not really a priority just yet :)
JohnVillalovos commentedon Nov 25, 2024
Yeah we could create a project under the namespace here. Maybe call it pytest-python-gitlab? or python-gitlab-pytest?
nejch commentedon Nov 25, 2024
Sentry for example has
sentry.testutilsinside the package itself with a similar idea, so if we want to keep it lightweight we could even just move the reusable fixtures from ourconftestandtests/subdirs togitlab/testingand then they get published along the package if add an entrypoint:https://docs.pytest.org/en/stable/how-to/writing_plugins.html#making-your-plugin-installable-by-others
I've seen this pattern elsewhere but can't find other examples right now. But it would be the easiest for us and maybe also for the users (just one package to install).
We used to pack all our unit tests inside
gitlab/before migrating to pytest, so I'm sure people won't complain about a few extra KB 😀nejch commentedon Nov 26, 2024
Hey @thht 👋 I think that's you behind the
pytest-gitlabproject right?Would you be interested in upstreaming some of the pytest plugin back here as part of the package? There's no rush and it's not a priority, just wanted to let you know before the projects diverge too much 🙇
thht commentedon Nov 26, 2024
Hello there!
Yes, that's me. And yes, it would be great to get the code upstream. I'm a bit short on time right now. I can either start a branch and PR beginning of next year or help/contribute if somebody else started the effort.
And the project basically does what you describe in your comment plus it adds some convenience things.
nejch commentedon Nov 26, 2024
That's perfect @thht, thanks. I'll also probably be on vacation around that time and will be back mid-January so we can follow up then.
ptalbert commentedon Dec 19, 2025
Hi. I tried to address this in #3313. Please let me know what you think.