mill.pythonlib

package mill.pythonlib

Experimental uv-based toolchain for building Python apps using Mill's PythonModule. Supports publishing via pythonlib.PublishModule, linting via pythonlib.RuffModule, and code coverage via pythonlib.CoverageModule,

Attributes

Members list

Type members

Classlikes

A Python module whose source files live directly under moduleDir, without an additional src/ directory.

A Python module whose source files live directly under moduleDir, without an additional src/ directory.

Source files keep their workspace-relative paths on PYTHONPATH. For example, foo/bar.py is importable as foo.bar. Sources owned by nested Python modules are excluded automatically.

Attributes

Source
BarePythonModule.scala
Supertypes
trait PythonModule
trait UvModule
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes
trait Bare

Code coverage via Python's coverage package.

Code coverage via Python's coverage package.

** Note that this is a helper trait, and you are unlikely to use this directly. If you're looking for including coverage across tests in your project, please use CoverageTests instead! **

If you do want to use this module directly, please be aware that analyzing code coverage introduces "non-linear" changes to the execution task flow, and you will need to respect the following contract:

  1. This trait defines a location where coverage data must be saved.

  2. You need to define a coverageTask which is responsible for creating coverage data in the before mentioned location. How this is done is up to you. As an example, the CoverageTests module modifies pythonOptions to prepend a -m coverage command line argument.

  3. This trait defines methods that will a) invoke the coverage task b) assume report data exists in the predefined location c) use that data to generate coverage reports.

Attributes

Source
CoverageModule.scala
Supertypes
trait PythonModule
trait UvModule
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes

Analyze code coverage, starting from tests.

Analyze code coverage, starting from tests.

Attributes

Source
CoverageModule.scala
Supertypes
trait TestModule
trait PythonModule
trait UvModule
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
object PublishModule

Attributes

Companion
trait
Source
PublishModule.scala
Supertypes
class Object
trait Matchable
class Any
Self type
trait PublishModule extends PythonModule

A python module which also defines how to build and publish source distributions and wheels.

A python module which also defines how to build and publish source distributions and wheels.

Attributes

Companion
object
Source
PublishModule.scala
Supertypes
trait PythonModule
trait UvModule
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
object PythonModule

Attributes

Companion
trait
Source
PythonModule.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion
object
Source
PythonModule.scala
Supertypes
trait UvModule
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes
trait Bare
trait RuffModule
object RuffModule
trait Pytest
trait Unittest
Show all
Self type

Attributes

Companion
trait
Source
RuffModule.scala
Supertypes
trait RuffModule
trait PythonModule
trait UvModule
class RootModule0
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Self type
RuffModule.type
trait RuffModule extends PythonModule

Linting and formatting functionality provided by ruff.

Linting and formatting functionality provided by ruff.

Attributes

Companion
object
Source
RuffModule.scala
Supertypes
trait PythonModule
trait UvModule
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes
object RuffModule
object TestModule

Attributes

Companion
trait
Source
TestModule.scala
Supertypes
class Object
trait Matchable
class Any
Self type
TestModule.type

Attributes

Companion
object
Source
TestModule.scala
Supertypes
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes
trait Pytest
trait Unittest
trait UvModule extends Module

Basic tasks for preparing a Python interpreter in a uv-managed virtual environment with the required dependencies installed.

Basic tasks for preparing a Python interpreter in a uv-managed virtual environment with the required dependencies installed.

Attributes

Companion
object
Source
UvModule.scala
Supertypes
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes
trait PythonModule
trait Bare
trait RuffModule
object RuffModule
trait Pytest
trait Unittest
Show all
object UvModule

Attributes

Companion
trait
Source
UvModule.scala
Supertypes
class Object
trait Matchable
class Any
Self type
UvModule.type

Exports

Defined exports

final val Developer: Developer
Exported from PublishModule

Attributes

Source
exports.scala
final val License: License
Exported from publish

Attributes

Source
exports.scala
Exported from PublishModule

Attributes

Source
exports.scala