carpentries / styles

Styles for The Carpentries lessons. No README to avoid merge conflicts with lessons. Demo 👇
https://carpentries.github.io/lesson-example
Other
84 stars 94 forks source link

bin/util.py: Factor out reporter class. Define __all__ #596

Closed maxim-belkin closed 3 years ago

maxim-belkin commented 3 years ago

The PR factors out the Reporter class into its own file. This should make util.py a bit easier to parse. --- The second change (defining __all__ in util.py) allows to use from util import * to import the elements defined in __all__.

maxim-belkin commented 3 years ago

@zkamvar @fmichonneau, OK for me to merge this one? (are there any questions or concerns?) I'd like to restructure our Python code a little bit and maybe convert it into a Python module (which we can pip install carpentries-<something>) down the road.

zkamvar commented 3 years ago

I am all for splitting apart large scripts in to smaller modules! TIL about the __all__ list in python: https://docs.python.org/3/tutorial/modules.html#importing-from-a-package

zkamvar commented 3 years ago

Thank you, Maxim!

maxim-belkin commented 3 years ago

Thank you, Zhian!