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

Naming of ifmax actions #133

Merged
merged 4 commits into from
Feb 22, 2018
Merged

Naming of ifmax actions #133

merged 4 commits into from
Feb 22, 2018

Conversation

jgosmann
Copy link
Collaborator

Motivation and context:
Allows the naming of ifmax actions by providing an optional string as first argument to ifmax.

Furthermore, ActionSelection implements the dictionary interface. This allows to get the names with the keys() method (in some context the result might need an explicit cast to list(action_sel.keys())). Actions without a name will be assigned an integer index in this sequence. ActionSelection can either be indexed with the string names or integer indices to retrieve the corresponding utility input nodes.

Closes #132.

Interactions with other PRs:
#68 should be rebased once this PR has been merged.

How has this been tested?
Added a test.

How long should this take to review?

  • Average (neither quick nor lengthy)

Types of changes:

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have read the CONTRIBUTING.rst document.
  • [n/a] I have updated the documentation accordingly.
  • [n/a] I have included a changelog entry.
  • I have added tests to cover my changes.
  • I have run the test suite locally and all tests passed.

If it fails all further ActionSelection contexts would raise an
exception. This is a problem when running tests where this exception
is raised on purpose or interactive environments.
@jgosmann jgosmann added this to the 0.4 release milestone Feb 21, 2018
@jgosmann jgosmann requested a review from Seanny123 February 21, 2018 21:17
Copy link
Collaborator

@Seanny123 Seanny123 left a comment

Choose a reason for hiding this comment

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

LGTM. Committed some minor changes with the hope of helping code readability. If those changes are fine, go ahead and merge.

@jgosmann jgosmann self-assigned this Feb 21, 2018
@jgosmann
Copy link
Collaborator Author

Squashed, fixed grammar, and added a commit to make CI tests pass. Will merge upon successful completion.

@Seanny123
Copy link
Collaborator

FYI, the TravisCI tests have passed.

@jgosmann jgosmann merged commit a2f37fd into master Feb 22, 2018
@jgosmann jgosmann deleted the naming branch February 22, 2018 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants