- Uusi catalog-moduuli: palveluyksikkö → (palvelu) → työtehtävä ilman hintoja. - Pohjatiedot-sivu /catalog/ pääkäyttäjälle ja johdolle (oikeus catalog.manage): lisäys ja muokkaus dialogissa, Siirrä ylös / Siirrä alas, käytöstä poisto ja käyttöön otto. Fokus ja aria-live-ilmoitus jokaisen muutoksen jälkeen. - Rivejä ei poisteta. Käytöstä poistetun yläkohdan alla olevat rivit säilyttävät oman tilansa, mutta eivät ole valittavissa. Nimi on yksilöllinen samalla tasolla kirjainkoosta riippumatta. - Työtehtävän voi siirtää saman yksikön toiseen palveluun tai suoraan yksikön alle. - Luvun 11.1 lista data-migraationa (0002_seed), jos taulut ovat tyhjiä. - CatalogQueries: work_type_options, active_service_units ja get_work_type tehtäviä ja tuntikirjausta varten. - Import-linter-sopimukset, suomennokset, yksikkö-, integraatio- ja selaintestit. - Päivitetty CLAUDE.md ja määrittelyn kohta 16.3. Co-Authored-By: Claude Opus 5.5 <[email protected]>
146 lines
3.8 KiB
TOML
146 lines
3.8 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",
|
|
]
|
|
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 = "Presentation does not use infrastructure directly"
|
|
type = "forbidden"
|
|
source_modules = [
|
|
"apps.users.presentation",
|
|
"apps.customers.presentation",
|
|
"apps.catalog.presentation",
|
|
]
|
|
forbidden_modules = [
|
|
"apps.users.infrastructure",
|
|
"apps.customers.infrastructure",
|
|
"apps.catalog.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 = "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",
|
|
]
|