{"id":22056056,"url":"https://github.com/jorgenusan/pydepcheck","last_synced_at":"2025-08-01T23:43:30.909Z","repository":{"id":231514149,"uuid":"780644565","full_name":"jorgenusan/pydepcheck","owner":"jorgenusan","description":"pre-commit hook that checks the libraries used in the code and verifies if they appear in the env file, if not, it adds them.","archived":false,"fork":false,"pushed_at":"2024-06-27T17:00:51.000Z","size":320,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T16:16:45.840Z","etag":null,"topics":["conda","conda-environment","pip","pre-commit","pre-commit-config","pre-commit-hook","pre-commit-hooks","python"],"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/jorgenusan.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}},"created_at":"2024-04-01T22:26:59.000Z","updated_at":"2024-06-27T17:00:54.000Z","dependencies_parsed_at":"2024-06-04T12:56:47.444Z","dependency_job_id":"3a2afc67-c284-4d61-95aa-d364beead6f9","html_url":"https://github.com/jorgenusan/pydepcheck","commit_stats":null,"previous_names":["jorgenusan/conda_package_verification","jorgenusan/cpv"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jorgenusan/pydepcheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorgenusan%2Fpydepcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorgenusan%2Fpydepcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorgenusan%2Fpydepcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorgenusan%2Fpydepcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jorgenusan","download_url":"https://codeload.github.com/jorgenusan/pydepcheck/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorgenusan%2Fpydepcheck/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268314677,"owners_count":24231031,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["conda","conda-environment","pip","pre-commit","pre-commit-config","pre-commit-hook","pre-commit-hooks","python"],"created_at":"2024-11-30T16:12:23.612Z","updated_at":"2025-08-01T23:43:30.836Z","avatar_url":"https://github.com/jorgenusan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyDepCheck\n\n## Introduction\n\n**Python Depencencies Check** it is a module that automatically check if the dependencies used in the code appear in the environment file (`conda.yaml` or `requirements.txt`) but forgot to add manually to these files.\n\nIn this way, the files with the dependencies are always aligned with the dependencies you are using in the code.\n\n\u003e [!NOTE]\n\u003e Works for conda virtual environments and with `conda.yaml` and `requirements.txt` files.\n\n## How it works\n\nIt looks in your code to see what libraries you are using, discards internal python libraries and is left with only the libraries that need to be installed. These are the ones we need to add in the dependency files.\n\nOnce you have these libraries, take the version you are using in your conda environment and add it to the dependency file if it is not already added.\n\nIt only needs 2 parameters, the file you want to check and the conda environment you use for that project.\n\n\u003e [!WARNING]\n\u003e It does not remove unused libraries from your dependency file. It only adds libraries that are not in your dependency file.\n\n## pre-commit Hook\n\nFor convenience, add it as a hook to your .pre-commit-config.yaml, or if you don't have one, create a new one with this hook.\n\n\u003e [!NOTE]\n\u003e Use of **requirements.txt** or **conda.yaml**:\u003cbr\u003e\n\u003e `args: ['--env-file', 'requirements.txt', '--env-name', '\u003cenv_nzme\u003e']`\u003cbr\u003e\n\u003e `args: ['--env-file', 'conda.yaml', '--env-name', '\u003cenv_name\u003e']`\n\n```yaml\n# .pre-commit-config.yaml\nrepos:\n  - repo: https://github.com/jorgenusan/pydepcheck.git\n    rev: v0.1.3\n    hooks:\n      - id: pydepcheck\n        args: ['--env-file', 'requirements.txt', '--env-name', 'pydepcheck']\n```\n\nWith this configuration, every commit you make will check that all dependencies are added.\n\n![Terminal logs](assets/failed_log.png)\n\n## Run locally\n\n### Requirements\n\n- [pre-commit](https://pre-commit.com/)\n- Python 3.8+\n\n### Quick Start\n\n1. Conda env\n\n   ```bash\n   conda create -n pydepcheck python=3.9 -y\n   conda activate pydepcheck\n    ```\n\n2. install the repository\n\n   ```bash\n   python setup.py install\n   ```\n\n3. Execute pydepcheck\n\n    ```bash\n    python pydepcheck/main.py --env_file [file.txt/file.yaml] --env_name pydepcheck\n    ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorgenusan%2Fpydepcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjorgenusan%2Fpydepcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorgenusan%2Fpydepcheck/lists"}