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

v1.1.2 "micropipenv requirements" doesn't autodetect from poetry.lock #198

Closed
hanjos opened this issue Oct 7, 2021 · 3 comments · Fixed by #199
Closed

v1.1.2 "micropipenv requirements" doesn't autodetect from poetry.lock #198

hanjos opened this issue Oct 7, 2021 · 3 comments · Fixed by #199
Assignees
Labels
human_intervention_required kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@hanjos
Copy link

hanjos commented Oct 7, 2021

Describe the bug
micropipenv requirements (with no flags) doesn't autodetect the method; it fails outright if it's not Pipenv:

(venv) $ micropipenv requirements
File 'Pipfile.lock' not found in 'C:\\Users\\...\\app' or any parent directory

To Reproduce
Given a codebase using Poetry:

$ dir
07/10/2021  05:17 PM    <DIR>          .
07/10/2021  05:17 PM    <DIR>          ..
07/10/2021  04:22 PM               123 .gitignore
07/10/2021  04:22 PM            23,486 poetry.lock
07/10/2021  04:01 PM               783 pyproject.toml
07/10/2021  04:01 PM                13 README.md
07/10/2021  04:01 PM                 0 README.rst
07/10/2021  04:01 PM    <DIR>          tests
07/10/2021  04:01 PM    <DIR>          app

Run:

(venv) $  micropipenv requirements

with no flags inside an active virtual environment.

Expected behavior

Micropipenv detects that Poetry is use and produces a requirements list from poetry.lock, as stated in --help:

(venv) $ micropipenv requirements --help
usage: micropipenv requirements [-h] [--no-hashes] [--no-indexes] [--no-versions] [--only-direct] [--no-comments]
                                [--no-default] [--no-dev] [--method {pipenv,poetry}]

optional arguments:
  -h, --help            show this help message and exit
  --no-hashes           Do not include hashes in the generated output.
  --no-indexes          Do not include index configuration in the generated output.
  --no-versions         Do not include version information in the generated output, implies --no-hashes.
  --only-direct         Include only direct dependencies in the output, implies --no-hashes and --no-versions; this
                        requires 'toml' extras to be installed.
  --no-comments         Do not include comments differentiating sections.
  --no-default          Include only development dependencies, do not include default dependencies.
  --no-dev              Include only default dependencies, do not include develop dependencies.
  --method {pipenv,poetry}
                        Source of packages for the requirements file, perform detection if not provided.

Additional context
micropipenv 1.1.2, running on Windows 10

@hanjos
Copy link
Author

hanjos commented Oct 7, 2021

For additional info, micropipenv install seems to work fine.

A cursory look at the source code (from a non-Python programmer, so take it with some grains of salt...) suggests that requirements does no detection at all.

@goern
Copy link
Member

goern commented Oct 18, 2021

/kind bug
/priority backlog
/assign @fridex

@sesheta sesheta added kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence. labels Oct 18, 2021
@fridex
Copy link
Collaborator

fridex commented Oct 20, 2021

@hanjos thanks for the report. The issue should be fixed in the current main branch and will be part of the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
human_intervention_required kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants