Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: head toward a canonical way to phrase sys.path setup #56

Closed
wants to merge 1 commit into from
Closed

WIP: head toward a canonical way to phrase sys.path setup #56

wants to merge 1 commit into from

Conversation

albu-diku
Copy link

No description provided.

@albu-diku
Copy link
Author

@jonasbardino retrieved this from a couple weeks back ..consider it a draft of boilerplate for nicer module errors.

@jonasbardino jonasbardino added the enhancement New feature or request label May 25, 2024
@jonasbardino
Copy link
Contributor

A very welcome addition, however 👍
It's a simple but elegant way to detect installation / PYTHONPATH issues, while effectively differentiating them from import errors due to actual bugs in our code.

Please remember the copyright header in all new source code files, including ones like the placeholder mig.ident. I think it would actually make sense to perhaps have a string constant or two there (say PACKAGE=migrid or the like) as well.
You can simply copy the header e.g. from shared.base or use the addheader.py helper with minor adjustment for module name and year.

@jonasbardino jonasbardino self-assigned this May 25, 2024
@albu-diku
Copy link
Author

A very welcome addition, however 👍 It's a simple but elegant way to detect installation / PYTHONPATH issues, while effectively differentiating them from import errors due to actual bugs in our code.

Please remember the copyright header in all new source code files, including ones like the placeholder mig.ident. I think it would actually make sense to perhaps have a string constant or two there (say PACKAGE=migrid or the like) as well. You can simply copy the header e.g. from shared.base or use the addheader.py helper with minor adjustment for module name and year.

Sorry just picking up the comment here - should we add a copyright header to a completely empty file? That's honestly why I didn't do it.. there wasn't anything to copyright albeit that might well be "yet".

@jonasbardino
Copy link
Contributor

Well, one can surely argue that it's pedantic and there's little to copyright in a minimal or empty file, but on the other hand the fact that the file is there at all has meaning / value for these package init files. It's not critical here, but sometimes it's just easier to consistently add the same boiler-plate everywhere. Especially when the "yet" part kicks in later and one forgets adding it then :)

@albu-diku albu-diku closed this by deleting the head repository Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants