requirements-parser icon indicating copy to clipboard operation
requirements-parser copied to clipboard

[FEATURE] Support parsing of VCS requirements of the form `SomeProject@git+https://git.repo/[email protected]`

Open madpah opened this issue 2 years ago • 1 comments

Currently this library fails to parse requirement lines of the form: SomeProject@git+https://git.repo/[email protected][extra]

This feature should parse the above example to a Requirements as follows:

{
   "line": "SomeProject@git+https://git.repo/[email protected][extra]",
   "editable": false,
   "local_file": false,
   "specifier": false,
   "vcs": "git+https",
   "revision": "1.3.1",
   "name": "SomeProject",
   "uri": "git+https://git.repo/some_pkg.git",
   "subdirectory": null,
   "path": null,
   "hash_name": null,
   "hash": null,
   "extras": ["extra"],
   "specs": []
}

Update: Removed version from specs as @1.3.1 might be a branch or tag name, so this should only map to the revision.

madpah avatar Apr 22 '22 09:04 madpah

Hello,

I think this should be:

SomeProject[extra]@git+https://git.repo/[email protected]

And the parser should work with spaces too:

SomeProject[extra] @ git+https://git.repo/[email protected]

See my example there: https://github.com/madpah/requirements-parser/issues/75#issuecomment-1131416862

FlorentJeannot avatar May 19 '22 09:05 FlorentJeannot