I mostly adjusted the markdown a bit to make it look nicer (to me), but not everywhere (because it's a lot of work :P). Poke around a bit, because the layout/flow can be improved with a few minor tweaks.
Some thoughts about the instructions:
I added instructions for setting up a virtualenv, and confirmed the first run of theory_generator.py works for me, with Python 3.8.5 on MacOS 10.14.
I was also able to fix the PySDD problem by removing the pysdd line from requirements.txt, and then running
pip install -r requirements.txt and pip install --no-binary :all: --no-deps pysdd in succession. Just FYI, if you want to consider that as an alternative to the instructions you have, so there is no "NOTE" and "if you see this error..." step. :-)
Some thoughts about the impl:
If you use a YAML parser to read your config file, then the JSON+comments block you have in the README can be parsed as-is into a data structure, because YAML comments start with # and JSON is a subset of YAML so the {-braces work just fine. That way you can write those comments in the checked-in config file (renamed to .yaml) which might be nice to have and make the instructions leaner (e.g., just link to the commented YAML file.)
CSV is an underspecified format. (Check out this and this; it's kind of amazing how bad things can get!) So if your hands aren't tied, consider using JSON as the input and output formats. For example, I'm not sure if there's a bug in the file ruletaker_theory1_lf.csv, where a double-quoted string appears to span two lines separated by a Windows two-char CRLF combo, instead of the UNIX single-char carriage return.
Use black to format the Python code for consistency. I just tried it (black theory_generator.py) and it found a bunch of 's to turn into "s, trailing spaces to remove, and indentation inconsistencies to correct.
Here are some minor changes to the README.
I mostly adjusted the markdown a bit to make it look nicer (to me), but not everywhere (because it's a lot of work :P). Poke around a bit, because the layout/flow can be improved with a few minor tweaks.
Some thoughts about the instructions:
I added instructions for setting up a virtualenv, and confirmed the first run of
theory_generator.py
works for me, with Python 3.8.5 on MacOS 10.14.I was also able to fix the PySDD problem by removing the pysdd line from requirements.txt, and then running
pip install -r requirements.txt
andpip install --no-binary :all: --no-deps pysdd
in succession. Just FYI, if you want to consider that as an alternative to the instructions you have, so there is no "NOTE" and "if you see this error..." step. :-)Some thoughts about the impl:
If you use a YAML parser to read your config file, then the JSON+comments block you have in the README can be parsed as-is into a data structure, because YAML comments start with
#
and JSON is a subset of YAML so the{
-braces work just fine. That way you can write those comments in the checked-in config file (renamed to .yaml) which might be nice to have and make the instructions leaner (e.g., just link to the commented YAML file.)CSV is an underspecified format. (Check out this and this; it's kind of amazing how bad things can get!) So if your hands aren't tied, consider using JSON as the input and output formats. For example, I'm not sure if there's a bug in the file ruletaker_theory1_lf.csv, where a double-quoted string appears to span two lines separated by a Windows two-char CRLF combo, instead of the UNIX single-char carriage return.
black theory_generator.py
) and it found a bunch of'
s to turn into"
s, trailing spaces to remove, and indentation inconsistencies to correct.