Create the boilerplate for a generator for domains, with working code to generate linear equations. Creates:
a new folder, domains/, which is a python environment (simple requirements.txt env with Python 3.10.4)
a file generate.py which is a command line tool that can currently be used to generate linear equations and has potential to generate equations of any degree
Tests
Tested manually, generated 100 equations and inspected random ones.
Notes
to generate 100 equations of degree 2 in equations.pkl, call python generate.py --n 100 --degree 2 --output equations.pkl
uses match statement, so needs recent Python
a number of changes will be need to made to make this more extensible, but should be fine for now
command line tool should eventually fill out the config object on line 111
we need better sympy output -> peano output translation on line 131, but this works for linear equations correctly
eventually, TermFormatType should take in templates
Description
Create the boilerplate for a generator for domains, with working code to generate linear equations. Creates:
domains/
, which is a python environment (simplerequirements.txt
env with Python 3.10.4)generate.py
which is a command line tool that can currently be used to generate linear equations and has potential to generate equations of any degreeTests
Tested manually, generated 100 equations and inspected random ones.
Notes
python generate.py --n 100 --degree 2 --output equations.pkl
match
statement, so needs recent Pythonconfig
object on line 111TermFormatType
should take in templates