Git Product home page Git Product logo

python-gui-project-template's Introduction

Python project template

No matter what kind of project you plan to do (Django/Flask web app or pure-python CLI tool) the Python project template brings you the best practices in code style, code quality, and automation. Enjoy the development of your new project ๐Ÿ–๏ธ

Features

  • Automated with make development environment:
    • Creating virtualenv
    • Installing requirements
    • Code-style checking with isort and black
    • Linting with prospector (mypy, pylint, pycodestyle, Pyflakes, Mccabe, Dodgy, Pydocstyle, bandit)
    • Unit testing
    • Coverage checking
    • Docker Compose up/down
    • Running the app
    • Cleaning up workdir
  • GitHub Actions workflow
  • Dockerfile & docker-compose

Pre-requirements

  • It's usually good idea to use pyenv
  • Poetry version 1.2.0 or higher

Usage

  • Use the repo as a GitHub template OR:
    • Clone the repo.
    • Change git origin to your new git repo.
  • Run make for the help message.

For example make check will do:

  • create virtualenv (if it doesn't created yet)
  • install requirements (if it doesn't installed yet)
  • install dev requirements (if it doesn't installed yet)
  • run isort --check --diff
  • run black --check --diff
  • run prospector
  • run mypy
  • run unit tests

GitHub Actions use the same (make check) command to check pull requests

Pre-commit hooks

Install pre-commit hooks with poetry run pre-commit install command.

ToDo

GUI Design Guide

Documentation

PySide6 Tutorial

Setting up Qt Designer and UI Compilation

To be able to simplify development, it is recommended to install the VS Code Extension "Qt for Python". The main advantage that this extension gives is quick access to the designer and eventual compilation of the GUI to Python code. After the installation there will be two new important options if you right click a .ui-file:

  • Compile Qt UI File (uic)
  • Edit Qt UI File (designer)

Both these tools are installed as part of the PySide6-package and is available where the package is installed. This repo is configured to store the virtual environment in the project folder under .venv and this is also where the binaries are stored. The paths should already be set up in the .vscode/settings.json-file.

python-gui-project-template's People

Contributors

daddy-shark avatar golgor avatar

python-gui-project-template's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.