Description
From the maintainer Li Haoyi: I'm putting a 4000USD bounty on this issue, payable by bank transfer on merged PRs implementing this. Standard bounty terms apply
Python is common in industry, and lacks good build tools. Mill could a be a good tool to help manage large multi-module Python projects (see What Makes Mill Unique?) providing automatic caching and parallelism for the various workflows (dependency resolution, typechecking, testing, packaging, publishing) that are core to the local development experience to help keep them fast and responsive.
The goal of this ticket is to generate a set of Python build examples that match the Java/Scala/Kotlin equivalents. We already have an example PythonModule for demo purposes, but we would need to flesh it out using the equivalent Python tools and libraries.
For the purposes of this ticket, each examples should match as closely as possible the Java/Scala/Kotlin equivalents, to provide a useful minimal-but-still-educational code example, along with associated english documentation and explanations. You should read through the relevant sections of the Building Java with Mill documentation before proceeding, even if you don't know Java, just to get a feel for what the documentation and examples for each section should cover.
-
example/pythonlib/basic/
(500USD)-
1-simple/
: A minimal Python module demonstrating typechecking/running/testing/pex- We should also demonstrate how to use the Python REPL hooked up to your module
-
2-custom-build-logic/
: A Python module with custom build logic -
3-multi-modules/
: Multiple inter-related Python modules
-
-
example/pythonlib/dependencies/
(500USD)-
1-pip-deps/
-
2-unmanaged-wheels/
-
3-downloading-unmanaged-wheels/
-
4-repository-config/
: examples of how to use alternate PyPI mirrors or repositories
-
-
example/pythonlib/linting/
(1000USD)1-black/(ruff handles this): equivalent to
1-scalafmt` but using Black-
2-code-coverage/
: not sure what the popular Python code coverage lib is, but they should have something -
3-ruff/
: using Ruff to lint the Python code
-
example/pythonlib/module/
(500USD)-
1-common-config/
-
2-custom-tasks/
-
3-override-tasks/
-
4-compilation-execution-flags/
-
5-resources/
-
6-pex-config/
-
-
example/pythonlib/testing/
(500USD)-
1-test-suite/
: we should have examples of Python being used with at least two different testing frameworks:pytest
andunittest
-
2-test-deps/
-
3-integration-suite/
-
-
example/pythonlib/publishing/1-publish-module/
,example/pythonlib/basic/4-realistic/
(500USD)-
publishing/1-publish-module
should demonstrate how to publish a Python package to PyPI -
basic/4-realistic
is only doable after all the previous bullets are done, so I'm grouping its bounty together withpublishing/
-
-
example/pythonlib/web/
(500USD)-
1-hello-flask/
: hello world website using Flask framework -
2-todo-flask/
: TodoMVC webapp using Flask framework
-
-
example/pythonlib/web/
(500USD)-
3-hello-django/
:hello world website using Django framework -
4-todo-django/
: TodoMVC webapp using Django framework
-