Skip to content

Conversation

@dtribose
Copy link
Contributor

@dtribose dtribose commented Dec 5, 2019

Pull request to demonstrate a possible change in file organization and imports. Includes a change in class name from bifs to Bifs (for clarity and PEP-8), clean up of import files, fix spelling in comments, eliminate import '*', normalization the use of QTMessageBox, changed bifs imports to be relative to package, added packaging artifacts to .gitignore, move bifs_gui.py into it's own subdirectory

For now moved bifs_gui.py to a sub-directory of bifs called /gui. I don't know if this is needed, but it seemed to simplify the import process.
@RossBoylan @kyoung21b

dtribose and others added 8 commits November 25, 2019 14:17
modules into the bifs/bifs directory. However,
moved bifs_gui.py to the bifs\gui\ directory.
Now use full path on project imports,
e.g bifs.bifs_utils.utils. Removed stray comment
from __init__.py. Added distribution artifacts
to .gitignore. Cleaned up unused imports. Modified
from pylab import *, to from pylab import where, cm.
It was only using one or two modules and the '*'
import was masking imports of numpy, sys, etc.
Fixed spelling mistakes in comments. Changed
class bifs to class Bifs, to be in line with PEP8;
this change also makes the imports clearer.
Made the usage of QMessageBox more uniform: There
was a mix of using QtWidgets.QMessageBox and just
using QMessageBox. Standardized on the former.
Fixed init_image_slice (and similar code, so that
it is initialized to None - So if there is an error
and it just prints out a message, it will not execute
the code that displays this object nor access
a non-existent object's method(s).
Fixed rst formatting issues in README.rst so setup.py
and pycharm were both happy with it. Moved the image
files into the main bifs module with the goal of
making it easier to access from the code. Updated
setup.py and added new section for classifications, data
files, etc. Added a setup.cfg for build process defaults.
it does not conflict with package name. Utilize
pkg_resources to get locatio of date files after
install, and it works within development too.
Added plt.plot() to bifs_cl_2D & 3D.py to show
images before program closes. Enabled access to
script and added entry point. Modified script
to have a main() function.
like code and pycharm. Removed duplicate .venv entry.
Added package_dir to setup.py. Used package_ = find_package()
to get package list. Cleaned up a few comments in setup.py.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant