Pyjoyment.Command.Author.generate.pyproject - pyproject.toml generator command

Usage: APPLICATION generate pyproject [OPTIONS]

  ./myapp.py generate pyproject
  pyjo generate pyproject

Options:
  -h, --help   Show this summary of available options

Pyjoyment.Command.Author.generate.pyproject generates pyproject.toml files for applications, with their dependencies and no build system, as uv init --app does, so that uv sync installs the dependencies without the application. The name of the project is the one of the current directory, and where it has a directory t, the dependency group dev has pytest and pytest-xdist, which uv sync installs and generate dockerfile leaves out, testpaths of pytest names t and pythonpath the current directory, so that uv run pytest runs its test scripts with Pyjo.Test.pytest_plugin, and its tests find the application.

This is a core command, that means it is always enabled and its code a good example for learning to build new commands, you’re welcome to fork it.

See Pyjoyment.Commands for a list of commands that are available by default.

See also

Pyjoyment, https://mojolicious.org.

Ported from Mojolicious::Command::Author::generate::makefile of Mojolicious 9.49.

Classes

class Pyjoyment.Command.Author.generate.pyproject.Pyjoyment_Command_Author_generate_pyproject(**kwargs: Any)[source]

Pyjoyment.Command.Author.generate.pyproject inherits all attributes and methods from Pyjoyment.Command and implements the following new ones.

description = 'Generate "pyproject.toml"'
description = pyproject.description
pyproject.description = 'Foo'

Short description of this command, used for the command list.

run(*args: str) → None[source]
pyproject.run(*sys.argv[1:])

Run this command.

usage = 'Usage: APPLICATION generate pyproject [OPTIONS]\n\n  ./myapp.py generate pyproject\n  pyjo generate pyproject\n\nOptions:\n  -h, --help   Show this summary of available options\n'
usage = pyproject.usage
pyproject.usage = 'Foo'

Usage information for this command, used for the help screen.