AeroProblem should throw an error when an unsupported kwarg is passed into the initialization
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
Description
Andrew from AERO740 found that when xref, not xRef is passed into AeroProblem(), the initialization is just fine even though nothing is happening.
I think baseclasses should return an error.
- This could be modifying the AeroProblem python code to check a list of all supported keyword arguments. Return an error if the supplied arg does not exist in the supported keyword arguments.
- Another method could be changing the function signature of the
__init__()to list out all the kwargs.
I am open to hearing other approaches too.
Steps to reproduce issue
Something like
ap = AeroProblem(args=args, unsupportedArg=randomValue)
or rather
ap = AeroProblem(xref=0.5) does not return an error that you're not setting xRef as intended
Current behavior
…
Does not throw an error for unsupported keyword arguments in AeroProblem instantiation.
Expected behavior
…
Throw an error for unsupported keyword argument
Code versions
- Operating System:
- Python:
- OpenMPI:
- CGNS:
- PETSc:
- Compiler:
- This repository:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the AeroProblem Python class and inspect its init entry point, then run the reported xref and unsupportedArg examples. Compare the accepted initialization arguments with the documented names and add coverage for rejecting unsupported keywords. Done means a misspelled or unknown keyword raises an error while supported initialization still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100