Conversation
…ion of commnads/tasks.
…ough method "meta()". Add command "doc".
…tions into sections.
Fix bench handling of CWD. Do not rely on global value of installed path.
|
The GUI looks awesome! Great work 👏 |
rgommers
left a comment
There was a problem hiding this comment.
Thanks @sayantikabanik and @schettino72 for all the hard work to put together this developer interface - I think it will be a major upgrade to the experience of working on SciPy!
@scipy/maintainers this isn't 100% final but we've been using and tweaking it for a little while, and it's ready for merging now imho. Smaller things can be added/fixed in follow-ups. I'll add here the current plan for this CLI, and what I think are the main things to look at (aside from just trying the workflows you care about and playing around) for review.
The plan:
- Merge this PR in its current state (modulo review comments), with experimental status - so no docs yet, and reserve the freedom to make some changes over the next weeks.
- There's still a part of this in
do.py(clearly marked) that @schettino72 wants to move into eitherdoitor a separate package. That will simplify maintenance of this file, and make it reusable by other projects. - Once we're happy with this CLI, remove
dev.pyand renamedo.pytodev.py(better name, anddois a bash builtin). - Update contributor docs for this (note that a lot of docs are in
--helpfor each command, so we need fewer html docs). - After 1.9.0, we can remove
numpy.distutilsbuild infra, and hence alsoruntests.py. At that point we have a single CLI again, this one.
To review:
- The plan above
- The added dependencies. They're not too heavy, but there are a few new ones. I think the screenshot in the PR description already shows that that's worth it.
- The complexity of the logic, for
build,testandbenchtasks in particular. I think it's an improvement over the massive if-elif-else block indev.py/runtests.py. But maybe there's room for further improvement.
There was a problem hiding this comment.
I agree with the plan, we should not spend time on nitpicks there. Provided the added commands are working, I am fine with getting it in to iterate faster. If we start using this in CI, we will see rapidly what is working and what not.
On rich itself, I am neutral. It does look nicer, but it's not essential and rich is still moving very fast. But now that pip started to use it, it might be a sign of confidence/stability/guarantee.
| - click | ||
| - pip: |
There was a problem hiding this comment.
We can already remove this I think since the release on conda is in progress.
There was a problem hiding this comment.
Updated, though for arm64 it failed with PackagesNotFoundError:. It's not yet available under conda-forge/osx-arm64 or conda-forge/noarch
There was a problem hiding this comment.
Opened an issue for that at conda-forge/doit-feedstock#16
There was a problem hiding this comment.
Looks like we won't get that arm64 package, so let's revert back to pip until there's a new doit release which is noarch.
|
|
||
| BUG: | ||
| - [ ] python dev.py -t scipy.optimize.tests.test_minimize_constrained.py::TestTrustRegionConstr::test_args | ||
| unknown marker "slow". seems conftest is not being loaded |
There was a problem hiding this comment.
I thought this was solved with latest pytest. They had a regression on 7.1 and 7.1.1 should fix it.
There was a problem hiding this comment.
It still fails for me on pytest 7.1.1
Note the command line above reproduces an error on existing dev.py, not on the code in this PR.
There was a problem hiding this comment.
Failed for me as well using pytest 7.1.1
pytest.PytestUnknownMarkWarning: Unknown pytest.mark.slow There was a problem hiding this comment.
@sayantikabanik feel free to look into this. I am busy with other stuff...
There was a problem hiding this comment.
I made an attempt to fix the above (using custom marks), though wasn't able to arrive at the expected outcome.
There was a problem hiding this comment.
🤦 The problem is the example is using python module notation (separated by dot), but also includes .py.
A pytest bug is responsible for the misleading error message...
WRONG:
python dev.py -t scipy.optimize.tests.test_minimize_constrained.py::TestTrustRegionConstr::test_args
CORRECT:
python dev.py -t scipy.optimize.tests.test_minimize_constrained::TestTrustRegionConstr::test_args
python dev.py -t scipy/optimize/tests/test_minimize_constrained.py::TestTrustRegionConstr::test_args
| # TODO: | ||
| First milestone replace dev.py | ||
|
|
||
| - [ ] doc: it would make sense to expose MAKE targets as sub-commands or options |
There was a problem hiding this comment.
Note that I plan to seriously cull what's in that Makefile. We really only need html, show, upload, dist. That's for another time though, for now what's in the CLI is enough.
|
Thanks @rgommers and @sayantikabanik for support and collaboration. I would just like to add to the plan (at least from my side and if you guys agree). But now since commands tasks are based on |
This would be interesting in principle, anything where we can improve the lag on the development cycle will be quite helpful. The question is which commands though. Right now, every tool has its own cache, at least these ones:
The Meson cache is reliable and fast, and Perhaps the bigger gain here would be for composite commands, like "run through the whole release workflow for tag |
|
Hi all, I plan to merge this by Friday unless there's blocking concerns. That will help get people to use it and find possible parts that aren't working smoothly just yet. We'll keep |
|
This looks great! I tried the |
|
@grlee77 I have just started to work on fixing flake8 issues. I should be able to push an update today. |
|
I fixed the pep8 issues in Minor issue: I guess we should take this opportunity to rename the command |
Yes you're right, I'd suggest we call it
I'll push a change. |
Wrench emoji means "depends on build", so invent a new emoji for "runs fast, no build required". [ci skip]
|
I added a new emoji for "doesn't depend on the |
rgommers
left a comment
There was a problem hiding this comment.
Hi all, I plan to merge this by Friday unless there's blocking concerns. That will help get people to use it and find possible parts that aren't working smoothly just yet. We'll keep
dev.pyaround until we're sure this is all good to go.
It is now Friday, and this has been tested by a fair number of people. So let's merge this as is. A huge thank you to @schettino72 and @sayantikabanik for doing the heavy lifting. And of course to everyone else who contributed ideas/testing/review.
There are a few follow-ups listed in the file itself. Others I'm aware of:
- clean up docs Makefile
- add support for
actindo.py(@sayantikabanik has changes ready for that) - once the
doitconda package is installable asnoarch, update the environment yml files - look at new opportunities provided by the new structure (caching w
doit, more complex workflows, ...?)
And one that just occurred to me and may make sense:
- make the
--helpoutput paging, because it's too long to fit on the average terminal.
Currently facing an issue which is also reported under #16009 [macOS tests (meson)/Meson build] Skipping job 'Meson build' due to 'github.repository == 'scipy/scipy' || github.repository == ''' |
|
When there is any kind of error, it is not logged on the terminal. Instead, the script just exits without telling anything. How to reproduceJust add any random erroneous line to do.py file task. Lines 545 to 551 in 9137ef1 Here I'm adding the following before line 550. @classmethod
def build_project(cls, dirs, args, env):
"""
Build a dev version of the project.
"""
import thisdoesnotexist #obviously this should error out
cmd = ["ninja", "-C", str(dirs.build)]
if args.parallel > 1:But when I run |
|
nevermind, just found this comment rgommers#133 (comment) Apologies for the noise. |
Reference issue
What does this implement/fix?
doit,clickalong with a GUI implemented usingrich-click.Handy commands
python do.pypython do.py <task_name> --helpAdditional information
Current list of implemented tasks:
Build & testing tasksStatic checker tasksEnvironmentsDocumentation tasksRelease tasksBenchmarking tasksGUI look
cc @rgommers @schettino72