Open aarchiba opened 1 year ago
I think this could probably be fixed by broadening the check for strings in the Pulsar()
function, but I'm hesitant to add any complication to the already complicated and unusual way it handles its arguments. Would it be okay to simplify the function? Specifically, accept exactly two positional arguments, with a preferred order but the ability to swap them if they are the wrong way around (optionally with a warning), plus some named keyword arguments, plus a **kwargs
to be passed in to the eventual constructor?
I can put together a demo PR, though I can't run the test suite without segfaults (#339).
I can't run the test suite without segfaults
Given what we've seen with the test segfaults, I would assume you could run make lint
and pytest tests/test_pulsar.py
successfully, even if make test
fails. After those run locally, we can count on the CI PR tests to catch anything else.
Python has had for a while dedicated objects for working with paths (allowing things like
if parfile.exists():
ortimfile = parfile.with_suffix("tim")
). Currently at least thePulsar
factory cannot accept these:yields
The user must apply
str
to each before passing them toPulsar()
. It should work fine with these objects.