-
- Downloads
Absolute imports for modules in routines directory
When the plotting routines in postprocessor.routines are imported in a different script or module, it raises an error that indicates that `plottingabc` or `single_plot` are not found. This is because I attempted to use relative imports without accounting for how Python usually imports things, especially in a project with multiple directories and multiple layers. Relative imports can be done via: from .foo import bar But I opted against that in favour of absolute imports (the solution implemented) because it conforms to PEP8. This should not affect anywhere else in the code base as these are the only bits where `plottingabc` and `single_plot` are used.
Showing
- routines/boxplot.py 1 addition, 1 deletionroutines/boxplot.py
- routines/heatmap.py 1 addition, 1 deletionroutines/heatmap.py
- routines/mean_plot.py 1 addition, 1 deletionroutines/mean_plot.py
- routines/single_birth_plot.py 1 addition, 1 deletionroutines/single_birth_plot.py
- routines/single_plot.py 1 addition, 1 deletionroutines/single_plot.py
Please register or sign in to comment