entangled / entangled.py

Python port of Entangled
Apache License 2.0
33 stars 7 forks source link

Switch to `tomlkit` for parsing and writing toml. #23

Closed jhidding closed 11 months ago

jhidding commented 11 months ago

Currently we're using https://docs.python.org/3/library/tomllib.html to read TOML. We need an external library, preferably tomlkit, since this has read/write support. Write support is also needed for the loom feature.

jhidding commented 11 months ago

For chdir: In entangled/utility.py

try:
   from contextlib import chdir
except ImportError:
  @contextmanager
  def chdir(wd: Path):
      olddir = os.getcwd()
      os.chdir(wd)
      yield wd
      os.chdir(olddir)

and import that in the relevant tests.

edit: no longer relevant