-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add logging example code for when create_cli==no #39
base: master
Are you sure you want to change the base?
Conversation
Sensitive to logging option (yaml/hocon) Add cell in example.ipynb and sample code in main.py
In reference to the issue mentioned in PR #26, should python files containing cookiecutter syntax be excluded in |
I adjusted I'm still not sure about this PR, because we're adding a lot of complexity here that many of our users might not care for. If you want to continue with this, can you adjust the notebook code in a similar fashion? |
ok, now I'm also not happy with the static config path, because it probably won't work by default for most users (e.g. if you launch it in PyCharm, it will try to find the config relative to main.py and not the project root folder). well... I don't know. If we have the CLI, we can let the user define the path to the config, but in this case, I don't think we're setting a good example by defining a path in the code where the config has to be. |
Yeah, that is the reason why I opted to build the relative path from main.py to the config using I agree that fixing a path in the library is not good design, I thought of it more as an example, so that people would get a hint at how to make use of logging. In that line of reasoning, it would still make sense to have a static path in the notebook, because that is not part of the python package that is being built, and notebooks are always executed from where they are, so the relative path from I also agree that complexity should be kept low, but at the same time we want to encourage good design, which includes logging instead of printing wherever possible. My first experience with the template was just that it didn't paint a clear picture of how to utilize the logger correctly. |
Extended files:
Affected option:
config_file
Chosing
hocon
option creates the following code inmain.py
:and adds this cell content to
example.ipynb
:Chosing
yaml
option creates the following code inmain.py
:and adds this cell content to
example.ipynb
:The path construction to the
config.yml
may not be ideal, but could be fixed when addressing issue #38 .