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

Bug: --using doesn't seem to work (always uses requirements.txt) #90

Open
2 tasks done
flodolo opened this issue Sep 27, 2024 · 3 comments
Open
2 tasks done

Bug: --using doesn't seem to work (always uses requirements.txt) #90

flodolo opened this issue Sep 27, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@flodolo
Copy link

flodolo commented Sep 27, 2024

Before You Begin

Before proceeding, please make sure to follow these steps:

  • I have checked for similar issues in the project's issue tracker.
  • I have searched closed issues to see if a similar problem was reported
    before.

Issue Details

I have a folder with multiple requirement files:

  • default.txt
  • dev.txt
  • lint.txt
  • test.txt

licensecheck --using 'requirements:dev.txt' fails with RuntimeError: Could not find specification of requirements (requirements.txt). It looks like licensecheck always searches for requirements.txt.

On a side note, the documentation in README seems inconsistent around the formatting of multiple requirement files: is it requirements:requirements.txt;requirements_optional.txt or requirements:requirements.txt;requirements:requirements_optional.txt (with requirements: repeated after the semicolon)? Both are used in the explanation.

System Information

Please provide the following additional information about your system or
environment:

  • Operating System (OS): macOS
  • OS Version: 14.6.1
@flodolo flodolo added the bug Something isn't working label Sep 27, 2024
@flodolo
Copy link
Author

flodolo commented Sep 27, 2024

Should this line be the other way around?

requirementsPaths = extras if len(extras) > 0 else ["requirements.txt"]

UPDATE: double-check the README, can't find the double requirements:, so I must have misread it.

@FredHappyface
Copy link
Member

Hi thanks for opening the issue. Going to take a look at this asap. There is absolutely a logic error there that I did not pick up during a recent refactor!

@FredHappyface
Copy link
Member

In upcoming versions, I plan to remove the --using argument to improve clarity (and replace it with --requirements-paths and --groups as appropriate). However, some additional testing is required before I release a new version to ensure a smooth transition and provide a clear migration path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants