Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing vcs urls in requirements and zope-event fix #200

Merged
merged 7 commits into from Sep 22, 2023

Conversation

damianwasik98
Copy link
Contributor

@damianwasik98 damianwasik98 commented Sep 13, 2023

Description in commit msgs ☺️

@matthias-bach-by
Copy link
Collaborator

Thanks for your contribution. I'll try to get this reviewed over the next days.

Copy link
Collaborator

@matthias-bach-by matthias-bach-by left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution. This already looks very good. As indicated by the inline-comment, my main concern is why the pip-requirements-parser was pinned to a specific version. If this was only done to allow stable test execution, you should leave this open as we anyhow compile a requirements.txt for the tests.

To get the test passing, you'll have to recompile the requirements.txt file. As I anyhow needed to do this to check some other assumptions, I have already pushed a commit which does this to the branch vcs-urls-suggestion. Feel free to cherry pick this.

In addition, you seem to have unintentionally changed the identifier generation for the JUnit report feature. The new identifier generation is actually better than the old, but we'll need to adjust the tests so they expect the right thing. For this, too, you can pick a commit from the branch vcs-urls-suggestions.

@@ -64,6 +68,7 @@ def _find_wheel(self, name, version):
Find a wheel with the given name and version
"""
candidates = [WheelFile(filename) for filename in glob.iglob(path.join(self.wheelhouse, '*.whl'))]
name = self._standardize_package_name(name)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering whether this won't break cases like devpi-common that rely on the standard escaping to devpi_common. 🤔
A quick local test shows that this does not seem to be the case. 😀 Still, I find it sufficiently non-obvious that it would make sense to explicitly include one such package in the matrix for the test_build test. You can pick the corresponding commit from my vcs-urls-suggestions branch if this looks reasonable to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cherry-picked your commits. Thank you 😉

@@ -5,3 +5,4 @@ wheel-filename
wheel-inspect>=1.6.0
pip>=1.5.3
junit-xml
pip-requirements-parser==32.0.1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a particular reason to pin this dependency down to the patch version? Are we expecting incompatibilities? I'd assume requiring a minimum version should be sufficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is just a habbit from some bigger project. I am used to pin exact version of dependencies in order to have more control and some kind of prevention from unexpected bugs on production.

I have just changed it to minimum version 😀

dependabot bot and others added 6 commits September 18, 2023 23:59
Bumps [pyramid](https://github.com/Pylons/pyramid) from 2.0 to 2.0.2.
- [Changelog](https://github.com/Pylons/pyramid/blob/2.0.2/CHANGES.rst)
- [Commits](Pylons/pyramid@2.0...2.0.2)

---
updated-dependencies:
- dependency-name: pyramid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
From now it is possible to parse vcs urls in requirements file.

Fixes blue-yonder#99
There was a problem with zope-event package.
It is possible to `pip wheel zope-event` or `pip wheel zope.event`
but each command produces wheel file with `.` in its name, because
project_name in package metadata is `zope.event`.

Builder._find_wheel method produced BuildError because there was no
whl file containing `zope-event`.
…reak packages that don't normalise dashes to dots.
…st switch to pip-requirements-parser

For the purpose of a junit file we don't actually care about how these names are normalised. It is only important that every entry in the requirements file gets a corresponding entry.
@coveralls
Copy link

Coverage Status

coverage: 97.549% (-0.4%) from 97.927% when pulling ddc575a on damianwasik98:vcs-urls into 2598b02 on blue-yonder:master.

@matthias-bach-by matthias-bach-by merged commit 8284691 into blue-yonder:master Sep 22, 2023
7 of 8 checks passed
@damianwasik98
Copy link
Contributor Author

Hi @matthias-bach-by 😉 Are you planning to release a new version of package to pypi with this feature?

@matthias-bach-by
Copy link
Collaborator

The new version is published at https://pypi.org/project/devpi-builder/6.1.0/. Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants