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

pyproject.toml support for locust configuration #2298

Closed
johnnymetz opened this issue Feb 16, 2023 · 5 comments
Closed

pyproject.toml support for locust configuration #2298

johnnymetz opened this issue Feb 16, 2023 · 5 comments

Comments

@johnnymetz
Copy link

Is your feature request related to a problem? Please describe.

My project includes a lot of small configuration files. Many Python packages allow configurations to be included in pyproject.toml which helps reduce this config clutter and promotes consistency. See PEP 518. Some of these packages include:

Describe the solution you'd like

Support configuration in pyproject.toml. Would be great to look for the config there by default (the locust config files can still take precedence) so users don't have to pass --config=pyproject.toml - other projects support this.

Describe alternatives you've considered

None

Additional context

I'm happy to work on this is needed.

@cyberw
Copy link
Collaborator

cyberw commented Feb 16, 2023

What would be required on locust side to support this?

@cyberw cyberw added the stale Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it label Mar 19, 2023
@github-actions
Copy link

This issue was closed because it has been stalled for 10 days with no activity. This does not necessarily mean that the issue is bad, but it most likely means that nobody is willing to take the time to fix it. If you have found Locust useful, then consider contributing a fix yourself!

@alzex3
Copy link
Contributor

alzex3 commented Feb 20, 2024

@cyberw Hello! First, I want to thank you for maintaining Locust; it has been very helpful in my work. It would be really cool to add the ability for Locust to parse configurations from pyproject.toml instead of requiring a separate config file.

I have checked the code. Changes would require modifying argument_parser.py. The Locust arguments parser uses the configargparse lib, which already has a built-in TOML parser, so there shouldn't be a lot of code changes.

I would be really glad to contribute this feature if it's welcome. I'm waiting for your response, thanks!

@cyberw cyberw reopened this Feb 20, 2024
@cyberw
Copy link
Collaborator

cyberw commented Feb 20, 2024

A PR would be most welcome!

Copy link

github-actions bot commented Mar 2, 2024

This issue was closed because it has been stalled for 10 days with no activity. This does not necessarily mean that the issue is bad, but it most likely means that nobody is willing to take the time to fix it. If you have found Locust useful, then consider contributing a fix yourself!

@github-actions github-actions bot closed this as completed Mar 2, 2024
@cyberw cyberw removed the stale Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it label Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants