dss-extensions / dss-extensions/dss_capi
API: Consider using explicit enums for parameters
- Dominant language
- Pascal
- Stars
- 39
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
Today the C header is successfully processed for the Julia (https://github.com/dss-extensions/OpenDSSDirect.jl/pull/58), MATLAB (built-in) and Python (through pycparser/CFFI) interfaces. All of them seem to handle enumeration types without issues, automatically. The .NET interface can handle it with some changes (use `MarshalAs`), and JavaCPP (planned for a future JVM release) also supports enums (both plain and C++ typed-enums).
This complements the API part of #45 (which also proposes using scoped enums throughout the internal code too).
To do:
- [ ] Update some functions (in Pascal) and header (C) to use enums
- [x] Test with Julia
- [ ] Test with MATLAB
- [x] Test with Python
- [ ] If successful, update the rest of the functions
This should be started right after the new base for 0.11.x code is merged, preferably in a dedicated branch as it affects mainly the API code. Some enums can be added to the internal code too, if missing.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Pascal API functions and C header mentioned in the issue after the 0.11.x base is merged. Review the existing Julia and Python enum handling, then test the proposed enum changes with MATLAB and the remaining API functions; done means the interfaces process the updated enums successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, julia, matlab, python
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100