Skip to main content

Review a Git repository to make sure it matches expected style settings and is not doing anything that is not cross-platform compatible.

Project description

Git Repository Review

Poetry Ruff CI

This is a general-purpose Python library for reviewing a Git repository to make sure it matches expected style settings and is not doing anything that is not cross-platform compatible.

To ensure code quality, several tools are configured:

  • mypy for static type checking
  • ruff as the linter and code formatter
  • codespell to check spelling
  • pytest as the test engine

In addition, Git hooks can be used to guarantee consistency and leverage the aforementioned tools. The workflow test-package.yaml runs them automatically for you.

The documentation is initialized with Jupyter Books, providing a promising approach for interactive tutorials.

Quick Start

  1. If you don't have poetry, download and install Poetry following the instructions for your OS.

  2. Clone your repository and make it your working directory.

  3. To install the project, its development dependencies, and the pre-commit hooks, just run:

    poetry install
    poetry shell
    
  4. The regular maintenance tasks are handled by taskipy. You can see the available tasks by running:

    $ task --list
    pre_commit_install pre-commit install
    test               pytest
    pre_lint           task pre_commit_install
    lint               pre-commit run --all-files
    qa                 task lint && task test
    pre_docs           poetry install --with docs
    docs               jupyter-book build docs --path-output build
    pre_docs_serve     task pre_docs
    docs_serve         sphinx-autobuild docs build/_build/html
    wizard             python ./scripts/rename_project_content.py
    

    Type task <task_name> to run a task. For example, to run the tests, try task test.

  5. Assert that everything is up and running:

    task qa
    
  6. A helper script is included to rename the git username and project name from the template to your new project, try it with:

    task wizard
    
  7. You can now review the changes, stage, and commit them on your repo. Run task qa another time to assert everything is still all right.

Copyright and License

© 2024 Joel Van Eenwyk. © 2023 Felipe N. Schuch.

All content is under MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git_repository_review-0.1.0a0.tar.gz (6.5 kB view hashes)

Uploaded Source

Built Distribution

git_repository_review-0.1.0a0-py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page