-
Notifications
You must be signed in to change notification settings - Fork 3k
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
docs: clarify locust invocation norms #501
docs: clarify locust invocation norms #501
Conversation
Push for the following norm: all module imports either reference installed modules, or modules beneath the "project root" (i.e. the CWD). To that end, remove any examples where the locustfile is not beneath the CWD. Also, provide some example project directory structures.
* fix formatting
The locustfiles may import common libraries using, e.g. ``import commonlib_auth.py``. This approach does not | ||
cleanly separate common libraries from locustfiles, however. | ||
|
||
Subdirectories can be a cleaner approach, but locust cannot currenly cope with importing modules which live |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/currenly/currently
* clarify workaround with code snippet * fix typos * use double backticks correctly * consistently refer to "locust files" using two words
FYI, this new commit brings some typo fixes and other updates:
|
👍 |
@justiniso can you take a look? |
The locustfiles may import common libraries using, e.g. ``import commonlib_auth``. This approach does not | ||
cleanly separate common libraries from locust files, however. | ||
|
||
Subdirectories can be a cleaner approach (see example below), but locust cannot currently cope with importing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but locust cannot currently cope with importing modules which live outside the locustfiles directory
I would make the problem statement more explicit:
but locust will only import modules relative to the directory in which the running locustfile is placed. If you wish to import from your the project root (i.e. the path of the location where you are running the locust command), make sure to .....
* clarify exactly why locust cannot cope with locustfiles in subdirectories which import libraries in a different subdirectories.
@justiniso see updated text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks! This now has two member approvals, please merge. |
bahhh i just realized i hadn't squashed :( so sorry... |
this is an attempt to addresses #500
Push for the following norm: all module imports either reference
installed modules, or modules beneath the "project root" (i.e. the CWD).
To that end, remove any examples where the locustfile is not beneath the
CWD.
Also, provide some example project directory structures.