{"id":13820845,"url":"https://github.com/pamelafox/python-project-template","last_synced_at":"2025-04-05T08:03:46.861Z","repository":{"id":138633466,"uuid":"552381615","full_name":"pamelafox/python-project-template","owner":"pamelafox","description":"A Github template repository for a Python project with support for Codespaces, devcontainer, and Github Actions.","archived":false,"fork":false,"pushed_at":"2025-03-13T05:35:01.000Z","size":31,"stargazers_count":124,"open_issues_count":0,"forks_count":32,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-29T07:09:38.515Z","etag":null,"topics":["codespaces","devcontainer","python","python3"],"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/pamelafox.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","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":"2022-10-16T13:20:25.000Z","updated_at":"2025-03-24T09:08:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6485f07-a7a8-448e-98dc-bb20f57ccd1d","html_url":"https://github.com/pamelafox/python-project-template","commit_stats":{"total_commits":22,"total_committers":3,"mean_commits":7.333333333333333,"dds":0.2727272727272727,"last_synced_commit":"429b8a29b92688e7edc1b1526515b4502a329112"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pamelafox%2Fpython-project-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pamelafox%2Fpython-project-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pamelafox%2Fpython-project-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pamelafox%2Fpython-project-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pamelafox","download_url":"https://codeload.github.com/pamelafox/python-project-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305932,"owners_count":20917208,"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":["codespaces","devcontainer","python","python3"],"created_at":"2024-08-04T08:01:10.207Z","updated_at":"2025-04-05T08:03:46.842Z","avatar_url":"https://github.com/pamelafox.png","language":"Python","readme":"# Python project template\n\nThis is a template repository for any Python project that comes with the following dev tools:\n\n* `ruff`: identifies many errors and style issues (`flake8`, `isort`, `pyupgrade`)\n* `black`: auto-formats code\n\nThose checks are run as pre-commit hooks using the `pre-commit` library.\n\nIt includes `pytest` for testing plus the `pytest-cov` plugin to measure coverage.\n\nThe checks and tests are all run using Github actions on every pull request and merge to main.\n\nThis repository is setup for Python 3.11. To change the version:\n1. Change the `image` argument in `.devcontainer/devcontainer.json` (see [https://github.com/devcontainers/images/tree/main/src/python](https://github.com/devcontainers/images/tree/main/src/python#configuration) for a list of pre-built Docker images)\n1. Change the config options in `.precommit-config.yaml`\n1. Change the version number in `.github/workflows/python.yaml`\n\n## Development instructions\n\n## With devcontainer\n\nThis repository comes with a devcontainer (a Dockerized Python environment). If you open it in Codespaces, it should automatically initialize the devcontainer.\n\nLocally, you can open it in VS Code with the Dev Containers extension installed.\n\n## Without devcontainer\n\nIf you can't or don't want to use the devcontainer, then you should first create a virtual environment:\n\n```\npython3 -m venv .venv\nsource .venv/bin/activate\n```\n\nThen install the dev tools and pre-commit hooks:\n\n```\npython3 -m pip install --user -r requirements-dev.txt\npre-commit install\n```\n\n## Adding code and tests\n\nThis repository starts with a very simple `main.py` and a test for it at `tests/main_test.py`.\nYou'll want to replace that with your own code, and you'll probably want to add additional files\nas your code grows in complexity.\n\nWhen you're ready to run tests, run:\n\n```\npython3 -m pytest\n```\n\n# File breakdown\n\nHere's a short explanation of each file/folder in this template:\n\n* `.devcontainer`: Folder containing files used for setting up a devcontainer\n  * `devcontainer.json`: File configuring the devcontainer, includes VS Code settings\n* `.github`: Folder for Github-specific files and folders\n  * `workflows`: Folder containing Github actions config files\n    * `python.yaml`: File configuring Github action that runs tools and tests\n* `tests`: Folder containing Python tests\n  * `main_test.py`: File with pytest-style tests of main.py\n* `.gitignore`: File describing what file patterns Git should never track\n* `.pre-commit-config.yaml`: File listing all the pre-commit hooks and args\n* `main.py`: The main (and currently only) Python file for the program\n* `pyproject.toml`: File configuring most of the Python dev tools\n* `README.md`: You're reading it!\n* `requirements-dev.txt`: File listing all PyPi packages required for development\n* `requirements.txt`: File listing all PyPi packages required for production\n\nFor a longer explanation, read [this blog post](http://blog.pamelafox.org/2022/09/how-i-setup-python-project.html).\n\n# 🔎 Found an issue or have an idea for improvement?\n\nHelp me make this template repository better by letting us know and opening an issue!\n","funding_links":[],"categories":["Python","python3","Samples"],"sub_categories":["Python"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpamelafox%2Fpython-project-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpamelafox%2Fpython-project-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpamelafox%2Fpython-project-template/lists"}