Open dogversioning opened 1 month ago
and then optionally adjust relative module level imports to be package level imports
I actually have a soft spot for relative imports. And fhir-parser generates them for a good reason (it doesn't know the final package names you'll put the code into). But we could certainly tweak fhir-parser to take a config option for that. Or do a post-process ourselves.
But generally, I like relative imports inside a library. Makes everything more portable (in the moving files around sense) and more robust against odd PYTHONPATH situations. But I don't like it so much I'll fight for it.
I think I like package level imports as a form of documentation? but i also don't feel strongly, and the 'this goes into an unknown external package' is a pretty good case against.
As noted on #169 - an import like
from fhirclient.models.bundle import Bundle
is causingpip install .[tests]
to throw a ModuleNotFound error. We should resolve this issue, and then optionally adjust relative module level imports to be package level imports.