-
Notifications
You must be signed in to change notification settings - Fork 1.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
Refactor install.py.in #7331
Comments
Relates #6117. |
(Yes; see 6117 for a possible nit to look into as part of this.) |
#10103 might be able to address simplified testing. |
Unless someone else has work-in-progress on this, I will take a look. |
Relevant to: RobotLocomotion#7331 This patch extracts most of the python code from install.py.in to a new module install_lib.py, and adjusts bazel rules and targets to work with the new layout. No actual new tests are added at this step. The moved code in the new file is only adjusted so that python lint checks will pass. The new function `execute_installation()` is essentially the old `main()` function, with an extra callable argument. At this stage, all of the existing tests should pass and existing install rules should still work. The next step toward closing RobotLocomotion#7331 would be to increase test coverage of the install_lib.py code.
In #16252, I moved the What remains here is to refactor |
Relevant to: RobotLocomotion#7331 This patch doesn't directly improve testability, but it does make it easier to capture coverage statistics (for example by RobotLocomotion#16392), and gives some small examples of why globals hinder unit testing.
Relevant to: RobotLocomotion#7331 This patch doesn't directly improve testability, but it does make it easier to capture coverage statistics (for example by RobotLocomotion#16392), and gives some small examples of why globals hinder unit testing.
Relevant to: RobotLocomotion#7331 At best, the subdirs tracking was an optimization; at worst, a temptation to TOCTOU errors. Removing it is another baby step toward testability.
Relevant to: #7331 At best, the subdirs tracking was an optimization; at worst, a temptation to TOCTOU errors. Removing it is another baby step toward testability.
Relevant to: RobotLocomotion#7331 This patch doesn't directly improve testability, but it does make it easier to capture coverage statistics (for example by RobotLocomotion#16392), and gives some small examples of why globals hinder unit testing.
As much as I still don't enjoy the status quo of |
install.py.in
is not tested. It is getting complex and it is complicated for reviewers to verify that modifications do not break anything.Fixup methods should be refactored and have unit tests as well as pycodestyle checking. Those function need to turn into *.py code that is imported by the generated :install program(s).
See comments on PR #7301
The text was updated successfully, but these errors were encountered: