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

Add ability to auto-skip prompting for value of parameter data when not found automatically #55

Open
atanisoft opened this issue May 29, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@atanisoft
Copy link

In some cases users will have the KiCad integration enabled on the Inventree side and have virtual parameters defined on parts for such usages. If we do not declare these as part of categories.yaml then we get a warning for mismatch, if we do define it in categories.yaml then we are subjected to prompting (default behavior) when the value can not be determined automatically.

It would be ideal if we could declare the category as:

    Antennas:
        _parameters:
            - Frequency
            - Gain (dBi)
            - Impedance
            - Rated Power
        _optionalParameters:
            - Symbol Type          

Or similar notation that would allow defining of a parameter on the parts to collect if found but skipped when not found. The parameter should still be created on the relevant parts regardless of a value being assigned during import. Optionally the tool could dump a list of parts that have optional parameters that could not be resolved (similar to the current incomplete import but calling it out for optional parameters).

@30350n
Copy link
Owner

30350n commented May 29, 2024

Wouldn't it be better to define this on a per parameter basis then? I.e. in parameters.yaml?

Something like a _assign setting, with always (default, current behavior), optional (assign if available, ignore if not) and never (create, but ignore this parameter). We could even add a 4th manual setting, which forces setting the parameter manually if in interactive mode (not sure if that'd get too confusing though).

Optionally the tool could dump a list of parts that have optional parameters that could not be resolved (similar to the current incomplete import but calling it out for optional parameters).

Imo, if they are already marked optional, you shouldn't get a warning if they aren't set ... because that's like .. the whole point.

@30350n 30350n self-assigned this May 29, 2024
@30350n 30350n added the enhancement New feature or request label May 29, 2024
@atanisoft
Copy link
Author

Wouldn't it be better to define this on a per parameter basis then? I.e. in parameters.yaml?

You are probably right on that, it would mean potentially less updates to declare a single parameter name as optional / ignoreable there rather than in the categories.yaml.

if they are already marked optional, you shouldn't get a warning if they aren't set

Fair point, consider that part dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants