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

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

Merged
merged 7 commits into from
Feb 3, 2025

Conversation

RaphaelHeiniger
Copy link
Collaborator

Usage:

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

@RaphaelHeiniger RaphaelHeiniger added the enhancement New features or code improvements 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
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
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
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
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.

@RaphaelHeiniger RaphaelHeiniger merged commit 321407b into main Feb 3, 2025
30 checks passed
@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 New features or code improvements 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