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

Added components to ProcedureStep and Procedure #132

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

Conversation

msubeka
Copy link
Contributor

@msubeka msubeka commented Feb 4, 2022

This change is Reviewable

@msubeka msubeka closed this Feb 4, 2022
@jlsajfj jlsajfj reopened this Feb 4, 2022
Copy link

@jlsajfj jlsajfj left a comment

Choose a reason for hiding this comment

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

debug print statement should be removed
otherwise lgtm

self.components.add(step.action[0])
elif step.action:
print (step.action)
Copy link

Choose a reason for hiding this comment

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

debug print?

@codecov
Copy link

codecov bot commented Feb 4, 2022

Codecov Report

Merging #132 (3144c06) into master (64c7425) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #132      +/-   ##
==========================================
+ Coverage   90.96%   91.01%   +0.04%     
==========================================
  Files          31       31              
  Lines        2403     2414      +11     
  Branches      394      448      +54     
==========================================
+ Hits         2186     2197      +11     
  Misses        182      182              
  Partials       35       35              
Impacted Files Coverage Δ
topside/procedures/procedure.py 96.42% <100.00%> (+0.38%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64c7425...3144c06. Read the comment docs.

Copy link

@jlsajfj jlsajfj left a comment

Choose a reason for hiding this comment

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

LGTM

@jlsajfj jlsajfj requested a review from wendi-yu February 4, 2022 05:02
Copy link
Member

@wendi-yu wendi-yu left a comment

Choose a reason for hiding this comment

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

Mostly looks good, just a quick comment and some formatting stuff :0

Reviewable status: 0 of 2 files reviewed, 4 unresolved discussions (waiting on @jlsajfj, @msubeka, and @wendi-yu)


topside/procedures/procedure.py, line 168 at r1 (raw file):

Previously, jlsajfj wrote…

basically sometimes it'll be a tuple, sometimes it'll be a "StateChangeAction" so we need to account for that

I agree with Joe, but I think we should check for whether our action has a "component" attribute rather than using the tuple accessor of the data class, since this creates a requirement that component has to be the first field if it's in anyAction classes. You should be able to do the check with hasAttr, and then just access the step.action.component field to store it


topside/procedures/procedure.py, line 154 at r3 (raw file):

            to last step.

        Members 

total nitpick but there's a bit of whitespace here, I think format.sh doesn't format comments


topside/procedures/tests/test_procedure.py, line 250 at r3 (raw file):

def test_components():
    s1 = top.ProcedureStep('s1', ('p1', 'open'), [], 'PRIMARY')

Might also want to check how it behaves with steps in a procedure that refer to the same component - it should be fine with your code right now, but adding the test doesn't hurt

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