crowfood
Creates dependency files from C/C++ code for use with snakefood. This allows you to easily create dependency graphs on file/module/folder/etc. level from your C/C++ codebase.
Installation
You must have Python installed on your system.
If you don’t have snakefood installed yet, install it with pip install snakefood first.
Now install crowfood with pip install crowfood.
How to create dependency graphs
Getting started
Let’s assume /libab is the root path of your C/C++ project which contains:
A.c
B.c
ab/
A.h
B.h
We’ll create a simple file-based dependency graph by piping crowfood’s dependency information to snakefood’s sfood-graph tool to create a graph in DOT format which is then visualized with dot itself and saved to a pdf file:
cfood /libab | sfood-graph | dot -Tpdf > simple.pdf
crowfood can handle many folder layouts and will output warnings if it can’t find #include’s. Run cfood --help to see all options regarding folder layout and include paths.
TIP: As a quick fix or to get started with bigger projects, use --fuzzy to let crowfood search for #include files purely by their filename and ignore folder structure.
Grouping/Clustering
Depending on how big your project is it may make sense to group files together in some way.
One way is to group matching source and header files as “modules”:
cfood /libab --merge module | sfood-graph | dot -Tpdf > modules.pdf
Another way is to define clusters in terms of path prefixes. First, create a file clusters which contains the prefixes:
componenta
componentb/partc
And then run:
cfood /bigproject | sfood-cluster -f clusters | sfood-graph | dot -Tpdf > clustered.pdf
Have a look at the snakefood docs to get some more inspiration on how to transform the raw dependency output from crowfood into something that makes sense for your project. Always remember that the dependency output is line-based and very easy to handle with standard unix tools, e.g. grep for filtering.
Metadata
Release files for crowfood 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crowfood-0.4.1.tar.gz | 10.1 kB | Without provenance | Details for crowfood-0.4.1.tar.gz |
Release files / crowfood-0.4.1.tar.gz
| Download URL | crowfood-0.4.1.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
486969bb2519329355d758dbdace95a7011d4ce1a17c5c8956a6722977076fa4
|
|
BLAKE2b-256 checksum How to use checksums |
deae0559cf1fa3a340bced3544b9be8c05fcb4be7fafac636f921e9c34289e71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for crowfood 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.