You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
file discovery using os.path.dirname(__file__) is prone to several issues. One of them is the possibility of encountering errors when the package is installed as an egg. Another set of errors can occur when qmpy is installed on OSs other than Linux.
To fix these issues, we'd need to change the file discovery method from os.path to pkg_resources.resource_filename or similar dedicated package file discovery options
Another work is to be done on adding a pre-commit system to reformat qmpy scripts - possible using the package black
hegdevinayi
changed the title
Pre-commit reformatting and Better method to package discovery and file access
Better package resource discovery
Dec 18, 2020
file discovery using
os.path.dirname(__file__)
is prone to several issues. One of them is the possibility of encountering errors when the package is installed as an egg. Another set of errors can occur when qmpy is installed on OSs other than Linux.To fix these issues, we'd need to change the file discovery method from
os.path
topkg_resources.resource_filename
or similar dedicated package file discovery optionsAnother work is to be done on adding a
pre-commit
system to reformatqmpy
scripts - possible using the packageblack
Thanks to @hegdevinayi for the ideas
The text was updated successfully, but these errors were encountered: