{"id":17343674,"url":"https://github.com/gma/python-template","last_synced_at":"2025-03-27T09:42:16.750Z","repository":{"id":203295631,"uuid":"709269301","full_name":"gma/python-template","owner":"gma","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-08T21:10:43.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T14:31:31.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/gma.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":"2023-10-24T11:30:12.000Z","updated_at":"2024-05-08T21:10:48.000Z","dependencies_parsed_at":"2023-11-14T16:40:36.076Z","dependency_job_id":"ea4d7d03-eace-4ac1-8b61-3c377859bdca","html_url":"https://github.com/gma/python-template","commit_stats":null,"previous_names":["gma/python-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gma%2Fpython-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gma%2Fpython-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gma%2Fpython-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gma%2Fpython-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gma","download_url":"https://codeload.github.com/gma/python-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245820854,"owners_count":20677928,"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-10-15T16:10:00.385Z","updated_at":"2025-03-27T09:42:16.731Z","avatar_url":"https://github.com/gma.png","language":"Python","readme":"Python Project Template\n=======================\n\nYou can use this repository as a template when creating a new repository on GitHub, to get my preferred setup for a Python project.\n\nAfter creating the new project, there are a few things you'll need to configure.\n\n## Rename the main package\n\nYou'll need to rename the package from \"mylib\" to something sensible:\n\n```sh\ngit mv mylib newname\nsed -i='' -e 's/mylib/newname/' tests/* .projections.json\n```\n\n## Choosing the Python version\n\nThe version of Python that your project uses is needed by the GitHub Action that runs the tests, and perhaps by your local Python installation tool.\n\nYou can create it like this:\n\n```sh\necho 3.11.3 \u003e .python-version  # 3.11.3 is just an example\n```\n\n## Reviewing the license\n\nThe open source MIT license is used by default (see the [LICENSE] file). [Is it appropriate](https://choosealicense.com/) for this project?\n\nIf you do stick with the MIT license, don't forget to set the year and the name of the copyright holder. If you're on Linux you can do it quickly by copying/pasting this snippet into your shell:\n\n```sh\nsed -i='' -e \"s,\u003cYEAR\u003e,$(date +%Y),\" LICENSE\nFULL_NAME=\"$(getent passwd $USER | cut -d : -f 5 | cut -d , -f 1)\"\nsed -i='' -e \"s,\u003cCOPYRIGHT HOLDER\u003e,$FULL_NAME,\" LICENSE\n```\n\nOtherwise, just edit [LICENSE].\n\n[LICENSE]: ./LICENSE\n\n## Run the tests locally\n\nYou need to get everything installed, and that first test running. Start by creating a virtual environment:\n\n```sh\npython3 -m venv .venv\nsource .venv/bin/activate\n```\n\nNow we can install our development tools:\n\n```sh\npip install --upgrade pip\npip install pip-tools\npip-sync dev-requirements.txt\n```\n\nThe dev tools included in the template are sufficient to be able to run the linter, type checker, and tests. They're all run by this script:\n\n```sh\n./test\n```\n\n## Adding dependencies\n\nOnce you've got non-development dependencies you can specify them in `requirements.in`, running these commands to install them alongside your development dependencies:\n\n```sh\npip-compile requirements.in\npip-sync requirements.txt dev-requirements.txt\n```\n\nIf you want to add more development tools, add them to `dev-requirements.in` and run:\n\n```sh\npip-compile dev-requirements.in\npip-sync requirements.txt dev-requirements.txt\n```\n\n## Update the README\n\nNow delete all the docs that you've just followed, and write something suitable for your new project!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgma%2Fpython-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgma%2Fpython-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgma%2Fpython-template/lists"}