Implement usethis tool tach for architecture enforcement#1639
Implement usethis tool tach for architecture enforcement#1639
usethis tool tach for architecture enforcement#1639Conversation
Add Tach tool integration that: - Creates tach.toml configuration with layers inferred from import graph - Adds tach as a dev dependency - Configures pre-commit hook for tach check - Registers tach in the arch toolset alongside Import Linter - Adds CLI command: usethis tool tach Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/e208815b-6629-4e78-aaad-bc82cbedace0 Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
…or tach Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/e208815b-6629-4e78-aaad-bc82cbedace0 Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
usethis tool tach for architecture enforcement
|
@copilot failing static checks, please fix |
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/ddb46dff-7a44-4df4-b2c2-2f5d1208a964 Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Merging this PR will degrade performance by 6.1%
Performance Changes
Comparing Footnotes |
…d use_tach tests Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/aa9351bc-3fdf-4933-8e5d-48f36e6c7245 Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
|
@copilot tests are failing, please fix. Details=================================== FAILURES =================================== self = <tests.usethis._core.test_list.TestGetUsageTable object at 0x7fc5307e2980>
E AssertionError: assert UsageTable(ro...us='unused')]) == UsageTable(ro...us='unused')]) expected = UsageTable(rows=[UsageRow(category='tool', name='Codespell', status='unused'), UsageRow(category='tool', name='Coverag... UsageRow(category='config', name='docstyle', status='unused'), UsageRow(category='', name='README', status='unused')]) tests/usethis/_core/test_list.py:51: AssertionError self = <tests.usethis._core.test_list.TestGetUsageTable object at 0x7fc5307e0d00>
E AssertionError: assert UsageTable(ro...us='unused')]) == UsageTable(ro...us='unused')]) expected = UsageTable(rows=[UsageRow(category='tool', name='Codespell', status='unused'), UsageRow(category='tool', name='Coverag... UsageRow(category='config', name='docstyle', status='unused'), UsageRow(category='', name='README', status='unused')]) tests/usethis/_core/test_list.py:80: AssertionError self = <tests.usethis._core.test_list.TestGetUsageTable object at 0x7fc5307e33a0>
E AssertionError: assert UsageTable(ro...atus='used')]) == UsageTable(ro...atus='used')]) expected = UsageTable(rows=[UsageRow(category='tool', name='Codespell', status='unused'), UsageRow(category='tool', name='Coverag...), UsageRow(category='config', name='docstyle', status='unused'), UsageRow(category='', name='README', status='used')]) /home/runner/work/usethis-python/usethis-python/tests/usethis/_core/test_list.py:106: AssertionError self = <tests.usethis._tool.impl.base.test_pyproject_toml.TestOtherTools object at 0x7fc52fabdfc0>
E AssertionError: assert {'codespell',...-commit', ...} == {'codespell',...-commit', ...} self = <tests.usethis._tool.impl.base.test_pyproject_toml.TestOtherTools object at 0x7fc52fabdfc0> tests/usethis/_tool/impl/base/test_pyproject_toml.py:15: AssertionError Full diff:
Full diff:
Full diff:
Extra items in the right set: Full diff:
=====================================================================================
|
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/648cbd60-d4f8-4ff6-90e2-c8983493108a Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
... Fixed in 6df8bdd — two issues:
|
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/a84a6dac-86cc-4e67-a370-bf8466435f37 Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
@copilot The |
src/usethis/_tool/impl/spec/tach.py- Tach tool specification (config, deps, pre-commit)src/usethis/_tool/impl/base/tach.py- Tach tool implementationTachTOMLManagertosrc/usethis/_config_file.pyfortach.tomlfile managementTachToolinsrc/usethis/_tool/all_.pyuse_tach()function tosrc/usethis/_core/tool.pytachCLI command tosrc/usethis/_ui/interface/tool.pytests/usethis/_tool/impl/base/test_tach.py(100% coverage on spec+base)use_tach()intests/usethis/_core/test_core_tool.py(add, config, pre-commit, remove, how).importlintercontracts to include tach modulesAGENTS.mdanddocs/module-tree.txtsyncuse_tachandtachCLI functionsdocs/functions.txtand AGENTS.md sync blocks_toolset/arch.py— tach is an alternative to import-linter, not a complement"tach"in_HOOK_ORDERin_integrations/pre_commit/hooks.pyTachTooltoOTHER_TOOLSinpyproject_toml.pyand update usage table test expectationsResolves #1254
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.