{"id":41135667,"url":"https://github.com/islomar/python-kata-template","last_synced_at":"2026-01-22T18:38:03.494Z","repository":{"id":222372834,"uuid":"757101690","full_name":"islomar/python-kata-template","owner":"islomar","description":"Template repository for Python katas (Dockerized)","archived":false,"fork":false,"pushed_at":"2025-03-02T17:54:50.000Z","size":103,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-31T10:41:47.645Z","etag":null,"topics":["automation","docker","kata","python","template","testing"],"latest_commit_sha":null,"homepage":"","language":"Makefile","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/islomar.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}},"created_at":"2024-02-13T20:10:41.000Z","updated_at":"2025-03-02T17:54:54.000Z","dependencies_parsed_at":"2024-03-31T15:49:50.975Z","dependency_job_id":null,"html_url":"https://github.com/islomar/python-kata-template","commit_stats":null,"previous_names":["islomar/python-kata-template"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/islomar/python-kata-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/islomar%2Fpython-kata-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/islomar%2Fpython-kata-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/islomar%2Fpython-kata-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/islomar%2Fpython-kata-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/islomar","download_url":"https://codeload.github.com/islomar/python-kata-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/islomar%2Fpython-kata-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28668192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T17:07:18.858Z","status":"ssl_error","status_checked_at":"2026-01-22T17:05:02.040Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["automation","docker","kata","python","template","testing"],"created_at":"2026-01-22T18:38:03.425Z","updated_at":"2026-01-22T18:38:03.481Z","avatar_url":"https://github.com/islomar.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Run linters and tests workflow](https://github.com/islomar/python-kata-template/actions/workflows/run-linters-and-tests.yml/badge.svg)\n\n# Python template for a kata\n\n- Template repository for Python katas (Dockerized)\n- The repository is created as a **GitHub repository template**, so that you can easily create your own GitHub repository from this one.\n  - [Here](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template#creating-a-repository-from-a-template) you can find the instructions: easy peasy!\n  - There is a **GH project** associated with this repo, with some pending improvements.\n- Everything is **Dockerized**. If you run `make` from the root folder of the project, you can see all the actions that you can execute (e.g. running the tests, static analysis, code coverage, etc.)\n\n\n## HOW to use it\n1. Generate a repo using this one as a template, following [these instructions](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template#creating-a-repository-from-a-template)\n2. Replace the `python-kata-name` placeholder that appears in several files with your own name (e.g. `python-fizzbuzz`). \n   - For example, you can easily do it running `make rename-project new-name=python-fizzbuzz`\n\n\n## Prerequisites\n- You need [Docker](https://docs.docker.com/get-docker/) installed.\n- **IMPORTANT**: just the first time, run `make local-setup`.\n    - This will set up things like configuring Git hooks. The `pre-commit` hook will automatically run the linters and tests, rejecting the commit in case any of them fail.\n\n\n## How to update or add a Python package\n  1. In the terminal, run:\n     - In case it's a development dependency: `make add-dev-package package=\u003cpackage_name\u003e` \n     - In case it's a \"production\" dependency: `make add-package package=\u003cpackage_name\u003e`\n  2. Commit and push the changes updated in the file `poetry.lock` and `pyproject.toml`\n\n\n## Functionalities included\n- There is pipeline configured as a GitHub Action which runs all the linters, the tests and both the coverage and mutation testing.\n  - The artifacts with the HTML reports generated can be downloaded from the GitHub project tab \"Actions\" --\u003e \"Summary\" --\u003e \"Artifacts\".\n- [**Dependabot**](https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file) is configured at GitHub repository level, in order to automatically update the dependencies weekly.\n- A **badge** on top of this README file shows the status of the GH Action (passing or failing).\n- [Poetry](https://python-poetry.org) is used as the Python packaging and dependency manager. \n- Use of [**black**](https://github.com/psf/black) for formatting.\n  - If the format check fails, you can automatically format whatever missing running `make fix-format`.\n- Use of [**flake8**](https://flake8.pycqa.org/en/latest/) for style (linting): `make check-style`\n- Use of [**mypy**](https://mypy.readthedocs.io/en/stable/) as static type checker.\n- Use of [**Editorconfig**](https://editorconfig.org/): EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs.\n\n### Testing\n  - Libraries\n    - [pytest](https://docs.pytest.org)\n    - [python-doublex](https://python-doublex.readthedocs.io/en/latest/): powerful test doubles framework for Python\n    - [expects](https://expects.readthedocs.io/en/stable/): an expressive and extensible TDD/BDD assertion library for Python\n    - [doublex-expects](https://github.com/jaimegildesagredo/doublex-expects): a matchers library for the Expects assertion library\n    - [pytest-xdist](https://github.com/pytest-dev/pytest-xdist): it extends `pytest` with new test execution modes, the most used being distributing tests across multiple CPUs to speed up test execution\n  - You can easily run the **test coverage** with `make test-coverage`\n  - You can easily run **mutation testing** with `make test-run-mutation`\n    - Mutmut keeps a result cache in `.mutmut-cache` so if you want to make sure you run a full mutmut run just delete this file.\n\n\n## More interesting info\n- About mutation testing and coverage reports\n  - https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python\n- [Caching dependencies to speed up workflows](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows)\n- **Mutation testing**\n  - https://github.com/boxed/mutmut\n  - In case it were needed: make mutmut mutation faster using [Hammett](https://github.com/boxed/hammett)\n  - https://opensource.com/article/20/7/mutmut-python\n  - https://medium.com/poka-techblog/hunting-mutants-with-mutmut-5f575b625598\n  - https://blog.stackademic.com/automating-mutation-testing-with-mutmut-and-github-actions-9767b4fc75b5\n    - It talks about GitHub Actions Caching Strategy\n  - Alternative: https://github.com/sixty-north/cosmic-ray\n- Docker permissions (in case it were needed)\n  - https://vsupalov.com/docker-shared-permissions/\n  - https://aschmelyun.com/blog/fixing-permissions-issues-with-docker-compose-and-php/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fislomar%2Fpython-kata-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fislomar%2Fpython-kata-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fislomar%2Fpython-kata-template/lists"}