- Uusi jobs-moduuli: asiakastyön kentät ilman rahakenttiä, juokseva vuosinumero VVVV-NNNN (laskuririvi lukitaan), tagit, linkit dialogissa, jäsenet ja muutoshistoria nimiarvoineen. - Tilojen oikeudet: lasku luotu / laskutettu johto tai työn laskuttaja, arkistointi vain johto; alihankkija näkee vain jäsenyystyönsä eikä muokkaa. - Lista ja haku (numero, nimi, asiakas), suodattimet, omat työt oletuksena, arkistoidut piilossa, myöhässä tekstinä ja kuvakkeena. - Asiakasvalitsin hakuineen ja pikalisäyksineen (myös pikavastaanottoa varten). - Asiakkaan sivulle asiakastyöt-osio; valikkoon Asiakastyöt. - Lukurajapinnat muihin moduuleihin: UserQueries.choices, CustomerQueries.summaries, CatalogQueries.service_units; jobs.*-oikeudet. - Import-linter-sopimukset, käännökset, testit (domain, application, integraatio, selain) sekä määrittelyn ja CLAUDE.md:n päivitys. Co-Authored-By: Claude Opus 5.5 <[email protected]>
200 lines
5.5 KiB
TOML
200 lines
5.5 KiB
TOML
[project]
|
|
name = "toiminnanohjaus"
|
|
version = "0.1.0"
|
|
requires-python = ">=3.14"
|
|
|
|
[tool.pytest.ini_options]
|
|
DJANGO_SETTINGS_MODULE = "config.settings"
|
|
python_files = ["test_*.py"]
|
|
testpaths = ["apps"]
|
|
addopts = "-p no:cacheprovider --strict-markers"
|
|
markers = [
|
|
"browser: Playwright browser tests (run: pytest tests/browser -m browser)",
|
|
]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py314"
|
|
extend-exclude = ["*/migrations/*", "node_modules", "static"]
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "W", "I", "UP", "B", "DJ", "SIM", "RUF"]
|
|
ignore = ["RUF001", "RUF002", "RUF003", "RUF012", "DJ008"]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.14"
|
|
plugins = ["mypy_django_plugin.main"]
|
|
ignore_missing_imports = true
|
|
exclude = ["migrations/", "tests/"]
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["apps.*.domain.*", "apps.*.application.*"]
|
|
strict = true
|
|
|
|
[tool.django-stubs]
|
|
django_settings_module = "config.settings"
|
|
|
|
[tool.importlinter]
|
|
root_package = "apps"
|
|
include_external_packages = true
|
|
|
|
[[tool.importlinter.contracts]]
|
|
name = "Domain and application layers do not depend on Django"
|
|
type = "forbidden"
|
|
source_modules = [
|
|
"apps.shared.domain",
|
|
"apps.shared.application",
|
|
"apps.users.domain",
|
|
"apps.users.application",
|
|
"apps.customers.domain",
|
|
"apps.customers.application",
|
|
"apps.catalog.domain",
|
|
"apps.catalog.application",
|
|
"apps.jobs.domain",
|
|
"apps.jobs.application",
|
|
]
|
|
forbidden_modules = ["django"]
|
|
allow_indirect_imports = true
|
|
|
|
[[tool.importlinter.contracts]]
|
|
name = "users layers"
|
|
type = "layers"
|
|
layers = [
|
|
"apps.users.container",
|
|
"apps.users.presentation",
|
|
"apps.users.infrastructure",
|
|
"apps.users.application",
|
|
"apps.users.domain",
|
|
]
|
|
ignore_imports = [
|
|
# Composition root and presentation may both see the container.
|
|
"apps.users.presentation.** -> apps.users.container",
|
|
]
|
|
|
|
[[tool.importlinter.contracts]]
|
|
name = "customers layers"
|
|
type = "layers"
|
|
layers = [
|
|
"apps.customers.container",
|
|
"apps.customers.presentation",
|
|
"apps.customers.infrastructure",
|
|
"apps.customers.application",
|
|
"apps.customers.domain",
|
|
]
|
|
ignore_imports = ["apps.customers.presentation.** -> apps.customers.container"]
|
|
|
|
[[tool.importlinter.contracts]]
|
|
name = "catalog layers"
|
|
type = "layers"
|
|
layers = [
|
|
"apps.catalog.container",
|
|
"apps.catalog.presentation",
|
|
"apps.catalog.infrastructure",
|
|
"apps.catalog.application",
|
|
"apps.catalog.domain",
|
|
]
|
|
ignore_imports = ["apps.catalog.presentation.** -> apps.catalog.container"]
|
|
|
|
[[tool.importlinter.contracts]]
|
|
name = "jobs layers"
|
|
type = "layers"
|
|
layers = [
|
|
"apps.jobs.container",
|
|
"apps.jobs.presentation",
|
|
"apps.jobs.infrastructure",
|
|
"apps.jobs.application",
|
|
"apps.jobs.domain",
|
|
]
|
|
ignore_imports = ["apps.jobs.presentation.** -> apps.jobs.container"]
|
|
|
|
[[tool.importlinter.contracts]]
|
|
name = "Presentation does not use infrastructure directly"
|
|
type = "forbidden"
|
|
source_modules = [
|
|
"apps.users.presentation",
|
|
"apps.customers.presentation",
|
|
"apps.catalog.presentation",
|
|
"apps.jobs.presentation",
|
|
]
|
|
forbidden_modules = [
|
|
"apps.users.infrastructure",
|
|
"apps.customers.infrastructure",
|
|
"apps.catalog.infrastructure",
|
|
"apps.jobs.infrastructure",
|
|
]
|
|
allow_indirect_imports = true
|
|
|
|
[[tool.importlinter.contracts]]
|
|
name = "Modules use each other only through application interfaces"
|
|
type = "forbidden"
|
|
source_modules = ["apps.customers", "apps.catalog"]
|
|
forbidden_modules = [
|
|
"apps.users.infrastructure",
|
|
"apps.users.container",
|
|
"apps.users.application",
|
|
]
|
|
ignore_imports = [
|
|
# Integration tests may arrange data with another module's models.
|
|
"apps.customers.tests.** -> apps.users.infrastructure.**",
|
|
"apps.catalog.tests.** -> apps.users.infrastructure.**",
|
|
]
|
|
|
|
[[tool.importlinter.contracts]]
|
|
name = "jobs uses other modules only through application interfaces and containers"
|
|
type = "forbidden"
|
|
source_modules = ["apps.jobs"]
|
|
forbidden_modules = [
|
|
"apps.users.infrastructure",
|
|
"apps.customers.infrastructure",
|
|
"apps.customers.presentation",
|
|
"apps.catalog.infrastructure",
|
|
"apps.catalog.presentation",
|
|
]
|
|
# The jobs container reaches their infrastructure only through their own containers.
|
|
allow_indirect_imports = true
|
|
ignore_imports = [
|
|
# Integration tests may arrange data with another module's models.
|
|
"apps.jobs.tests.** -> apps.users.infrastructure.**",
|
|
"apps.jobs.tests.** -> apps.customers.infrastructure.**",
|
|
"apps.jobs.tests.** -> apps.catalog.infrastructure.**",
|
|
]
|
|
|
|
[[tool.importlinter.contracts]]
|
|
name = "Only the jobs container wires other modules' containers"
|
|
type = "forbidden"
|
|
source_modules = [
|
|
"apps.jobs.domain",
|
|
"apps.jobs.application",
|
|
"apps.jobs.infrastructure",
|
|
"apps.jobs.presentation",
|
|
]
|
|
forbidden_modules = ["apps.users.container", "apps.customers.container", "apps.catalog.container"]
|
|
allow_indirect_imports = true
|
|
|
|
[[tool.importlinter.contracts]]
|
|
name = "Other modules do not depend on jobs"
|
|
type = "forbidden"
|
|
source_modules = ["apps.users", "apps.customers", "apps.catalog"]
|
|
forbidden_modules = ["apps.jobs"]
|
|
|
|
[[tool.importlinter.contracts]]
|
|
name = "customers and catalog are independent"
|
|
type = "independence"
|
|
modules = ["apps.customers", "apps.catalog"]
|
|
|
|
[[tool.importlinter.contracts]]
|
|
name = "users does not depend on customers or catalog"
|
|
type = "forbidden"
|
|
source_modules = ["apps.users"]
|
|
forbidden_modules = ["apps.customers", "apps.catalog"]
|
|
|
|
[[tool.importlinter.contracts]]
|
|
name = "shared layers"
|
|
type = "layers"
|
|
layers = [
|
|
"apps.shared.presentation",
|
|
"apps.shared.infrastructure",
|
|
"apps.shared.application",
|
|
"apps.shared.domain",
|
|
]
|