mill.pythonlib

package mill.pythonlib

Experimental 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

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 PipModule
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 PipModule
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
trait PipModule extends Module

Basic tasks for preparing a python interpreter in a venv with required dependencies installed.

Basic tasks for preparing a python interpreter in a venv with required dependencies installed.

Attributes

Companion
object
Source
PipModule.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 PythonTests
trait RuffModule
object RuffModule
trait Pytest
trait Unittest
Show all
object PipModule

Attributes

Companion
trait
Source
PipModule.scala
Supertypes
class Object
trait Matchable
class Any
Self type
PipModule.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 PipModule
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

Attributes

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

Attributes

Companion
trait
Source
PythonModule.scala
Supertypes
class Object
trait Matchable
class Any
Self 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 PipModule
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes
object RuffModule

Attributes

Companion
trait
Source
RuffModule.scala
Supertypes
trait RuffModule
trait PythonModule
trait PipModule
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

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
object TestModule

Attributes

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

Exports

Defined exports

final val Developer: Developer
Exported from PublishModule

Attributes

Source
exports.scala
final type Developer = Developer
Exported from PublishModule$

Attributes

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

Attributes

Source
exports.scala
final type License = License
Exported from publish

Attributes

Source
exports.scala
Exported from PublishModule

Attributes

Source
exports.scala
final type PublishMeta = PublishMeta
Exported from PublishModule$

Attributes

Source
exports.scala