Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Suppress logging #18

Merged
merged 2 commits into from
Jan 16, 2021
Merged

Conversation

daniel-thom
Copy link
Contributor

The main purpose of this PR is to suppress Info log messages from showing up in the notebook. I think I heard from you guys that you would prefer this behavior. I made the changes in a subset of notebooks. If you agree with the changes then I'll continue with the rest.

I also replaced JSON2 with JSON3.


# ### Read and assign time series to `System` using the `ts_pointers` struct
add_time_series!(sys, ts_pointers)
# ### Read and assign time series to `System` using these parameters.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claytonpbarrows IMHO it is better to keep this simpler. If you do want to expose the intermediate step to users, I'll revert the change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the same, there are too many intermediate steps here for this to be a tutorial

to_json(sys, path)

filesize(path) / 1000000 #MB
filesize(path) / (1024 * 1024) #MiB
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tools like ls usually provide these sizes in base 2, not base 10. 1 Mebibyte = 2^20 bytes

Copy link
Member

@jd-lara jd-lara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @daniel-thom this will make the examples much better. I will see if the same works for the docs too.

Copy link
Member

@claytonpbarrows claytonpbarrows left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Thanks!

@@ -42,7 +42,9 @@ Pkg.status()
using SIIPExamples;
using PowerSystems;
using D3TypeTrees;
IS = PowerSystems.IS
using Logging

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add something like the following:

# PowerSystems provides some control over log messages, [this doc page](https://nrel-siip.github.io/PowerSystems.jl/stable/api/public/#logging) provides more information about how to configure the logger.

@claytonpbarrows claytonpbarrows merged commit 4392959 into NREL-Sienna:master Jan 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants