Open albu-diku opened 1 month ago
The restructure looks good and I was just about to merge when I noticed the py2 unit tests failing as described above. Should we move the _make_parameters
helper to a generate_confs_params_spec
in mig.shared.install
and grab it from there for now?
The restructure looks good and I was just about to merge when I noticed the py2 unit tests failing as described above. Should we move the
_make_parameters
helper to agenerate_confs_params_spec
inmig.shared.install
and grab it from there for now?
So I considered that but actually I'd lean towards not yet - I think the "how we might wan this to be" story is still evolving and it's less churn to leave them there and follow-up once we have clearer picture (some extra context here: https://github.com/ucphhpc/migrid-sync/pull/83#discussion_r1687437149).
Not sure if this overlaps with your recent answer, but while experimenting a bit with that move into mig.shared.install
I hit another snag with the py2 unit tests...
Event after make distclean
I hit an ImportError: cannot import name SimpleNamespace
. AFAICT it was not added in the python stdlib until 3.3 so it probably won't fly as such.
Perhaps we could use the following workaround if you really, really want to take the class-way:
https://opendev.org/x/ospurge/commit/c2d1728deedf7e2ca03e6a55f4de59d4d3ab1dde
but otherwise we'd usually just go with a good old plain dict, which seems to be all you really need here.
Not sure if this overlaps with your recent answer, but while experimenting a bit with that move into
mig.shared.install
I hit another snag with the py2 unit tests... Event aftermake distclean
I hit anImportError: cannot import name SimpleNamespace
. AFAICT it was not added in the python stdlib until 3.3 so it probably won't fly as such. Perhaps we could use the following workaround if you really, really want to take the class-way: https://opendev.org/x/ospurge/commit/c2d1728deedf7e2ca03e6a55f4de59d4d3ab1dde but otherwise we'd usually just go with a good old plain dict, which seems to be all you really need here.
Hah yep. The big reason I leaned towards SimpleNamespace as opposed to dict is such that the defaults could be consumed as attributes, but there is so little to SimpleNamespace that I just the handful lines necessary to compat.
Add tests that assert the consistency of options accepted by the generateconfs command line against the internal library function. Additionally assert that the library routine itself matches the defaults structure thus making the structure the definitive source of truth.
Doing so highlighted the following missing command line options which are added as of this commit: --seafile_secret --seafile_ccnetid