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

docs: clarify locust invocation norms #501

Merged
merged 4 commits into from
Dec 13, 2016

Conversation

pwnage101
Copy link
Contributor

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.

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
Copy link
Member

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
@pwnage101
Copy link
Contributor Author

FYI, this new commit brings some typo fixes and other updates:

  • clarify workaround with code snippet
  • fix typos
  • use double backticks correctly
  • consistently refer to "locust files" using two words

@cgoldberg
Copy link
Member

👍

@pwnage101
Copy link
Contributor Author

@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
Copy link
Member

@justiniso justiniso Dec 1, 2016

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.
@pwnage101
Copy link
Contributor Author

@justiniso see updated text

Copy link
Member

@justiniso justiniso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@pwnage101
Copy link
Contributor Author

Thanks! This now has two member approvals, please merge.

@justiniso justiniso merged commit 3cddb18 into locustio:master Dec 13, 2016
@pwnage101
Copy link
Contributor Author

bahhh i just realized i hadn't squashed :( so sorry...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants