Skip to content
This repository has been archived by the owner on Nov 26, 2021. It is now read-only.

[RFC] Some clarifications for plotting code #238

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

bjackman
Copy link
Contributor

I've been confused a few times while using the plotting code. This is a set of docstrings and cleanups that I made while trying to understand it. I've marked this RFC because:

  • it's very likely some of the stuff I've added is wrong or belongs somewhere else (i.e. it needs careful review from people who properly understand the code)
  • Some of it is a bit subjective

So I guess consider this low-priority :)

Brendan Jackman added 9 commits January 17, 2017 15:50
PEP8 doesn't seem to be clear on how this should be indented. However I feel
pretty sure that breaking lines inside a destructuring expression (i.e. after
the comma here) would be confusing to the majority of programmers.
I don't really understand this code but AFAICT you can plot the same column from
multiple traces, i.e. len(columns) == 1 and len(traces) != 1. Not sure what role
templates has here.
These two params have equivalent roles for plotting traces and DataFrames
respectively. Move them next to each other in the docstring to make it more
likely that users will notice this symmetry and understand the API.
- Rename `val` to `count`. This variable is a cadinality i.e. the length of a
  list. To me, `val` suggests an element of a list.
- Add to docstring to explain intention of the function
@sinkap sinkap self-requested a review February 19, 2017 11:41
@sinkap sinkap self-assigned this Feb 19, 2017
@sinkap
Copy link
Collaborator

sinkap commented Feb 19, 2017

LGTM and thanks for this!

TODO is the following correct?
Permute(
Len[traces] != 1
Len[columns] = 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, this is correct and should work when the same column is present in all the events (templates). I agree templates was a really bad name for the variable :(

Copy link
Contributor Author

@bjackman bjackman Feb 20, 2017

Choose a reason for hiding this comment

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

Great, I'll remove the "TODO" and amend. I've figured out what templates is (I think it's explained in another function) so perhaps I can add a comment for that too :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, shouldn't templates have length 1 here? I.e. you have multiple traces; if they're DataFrames that all have a certain column then columns should have length 1, and if they're FTraces that all have a certain event then templates should have length 1?

@sinkap sinkap force-pushed the master branch 3 times, most recently from 6f40d93 to a84dd23 Compare June 14, 2017 21:41
valschneider pushed a commit to valschneider/trappy that referenced this pull request Sep 28, 2018
…-change

Executor & LisaTest interface change
valschneider pushed a commit to valschneider/trappy that referenced this pull request Sep 28, 2018
valschneider pushed a commit to valschneider/trappy that referenced this pull request Sep 28, 2018
Since ruamel.yaml issue ARM-software#238 is partially resolved, this code does not
break the deserialization anymore.
valschneider pushed a commit to valschneider/trappy that referenced this pull request Sep 28, 2018
Avoid using __setstate__ for now on recursive structures
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.

2 participants