[importlinter]
root_packages =
    usethis

[importlinter:contract:acyclic-siblings]
name = Acyclic Siblings
type = acyclic_siblings
ancestors = usethis

[importlinter:contract:usethis]
name = usethis
type = layers
containers =
    usethis
layers =
    _test | __main__
    _ui
    _toolset
    _core
    _tool
    _init
    _detect
    _deps
    _config_file
    _integrations
    _backend
    _file
    _subprocess | _console | _python
    _config
    _types | errors | _fallback
    _pipeweld
exhaustive = true
exhaustive_ignores =
    _version

[importlinter:contract:ui]
name = usethis._ui
type = layers
containers =
    usethis._ui
layers =
    app
    interface
    options
exhaustive = true

[importlinter:contract:core]
name = usethis._core
type = layers
containers =
    usethis._core
layers =
    badge | docstyle | list | rule
    author | browse | readme | show | status | tool
exhaustive = true

[importlinter:contract:tool]
name = usethis._tool
type = layers
containers =
    usethis._tool
layers =
    all_
    impl
    base
    heuristics
    spec
    config | pre_commit | rule
exhaustive = true

[importlinter:contract:tool_impl]
name = usethis._tool.impl
type = layers
containers =
    usethis._tool.impl
layers =
    base
    spec
exhaustive = true

[importlinter:contract:tool_impl_base]
name = usethis._tool.impl.base
type = layers
containers =
    usethis._tool.impl.base
layers =
    pyproject_toml
    codespell | deptry | import_linter | mkdocs | pyproject_fmt | requirements_txt | tach | ty
    ruff
    pytest : coverage_py
    pre_commit
exhaustive = true

[importlinter:contract:tool_impl_spec]
name = usethis._tool.impl.spec
type = layers
containers =
    usethis._tool.impl.spec
layers =
    pyproject_toml
    codespell | deptry | import_linter | mkdocs | pyproject_fmt | requirements_txt | tach | ty
    ruff
    pytest : coverage_py
    pre_commit
exhaustive = true

[importlinter:contract:integrations]
name = usethis._integrations
type = layers
containers =
    usethis._integrations
layers =
    ci | pre_commit
    environ
    mkdocs | pytest | pydantic | sonarqube
    project | readme
exhaustive = true

[importlinter:contract:_file]
name = usethis._file
type = layers
containers =
    usethis._file
layers =
    pyproject_toml | setup_cfg
    ini | toml | yaml
    manager 
    print_ | dir | merge
    types_ 
exhaustive = true

[importlinter:contract:ui_interface]
name = usethis._ui.interface
type = layers
containers =
    usethis._ui.interface
layers =
    arch | author | badge | browse | doc | docstyle | format_ | hook | init | lint | list | readme | rule | show | spellcheck | status | test | tool | typecheck | version
exhaustive = true

[importlinter:contract:pipeweld]
name = usethis._pipeweld
type = layers
containers =
    usethis._pipeweld
layers =
    func
    result
    containers | ops
exhaustive = true

[importlinter:contract:integrations_ci]
name = usethis._integrations.ci
type = layers
containers =
    usethis._integrations.ci
layers =
    github
exhaustive = true