Comments (12)
Did you have something like this in mind?
I.e., try with project's dodo.py
the following:
doit list --graph
doit list --graph epydoc package
from doit.
Cool. I am glad to see some work being done on this :)
- I think better leave the
list
command as it is now. And putgraph
as a separate command, it will probably grow to require its own parameters. - I wish there was some kind of plugin system to add commands to doit. Requiring everyone to install matplotlib and networkx is not nice.
- what I really wish was some kind interactive visualization where you could hide/show nodes, select which type of nodes to show, cluster nodes, etc... but of course that's very ambitious.
- To start with I was thinking about just generate a text
dot
file and let graphviz handle the rendering. I am not familiar with networkx but it seems it works too :)
So, making it clear. This is very welcome but due to extra dependencies it cant come into doit core (it might have an "official" status but wont come in the main distribution package).
Something that generate a text file (like dot
) that doesnt need extra packages would be accepted on core.
I will create another issue to discuss about a plugin system.
from doit.
issue #32 deals with a plugin system
from doit.
I think better leave the list command as it is now. And put graph as a separate command, it will probably grow to require its own parameters.
Myself originally had implemented it as a new graph
command (i still have the code available) but came to pack it as list
option because it really meddles with the workflow:
$ doit list
...
doit list -g <a_task_from_above_list>
And if its output is just a list of nodes, as you suggest, then it does make even more sense. I'm having git log
as a guiding principle. Something like this: http://stackoverflow.com/a/9074343/548792
I wish there was some kind of plugin system to add commands to doit. Requiring everyone to install matplotlib and networkx is not nice.
...
To start with I was thinking about just generate a text dot file and let graphviz handle the rendering. I am not familiar with networkx but it seems it works too :)
...
Something that generate a text file (like dot) that doesnt need extra packages would be accepted on core.
- I fully agree for the plugn system.
- Matplotlib requirement is indeed too heavy and has to be factored out in a plugin.
- What i don't understand is the no-extra" package rule. The
networkx
is a pure-python 2 & 3 graph-library with very fast and lightweight data-structures, yet extremely powerful, perfectly fit to the tasks (reporting drawing, researching). I do not think any body will object in installing it.
The only minor issue i see is that it is not tested on python-version prior to 2.7, but the documents still mention 2.6 and 3.2 as suitable versions. But is this such a showstopper for reinventing the graph-wheel?
from doit.
It is not just about adding another dependency. For a graph
command I guess it makes sense to add the following options:
- drawer (one of networkx, dot, jpg, svg, json, etc)
- include file_dep, targets ?
- cluster files
- cluster subcommands
- i am sure gonna have more
these are just too much to go together with list
command.
Also I have strict quality requirements for doit core, like 100% tests, etc. Leaving it outside gives it more freedom to evolve.
I added a basic plugin system 8091428
Check the test for an example of usage.
I suggest you not only move this code to a different command, it also should go into a different repository. I will invite you to join the pydoit group, but of course you are free to host it under your name if you prefer.
from doit.
@ankostis I sent an invitation but I am not 100% sure you have permissions to create a new repo... let me know. cheers
from doit.
Thank you, i accepted it.
from doit.
Ported functionality to new repo: https://github.com/pydoit/doit-graphx
from doit.
Great. I am closing this. At some point you should send an email to doit email group to announce this :)
from doit.
Also we need to feature it somewhere in the main doit docs...
from doit.
The homepage mentions
DAG Visualisation: create task's dependency-graph image using graphviz
This issue comes up in a search, so I thought it would be helpful to others if I ask here: how do I access this functionality?
from doit.
https://github.com/pydoit/doit-graph
from doit.
Related Issues (20)
- tasks must not change working directory to avoid "No such file or directory: '.doit.db.dat'" HOT 5
- Cleaning all doesn't seem to work HOT 2
- tasks are uptodate even though their task_dependency is not HOT 6
- -s param doesn´t accept multiple arguments since 0.34.0 HOT 1
- Pre-commit hook HOT 2
- typo on opencollective page? HOT 2
- Interesting doit use HOT 1
- How to pass command line arguments to dependent tasks
- Problems with interaction between config files and --seek-file/--file HOT 2
- Feature Request: Version of LongRunning that returns TaskError on non zero return code? HOT 2
- dep_manager.get_result() should not be discouraged if MRunner is also used HOT 1
- Task marked as not up-to-date because of a uppercase/lowercase difference in the drive letter. HOT 1
- Building version `>= 0.36.0` conda package for windows with python 3.11 HOT 2
- create required CmdOption HOT 1
- basename in Task.valid_attr, but not in Task.__init__
- watch depedency has no effect on task selection
- Program hangs when num process is set to 1 for using multiprocessing
- Gradual update of doit.dat file for multi-tasks (subtasks)
- Doit ignores action_string_formatting config when defined in pyproject.toml
- How to get the pathpath / sys.path correct with doit when using a src directory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doit.