Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
[DRAFT] gh-113299: Split clinic.py into sub-files#113300
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
vstinner commented Dec 20, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
* Create Tools/clinic/clinic/ package * Add Tools/clinic/clinic/__init__.py: export names, most of them are used by tests. * Use vars(module) instead of globals() to get symbols. * Move header (author, license) to clinic/__init__.py. * Add run_clinic.py script in Tools/clinic/. Update "make clinic" and "make clinic-tests" in Makefile.pre.in to use run_clinic.py.
vstinner commented Dec 20, 2023
Current files sorted by their number of lines: There are 4 files with at least 500 lines:
Maybe small files (under 200 lines) should be merged into larger files?
|
vstinner commented Dec 20, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
This PR is a draft to discuss the idea of splitting I didn't try to fix mypy, I don't think that it's worth it at this point. If we split |
vstinner commented Dec 20, 2023
TODO:
|
corona10 commented Dec 20, 2023
As I discussed: before #113160 will be landed soon. You may also need to reflect the change once the PR is merged. |
corona10 commented Dec 20, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Can we remain the name of |
vstinner commented Dec 20, 2023
|
corona10 commented Dec 20, 2023
We can just use 1-depth policy like case_generator, why do we have to use 2-depths? |
vstinner commented Dec 20, 2023
As written, I will handle merge conflicts later. This PR is a draft to discuss the design of such split.
Git doesn't store renamed files. It only stores "add" and "remove" operations. Most Git commands (such as git blame and git log) use an heuristic to detect file renames. Example of my
I don't think that it works well to have a |
corona10 commented Dec 20, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
About git history: |
erlend-aasland commented Dec 20, 2023
Let's discuss the strategy on the issue and implementation details for a specific PR on that specific PR. |
vstinner commented Dec 20, 2023
I created a concrete draft PR to see how the code can look like once the big clinic.py is splitted into sub-files. I didn't intent to merge it as it is. I close the PR to make it more obvious :-) |
Tools/clinic/clinic/packageTools/clinic/clinic/__init__.py: export names, most of them are used by tests.clinic/__init__.py.Tools/clinic/. Update "make clinic" and "make clinic-tests" in Makefile.pre.in to userun_clinic.py.