-
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
Split core.py into two files in separate python package #1361
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1361 +/- ##
==========================================
+ Coverage 80.70% 80.77% +0.06%
==========================================
Files 24 26 +2
Lines 2254 2257 +3
Branches 345 344 -1
==========================================
+ Hits 1819 1823 +4
Misses 343 343
+ Partials 92 91 -1
Continue to review full report at Codecov.
|
Lgtm! Im ok with splitting user/task into separate files, it doesnt matter that much. Git is actually quite good at recognizing a rename+changes unless the changes are too big. Ok to merge. |
Oh, I thought it only worked if the file renames/moves were made without any other changes to the file that was moved. That info might be outdated though, and maybe that has improved? |
I dont know how small the changes need to be - Ive experienced it working and not working. Dont know if it has been improved :) |
You can see it before committing though |
Ah! I guess doing a move/rename commit with no other changes should be super safe then :). Looking at the code for this PR, git does realise that |
…estructuring of core.py (#1361). Change so that we refer to classes/functions through the `locust.*` namespace, since this will allow us to do other code restructuring changes without having to update docstrings and docs.
Yea, I dont think git recognizes splitting a file in two. |
Forgot to update documentation and docstrings for this PR. Fixed in 265a3bf. |
I took a stab at the second part of #1328 and split
locust.core
into a separatelocust.user
package containing two moduels;locust.user.task
andlocust.user.users
, as described here: #1328 (comment).I also moved the
wait_time
,sequential_taskset
andinspectlocust
modules (which I renamed toinspectuser
) into thelocust.user
package.When moving/renaming files I took extra care to have separate commits that would only move/rename a file without any changes, so that we will get to keep as much git history as possible.
Here is the current structure of the
locust.user
package:Overall I think it makes a lot of sense to have a
user
package namespace, though I'm a bit split when it comes to having the two separateuser.task
anduser.users
modules, since their code is very related to each other. I guess an alternative would be to recreate this PR, but only movingcore.py
into the user package, instead of splitting it intotask.py
andusers.py
.