Add an --only flag to disable features by default
Review Request #10181 — Created Sept. 25, 2018 and submitted
Our previous workflow for running a specific set of
prepare-dev.py
was
to to pass an argument for each section we did not want to run. e.g., to
run only the dependency installation, you would run:./contrib/internal/prepare-dev.py --no-db --no-media.
That is, each action was enabled by default and you had to disable
everything you didn't want to run. As more features get added to
prepare-dev.py
, it becomes less user friendly to force the user to
specify the complement of the features that they don't want to run.Now we have an
--only
option which inverts our usual behaviour. In
other words, to run only the dependency installation as above, you
would run./contrib/internal/prepare-dev.py --only --deps
This allows the user to more easily specify and run a minimal part of
prepare-dev.py
's actions, as opposed to the old behaviour which
assumed you wanted to run a maximal part of its actions.
Ran
./contrib/internal/prepare-dev.py --only --deps
and only deps
were installed.
- Change Summary:
-
Correct the set of attrs.
- Commit:
-
165c8ce0249e44c678c23d94cfb0ebf22d8022070a57fd41134753de7d03e95d39770b61457e1660
- Diff:
-
Revision 2 (+27 -4)
Checks run (2 succeeded)
- Change Summary:
-
Address feedback.
- Description:
-
Our previous workflow for running a specific set of
prepare-dev.py
wasto to pass an argument for each section we did not want to run. e.g., to ~ run only the depenency installation, you would run: ~ run only the dependency installation, you would run: ./contrib/internal/prepare-dev.py --no-db --no-media.
That is, each action was enabled by default and you had to disable
everything you didn't want to run. As more features get added to prepare-dev.py
, it becomes less user friendly to force the user to~ specify the compliment of the features that they don't want to run. ~ specify the complement of the features that they don't want to run. Now we have an
--only
option which inverts our usual behaviour. In~ other words, to run only the dependency installtion as above, you would ~ run ~ other words, to run only the dependency installation as above, you ~ would run ./contrib/internal/prepare-dev.py --only --deps
This allows the user to more easily specify and run a minimal part of
prepare-dev.py
's actions, as opposed to the old behaviour whichassumed you wanted to run a maximal part of its actions.
- Change Summary:
-
Addressed feedback.
- Commit:
-
0a57fd41134753de7d03e95d39770b61457e1660d39551fb4ce69e2a7bdce69888e4038e9c1753f8
- Diff:
-
Revision 3 (+67 -12)