{"id":42194640,"url":"https://github.com/scientific-python/reverse-dependency-testing-action","last_synced_at":"2026-01-27T00:02:08.007Z","repository":{"id":168763180,"uuid":"644555601","full_name":"scientific-python/reverse-dependency-testing-action","owner":"scientific-python","description":"GitHub Action for reverse dependency testing of Python packages","archived":false,"fork":false,"pushed_at":"2024-06-26T18:26:48.000Z","size":41,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-18T02:07:45.004Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scientific-python.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2023-05-23T19:09:12.000Z","updated_at":"2024-06-26T18:26:51.000Z","dependencies_parsed_at":"2023-11-10T12:28:03.449Z","dependency_job_id":"9e5be648-2a8b-4d9b-8c5c-46b915559a75","html_url":"https://github.com/scientific-python/reverse-dependency-testing-action","commit_stats":null,"previous_names":["martinfleis/reverse-dependency-testing","scientific-python/reverse-dependency-testing-action"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scientific-python/reverse-dependency-testing-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scientific-python%2Freverse-dependency-testing-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scientific-python%2Freverse-dependency-testing-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scientific-python%2Freverse-dependency-testing-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scientific-python%2Freverse-dependency-testing-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scientific-python","download_url":"https://codeload.github.com/scientific-python/reverse-dependency-testing-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scientific-python%2Freverse-dependency-testing-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28792638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-27T00:02:07.188Z","updated_at":"2026-01-27T00:02:07.996Z","avatar_url":"https://github.com/scientific-python.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reverse dependency testing\n\n**NOTE: This is an alpha version, proceed with caution.**\n\nThis GitHub Action allows you to query conda-forge dependency tree and run\ntests included in packages that depend on your package against your development version.\n\nThe workflow is able to run tests only if the downstream packages do\npackage them, including all the necessary files. Otherwise, it will skip\nthe package with no collected tests or report a failure.\n\n## Usage\n\nFor the simple packages, the setup is simple, you just need to pass a\n`package_name` used for the dependency tree query:\n\n```yml\n- uses: scientific-python/reverse-dependency-testing@main\nwith:\n    package_name: mypackage\n```\n\n### Ignore packages\n\nIn some cases, you may want to ignore certain packages (since they cannot be installed or for any other reason):\n\n```yml\n- uses: scientific-python/reverse-dependency-testing@main\nwith:\n    package_name: mypackage\n    ignore: broken_package\n```\n\n### Select only a subset of packages\n\nAlternatively, you may run only a whitelisted subset of the dependents:\n\n```yml\n- uses: scientific-python/reverse-dependency-testing@main\nwith:\n    package_name: mypackage\n    whitelist: \u003e-\n        package1\n        package2\n```\n\n### Include additional packages\n\nSome packages you may want to test against may depend on your package only\noptionally and will not show up in the dependency tree. Those can be\nexplicitly included in the workflow and tested with others using the\n`include` input.\n\n```yml\n- uses: scientific-python/reverse-dependency-testing@main\nwith:\n    package_name: mypackage\n    include: \u003e-\n        package1\n        package2\n```\n\n### Specify environment\n\nYou can set up the environment with dependencies required to build\nyour package by passing the conda environment file:\n\n```yml\n- uses: scientific-python/reverse-dependency-testing@main\nwith:\n    package_name: mypackage\n    env: environment.yml\n```\n\nAlternatively, (or additionally) you can specify packages to be installed\nin the environment with conda in the `install` input:\n\n```yml\n- uses: scientific-python/reverse-dependency-testing@main\nwith:\n    package_name: mypackage\n    install: package1 package2\n```\n\nOr with pip using `install_pip` input:\n\n```yml\n- uses: scientific-python/reverse-dependency-testing@main\nwith:\n    package_name: mypackage\n    install_pip: package1 package2\n```\n\n\nThe default Python version installed in the environment is 3.11. You can\noverride that either in your environment file or using `python_version`.\n\n```yml\n- uses: scientific-python/reverse-dependency-testing@main\nwith:\n    package_name: mypackage\n    python_version: 3.9\n```\n\nIf you need to run a specific command in the docker container prior the\ninstallation of the packages, you can specify it in the `run` input. The\ncommand will be run before setting up the conda environment. For example,\nto install GCC you can do:\n\n```yml\n- uses: scientific-python/reverse-dependency-testing@main\nwith:\n    package_name: mypackage\n    run: apt-get update \u0026\u0026 apt install build-essential -y\n```\n\n### Customize installation command\n\nBy default, the action attempts to install the package using\n`pip install .`. However, you can specify your own command:\n\n```yml\n- uses: scientific-python/reverse-dependency-testing@main\nwith:\n    package_name: mypackage\n    installation_command: pip install --no-deps --no-build-isolation .\n```\n\n### Fail or pass on test failure\n\nThe action returns an exit code 1 (failure) if there is at least one\nfailed test. You can avoid it by setting `fail_on_failure` to `false`.\n\n```yml\n- uses: scientific-python/reverse-dependency-testing@main\nwith:\n    package_name: mypackage\n    fail_on_failure: false\n```\n\n### XFail package tests\n\nYou can allow some packages to fail without failing the whole action.\n\n```yml\n- uses: scientific-python/reverse-dependency-testing@main\nwith:\n    package_name: mypackage\n    xfail: package1 package2\n```\n\n\n## How to ensure that tests are packaged?\n\nThe easiest way to ensure that the tests are packaged is to store them\nin the package folder (usually called `package_name` or `src/package_name`).\n\n```\nmypackage\n├── pyproject.toml\n|   README.md\n|   LICENCE\n└── mypackage\n    ├── __init__.py\n    ├── my_module.py\n    └──tests\n        └──test_my_module.py\n```\n\nYou can verify that the tests can be found by running\n\n```sh\npytest --pyargs mypackage\n```\n\nPackaging of tests is useful not only for this action but also to allow users\nto verify that your package is correctly installed in their environment.\n\n## How does the Action work?\n\nThe principle is simple:\n\n1. Use `micromamba repoquery whoneeds mypackage -c conda-forge` to fetch the direct dependents of `mypackage` based on the `conda-forge` index.\n2. De-duplicate the list to retrieve unique package names.\n3. Create an environment with all the packages and install `mypackage` from main.\n4. Loop over the package names and run `pytest --pyargs packagename` for each.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscientific-python%2Freverse-dependency-testing-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscientific-python%2Freverse-dependency-testing-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscientific-python%2Freverse-dependency-testing-action/lists"}