Skip to content
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

Convert console logging to Python logging module with file logging output #1

Open
1 task
nickrsan opened this issue Aug 14, 2020 · 3 comments
Open
1 task
Assignees

Comments

@nickrsan
Copy link
Member

@mlmaskey and @msdogan just FYI, a bunch of things.

I forked CALVIN to the WSM GitHub org as well, so I'm working from there - I'll still merge changes across to CWS, but I'm deploying new infrastructure for it here (such as an automatic documentation builder that makes this)

I already made some changes to the CALVIN code so that it can write log entries out to the screen and the file at the same time. Right now, it only handles it that way for the CALVIN class, not for postprocessing, but it's a start - it's a bit more of a challenge to do it the right way with the postprocessing being separate. I'll consider how to handle that, but we're partway there.

I also started making some changes to the structure of the code so that it can ultimately become a package that people can install via pip and keep up to date instead of copying the code around to different projects. That will need to be tracked in a separate issue, but I wanted to mention it.

Remaining work on converting logging:

  • Postprocessing outputs should go to the same log file and use the same logging mechanism.
@nickrsan nickrsan self-assigned this Aug 14, 2020
@msdogan
Copy link

msdogan commented Aug 16, 2020

Hi @nickrsan, thanks for all those changes. For hydropower model I developed (separate than CALVIN but similar structure), I created another function under like big CALVIN class instead of having a separate script. https://github.com/msdogan/hydropower_model/blob/master/model/hydropower.py

Also, is it possible to create a pull request and merge to existing CALVIN master instead of pushing? That way @jdherman can see/review what changes we are making. Thanks a lot!

@nickrsan
Copy link
Member Author

Good idea on the pull requests - I'll alert Jon to what I've already pushed and ask him to review as well.

@mlmaskey
Copy link

That sounds good to me..

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

No branches or pull requests

3 participants