Skip to content

feat: Add .remove method to deck class (#681)#682

Merged
RaphaelHeiniger merged 7 commits into
mainfrom
add-remove-method-to-deck-class
Feb 3, 2025
Merged

feat: Add .remove method to deck class (#681)#682
RaphaelHeiniger merged 7 commits into
mainfrom
add-remove-method-to-deck-class

Conversation

@RaphaelHeiniger
Copy link
Copy Markdown
Collaborator

Usage:

mydeck = Deck()
mydeck.extend([some keywords])
mydeck.remove(i) or mydeck.remove([i, j, k])

@RaphaelHeiniger RaphaelHeiniger added the enhancement General improvements to existing features label Jan 29, 2025
@RaphaelHeiniger RaphaelHeiniger requested a review from a team as a code owner January 29, 2025 07:57
@RaphaelHeiniger RaphaelHeiniger linked an issue Jan 29, 2025 that may be closed by this pull request
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jan 29, 2025
Copy link
Copy Markdown
Collaborator

@koubaa koubaa left a comment

Choose a reason for hiding this comment

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

Could you please include a test?

@RaphaelHeiniger
Copy link
Copy Markdown
Collaborator Author

Good point, sure I will add one.

@github-actions github-actions Bot added the testing Anything related to testing label Jan 31, 2025
@RaphaelHeiniger
Copy link
Copy Markdown
Collaborator Author

@koubaa I just figured that one can do now deck.remove(...) but on the individual lists e.g. deck.keywords.remove(...) or deck.string_keywords.remove(...) obviously still does not work. Do you think it makes sense to add this functionality as well there or is there already another intended way to to this?

@koubaa
Copy link
Copy Markdown
Collaborator

koubaa commented Jan 31, 2025

@RaphaelHeiniger those aren't lists in themselves, those are just filters applied on the main list. I think what you have done in this PR is probably the best we can do.

Comment thread tests/test_deck.py
@RaphaelHeiniger RaphaelHeiniger merged commit 321407b into main Feb 3, 2025
@RaphaelHeiniger RaphaelHeiniger deleted the add-remove-method-to-deck-class branch February 3, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement General improvements to existing features testing Anything related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add .remove method to ansys.dyna.core.lib.deck class

3 participants