GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - phipag/python-starter: My personal starter for Python projects.

BranchesTags
Open more actions menu

Latest commit

 

History

13 Commits
13 Commits

Folders and files

NameName
Last commit message
Last commit date
python_starter
python_starter
 
 
tests
tests
 
 
.flake8
.flake8
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
poetry.lock
poetry.lock
 
 
pyproject.toml
pyproject.toml
 
 
tox.ini
tox.ini
 
 

Repository files navigation

python-starter

This is my project structure for new Python projects. It uses the following tools to automate the development process:

  • poetry: Reproducible dependency management and packaging
  • tox: Test and workflow automation against different Python environments
  • pytest: Unittests
  • black: Code formatting
  • isort: Code imports formatting
  • flake8: Code linting
  • mypy: Static type checking

My goal was to provide an easy to start setup with all development good practices implemented.

Where is my setup.py / setup.cfg?

I intentionally did not provide a setup.py / setup.cfg configuration because this package is managed by Poetry's build system. This follows PEP 517 where setuptools is no longer the default build system for Python. Instead it is possible to configure build systems via pyproject.toml. Poetry provides a consistent configuration solely based on the pyproject.toml file. Read more details here: https://setuptools.pypa.io/en/latest/build_meta.html.

Usage

Installation

Install poetry on your machine if not yet installed. Install the project dependencies using:

poetry install

Development process

You can invoke all workflows using the tox CLI:

tox -e format # Format code
tox -e lint # Lint code
tox -e format,lint # Format first and then lint
tox -e python3.10 # Run pytest tests for Python 3.10 environment

# Run all workflows in logical order:
# format -> lint -> pytest against all Python environments
tox

Where to find the Python interpreter path?

It might be useful to find the Python interpreter path for integration with your IDE. Print the path using:

poetry env info --path

For usage from command-line directly run:

poetry run <command> # Will run any command within the Poetry Python virtual environment
poetry shell # Will start a new shell as child process (recommended)
source `poetry env info --path`/bin/activate # Activation in current shell

About

My personal starter for Python projects.

Topics

blackflake8isortmypypoetrypytestpythonpython-startertox

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.