{"id":19657734,"url":"https://github.com/esss/deps","last_synced_at":"2025-04-28T19:32:25.130Z","repository":{"id":47633456,"uuid":"110996102","full_name":"ESSS/deps","owner":"ESSS","description":"A tool to manipulate running commands in a project and its dependencies","archived":false,"fork":false,"pushed_at":"2024-08-06T12:00:13.000Z","size":176,"stargazers_count":20,"open_issues_count":1,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-06T20:09:05.944Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ESSS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-16T16:36:30.000Z","updated_at":"2024-08-06T12:00:17.000Z","dependencies_parsed_at":"2024-04-29T17:54:13.832Z","dependency_job_id":"ed8f94f6-69da-40be-86d9-1f5f340d1f36","html_url":"https://github.com/ESSS/deps","commit_stats":{"total_commits":129,"total_committers":10,"mean_commits":12.9,"dds":"0.33333333333333337","last_synced_commit":"52258130ee2f262887f8419b09f0366c93ceeec2"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESSS%2Fdeps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESSS%2Fdeps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESSS%2Fdeps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESSS%2Fdeps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ESSS","download_url":"https://codeload.github.com/ESSS/deps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224129260,"owners_count":17260591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T15:33:25.731Z","updated_at":"2024-11-11T15:33:26.299Z","avatar_url":"https://github.com/ESSS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deps\n\n[![link](https://img.shields.io/conda/vn/conda-forge/deps.svg)](https://anaconda.org/conda-forge/deps)\n[![link](https://github.com/ESSS/deps/workflows/build/badge.svg)](https://github.com/ESSS/deps/actions)\n[![link](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nDeps is a utility to execute commands on multiple projects.\n\nIt is meant to be used along with `conda devenv`: https://github.com/ESSS/conda-devenv, as such,\nit reads the contents of the `includes` sections of `environment.devenv.yml`, which contains\nthe relative paths of the dependencies where commands should be executed.\n\n# Examples\n\n`deps inv codegen` will run `inv codegen` on the projects and its dependencies sequentially, respecting dependencies.\n\n`deps inv codegen -j 16` will run `inv codegen` on the projects and its dependencies with paralelization,\nbut respecting dependencies (so, it'll only run in parallel commands after their own requisites have been fullfiled).\n\n`deps inv codegen -j 16 --jobs-unordered` will run `inv codegen` on the projects and its dependencies\nwith full-paralelization, without respecting any particular order.\n\n## GitHub Actions\n\nSince version `1.3.1`, `deps` will automatically print `::group::` and `::endgroup::` markers when running in GitHub actions, which makes for better experience when visualizing the logs.\n\nIt detects this by the presence of the `GITHUB_WORKSPACE` environment variable.\n\n## DEPS_WORK_DIR\n\nSince version `1.4.0`, each `deps` invocation will create an empty temporary directory which can be used as a\n\"work/staging area\" by executing code. This has many possible uses:\n\n1. Caching the conda environment used for the `deps` invocation by writing it to a file in `$DEPS_WORK_DIR`.\n2. Check if a certain operation has already been executed in the current `deps` invocation, say running a per-repository\n   operation only once (for example pre-commit), by writing some to a file in `$DEPS_WORK_DIR`.\n\n`deps` is responsible for creating a unique directory for each invocation (each invocation uses a different name), so\neven different `deps` processes running at the same time will not step on each other's toes.\n\n# Usage\n\nProgram to list development dependencies of `conda-devenv` projects, or to execute a command for each dependency:\n\n    deps [OPTIONS] [COMMAND]...\n\nTo list project dependencies of the project in the current directory, one per line:\n\n    deps\n\nIt is possible to pass `-p directory` to find the first ancestor of `directory` containing an `environment.devenv.yml` file:\n\n    deps -p mylib10 -p myotherlib20\n\nThis may be used in combination with shell commands (useful for `source`ing files), e.g., to iterate on dependencies in windows (cmd):\n\n    for %%i in ('deps -p mylib10') do \u003csomething\u003e %%i [...]\n\nTo iterate on dependencies in unix (bash):\n\n    deps | xargs -0 -I {} \u003csomething\u003e {} [...]\n\nTo use deps to execute a command for each dependency (will spawn a new shell for each dependency):\n\n    deps [parameters] \u003ccommand\u003e\n\nTo prevent deps to process any option or flags passed to command a \"--\" can be used:\n\n    deps [parameters] -- \u003ccommand\u003e --with --flags\n\n`\u003ccommand\u003e` may contain some variables:\n\n* {name}: The dependency bare name (ex.: eden)\n* {abs}:  The dependency absolute path (ex.: X:\\ws\\eden)\n\nIf the option --require-file is used dependencies not having a file named as this relative to the given dependency root directory are skipped:\n\n    deps --require-file Makefile -- make clean\n\nWhen passing parameters that can be used multiple times through environment variable use the operational system path separator (windows=\";\", linux=\":\") to separate multiple entries:\n\n* Windows: `set DEPS_IGNORE_PROJECT=old_project;fuzzy_project`\n* Linux: `export DEPS_IGNORE_PROJECT=old_project:fuzzy_project`\n\nThis is equivalent to pass `--ignore-project=old_project --ignore-project=fuzzy_project`.\n\nOptions Description:\n\n  * `--version`\n\n    Show the version and exit.\n\n  * `-p, --project PATH`\n\n    Project to find dependencies of (can be used multiple times).\n\n  * `-pp, --pretty-print`\n\n    Pretty print dependencies in a tree.\n\n  * `-f, --require-file TEXT`\n\n    Only run the command if the file exists (relative to dependency working directory).\n\n  * `--here`\n\n    Do not change working dir.\n\n  * `-n, --dry-run`\n\n    Do not execute, only print what will be executed.\n\n  * `-v, --verbose`\n\n    Print more information.\n\n  * `--continue-on-failure`\n\n    Continue processing commands even when one fail (if some command fail the return value will be non zero).\n\n  * `-i, --ignore-project PATH`\n\n    Project name to ignore when looking for dependencies and will not recurse into those projects. Instead of passing this option an environment variable with the name `DEPS_IGNORE_PROJECT` can be used (can be used multiple times).\n\n  * `-s, --skip-project PATH`\n\n    Project name to skip execution but still look for its dependencies. Instead of passing this option an environment variable with the name `DEPS_SKIP_PROJECT` can be used (can be used multiple times).\n\n  * `--force-color / --no-force-color`\n\n    Always use colors on output (by default it is detected if running on a terminal). If file redirection is used ANSI escape sequences are output even on windows. Instead of passing this option an environment variable with the name `DEPS_FORCE_COLOR` can be used.\n\n  * `--repos`\n\n    Instead of projects the enumeration procedure will use the containing repositories instead of projects them selves.\n\n  * `-j, --jobs INTEGER`\n\n    Run commands in parallel using multiple processes.\n\n  * `--jobs-unordered`\n\n    Will run jobs without any specific order (useful if dependencies are not important and jobs \u003e 1 to run more jobs concurrently).\n\n  * `--deps-reversed`\n\n    Will run with a reversed dependency (only used if --jobs=1). Useful to identify where the order is important.\n\n  * `--help`\n\n    Show this message and exit.\n\n# License\n\nFree software: MIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesss%2Fdeps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesss%2Fdeps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesss%2Fdeps/lists"}