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

Support command line options related to part class for CLI #41

Closed
ymh1003 opened this issue Nov 8, 2023 · 3 comments · Fixed by #46
Closed

Support command line options related to part class for CLI #41

ymh1003 opened this issue Nov 8, 2023 · 3 comments · Fixed by #46
Assignees

Comments

@ymh1003
Copy link
Collaborator

ymh1003 commented Nov 8, 2023

Add support for command addpart:
jsonfile addpart [partid1] [partid2] that adds parts with id partid1 and partid2
jsonfile addpart --all that adds all parts in the source
Add support for command rmpart:
jsonfile rmpart [partid1] [partid2]
Add support for command editpart that changes the count for the part specified by its part id:
jsonfile editpart [partid] -c [count]

@ymh1003 ymh1003 self-assigned this Nov 8, 2023
@ymh1003 ymh1003 linked a pull request Nov 10, 2023 that will close this issue
@redrn
Copy link
Collaborator

redrn commented Nov 15, 2023

I saw there is a CountInfo class. I am not sure if this class is necessary. I just merged choices-ui branch into roy-a7 and the count information in that is a dependent property calculated applying UserChoice to ChoiceEffect, from a default base count.

One of the functionalities of your sub command changes the count of a part directly. Under the Choices framework, I am not sure what is the proper way to achieve the intended operation, or if such operation are even meaningful.

@ymh1003
Copy link
Collaborator Author

ymh1003 commented Nov 15, 2023

@sree314 , should we keep the CountInfo class or let count be an attribute for PartInfo class? If the CountInfo class is unnecessary, command jsonfile editpart [partid] --count [num] will just override the count attribute of the part.

@sree314
Copy link
Owner

sree314 commented Nov 15, 2023

The original idea was CountInfo would contain a choice that changes the .count property of PartInfo. This would allow different counts for different choices.

I think for now, let's handle the common case of a fixed count per object. @redrn says something about a default base count, so maybe editpart --count should change that?

@ymh1003 ymh1003 closed this as completed Nov 22, 2023
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 a pull request may close this issue.

3 participants