-
Notifications
You must be signed in to change notification settings - Fork 58
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
Mode enum #407
Open
Jingyi99
wants to merge
9
commits into
master
Choose a base branch
from
mode_enum
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Mode enum #407
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0fbcfa5
Replace blank power straps mode with empty
Jingyi99 cdad2aa
Merge branch 'master' of https://github.com/ucb-bar/hammer
Jingyi99 46b4868
add Mode Enum class #400
Jingyi99 bbf024e
include 4 mode types, change string comparisons to Enum comparisons
Jingyi99 10d94d0
fixed typo
Jingyi99 ba8f207
Update src/hammer-vlsi/hammer_vlsi/hammer_tool.py
Jingyi99 c2d56e5
Update src/hammer-vlsi/hammer_vlsi/hammer_tool.py
Jingyi99 a82a9b6
fix type hinting comments
Jingyi99 397deb7
add hammer tool class method get_mode_setting
Jingyi99 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to create a static helper method called
ModeType.from_setting
that takes theHammerTool
object and the setting string as args and returns aModeType
. e.g.which would then allow the following change (no need for type hint, either):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not to nitpick too much - at that point I would prefer almost
gds_map_mode = self.get_mode_setting("par.inputs.gds_map_mode")
to avoid a dependency fromModeType
->HammerTool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also like that, perhaps more.