This is the test for AgFlow backend developer position.
The implementation emphasized clarity, generality and elegance over raw performance.
You may check the code file ruleset.py
and read the code along with the comments to get an idea of the coding and solution style.
Note how terse and expressive the solution is, and how closely if follows the associated class documentations.
The provided solution is also very powerful and general as it could easily be extended to allow for an arbitrary set of rule types (other than the specified ones of dependency and conflict).
To run, simply clone repository to any directory and then from that directory run:
python3 -m unittest discover
The output should be something like:
........
----------------------------------------------------------------------
Ran 8 tests in 0.001s
OK
For any comments, questions or clarifications, please contact the author at <rabih.kodeih@gmail.com>
.