Skip to content

CodewaySA/docker-python3-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker-python3-dev

This is a Python3 image based on codewaysa/python3 (GitHub, Docker Hub) with development tools included.

Tools included in this image:

  • black, the uncompromising code formatter
  • coverage to measure test coverage
  • git to enable installing code from Git repositories
  • httpx useful for unit testing HTTP/2 or async APIs
  • isort to lint imports
  • mypy for static type checking
  • pip to install packages
  • poetry to manage packaging and dependencies
  • PyLint for syntax and style checks
  • pytest for code testing with pytest-cov extension
  • Setuptools to manage and build python packages
  • Sphinx for documentation auto generation
  • tox for test automation
  • wheel for packaging

This image is meant to be used as a base to manually test stuff during development or as part of a CI/CD pipeline.

Sources for this image are published on GitHub and builds are available from Docker Hub.

Gitlab CI integration

If your Python project uses setuptools you could use a .gitlab-ci.yml like this to test and build it:

image: "codewaysa/python3-dev:3.8"

stages:
  - test
  - build

black:
  stage: lint
  script: "black --diff --check src $( ./setup.py --name )"

isort:
  stage: test
  script: "isort --check-only --diff --recursive"

pylint:
  stage: test
  script: "pylint -E $( ./setup.py --name )"

tox:
  stage: test
  script: "tox -e py38"

wheel:
  stage: build
  script: "python3 setup.py bdist_wheel"
  artifacts:
    paths:
    - dist/*.whl

About

Python3 Docker image with development tools

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published