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

fix typos in logger doc strings #178

Merged
merged 2 commits into from
Mar 25, 2021
Merged

Conversation

cswarth
Copy link
Contributor

@cswarth cswarth commented Mar 25, 2021

class Logger()

Class for logging whylogs statistics.

Arguments:

  • session_id: The session ID value. Should be set by the Session boject
  • dataset_name: The name of the dataset. Gets included in the DatasetProfile metadata and can be used in generated filenames.
  • dataset_timestamp: Optional. The timestamp that the logger represents
  • session_timestamp: Optional. The time the session was created
  • tags: Optional. Dictionary of key, value for aggregating data upstream
  • metadata: Optional. Dictionary of key, value. Useful for debugging (associated with every single dataset profile)
  • writers: Optional. List of Writer objects used to write out the data
  • with_rotation_time: Optional. Combined with interval to create a new output log file at regular intervals,
    "s" for seconds, "m" for minutes, "h" for hours, "d" for days
    Output filename will have a suffix reflecting the rotation interval.
  • interval: Rotation interval multiplier, defaults to 1.
  • verbose: enable debug logging
  • cache_size: dataprofiles to cache
  • segments: define either a list of segment keys or a list of segments tags: [ {"key":<featurename>,"value": <featurevalue>},... ]
  • profile_full_dataset: when segmenting dataset, an option to keep the full unsegmented profile of the dataset.
  • constraints: static assertions to be applied to streams and summaries.

@coveralls
Copy link

coveralls commented Mar 25, 2021

Pull Request Test Coverage Report for Build 685207936

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.08%) to 84.26%

Totals Coverage Status
Change from base Build 681167966: -0.08%
Covered Lines: 3091
Relevant Lines: 3527

💛 - Coveralls

Copy link
Contributor

@andyndang andyndang left a comment

Choose a reason for hiding this comment

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

LGTM

@sourcery-ai
Copy link

sourcery-ai bot commented Mar 25, 2021

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.34%.

Quality metrics Before After Change
Complexity 6.13 ⭐ 6.11 ⭐ -0.02 👍
Method Length 52.87 ⭐ 52.35 ⭐ -0.52 👍
Working memory 10.20 😞 10.16 😞 -0.04 👍
Quality 67.44% 🙂 67.78% 🙂 0.34% 👍
Other metrics Before After Change
Lines 515 511 -4
Changed files Quality Before Quality After Quality Change
src/whylogs/app/logger.py 67.44% 🙂 67.78% 🙂 0.34% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
src/whylogs/app/logger.py Logger.log_local_dataset 12 🙂 144 😞 12 😞 48.43% 😞 Try splitting into smaller methods. Extract out complex expressions
src/whylogs/app/logger.py Logger.flush 18 🙂 100 🙂 11 😞 50.67% 🙂 Extract out complex expressions
src/whylogs/app/logger.py Logger._rotate_time 8 ⭐ 143 😞 12 😞 52.20% 🙂 Try splitting into smaller methods. Extract out complex expressions
src/whylogs/app/logger.py Logger.__init__ 2 ⭐ 119 🙂 20 ⛔ 52.23% 🙂 Extract out complex expressions
src/whylogs/app/logger.py Logger.log_segment_datum 15 🙂 74 🙂 12 😞 55.06% 🙂 Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

@andyndang andyndang merged commit 7601d22 into whylabs:mainline Mar 25, 2021
@cswarth cswarth deleted the logger_docs branch March 25, 2021 22:05
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

Successfully merging this pull request may close these issues.

None yet

3 participants