gauge-sh / tach

A Python tool to enforce dependencies, using modular architecture 🌎 Open source 🐍 Installable via pip πŸ”§ Able to be adopted incrementally - ⚑ Implemented with no runtime impact ♾️ Interoperable with your existing systems πŸ¦€ Written in rust
https://gauge.sh
MIT License
953 stars 33 forks source link

fails `tach check` when circular dependencies #169

Closed tiluckdave closed 1 month ago

tiluckdave commented 1 month ago

Checks for circular dependencois if forbid_circular_dependencies is set to true in tach.yml file.

Fixes #146

tiluckdave commented 1 month ago

How do I create tests for this?

emdoyle commented 1 month ago

How do I create tests for this?

Tests would be awesome. We use the python/tests folder to hold our tests, and we use pytest (or tach test) to run them.

There should be a few good examples there, like this one: https://github.com/gauge-sh/tach/blob/3f91c1da08862473a06118ebf4e33b95f7fd5ee8/python/tests/test_imports.py

which set up project files in a temporary directory and then check that Tach's logic produces the expected results.

Building a few test cases with and without cycles would be fantastic!

tiluckdave commented 1 month ago

@emdoyle Can you please review!

tiluckdave commented 1 month ago

Hey @emdoyle can you please review

tiluckdave commented 1 month ago

@emdoyle I am done with the requested changes.

~ Sorry for the delay. I was unwell for the past week.

caelean commented 1 month ago

@tiluckdave just made a couple final tweaks in #206 - merging this! Thank you so much for the contribution πŸ™