Closed pet-mit closed 2 months ago
When the PR is merged, we should go back to this discussion and open issues based on the various TODOs that were added in the code.
When the PR is merged, we should go back to this discussion and open issues based on the various TODOs that were added in the code.
I took note of these TODOs, I will create the issues
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
891
What kind of change does this PR introduce?
API improvement
What is the current behavior?
Creating a CRAC from a native format is a hassle and is not homogeneous with json format
What is the new behavior (if this is a feature change)? Now Crac.read can read all native crac formats + json format, and Crac.readWithContext can produce a CracCreationContext (containing the Crac). Json importer now also produces a CracCreationContext with basic information, and no longer raises exceptions on errors (information is logged into context instead). Furthermore, NativeCrac and CracCreator APIs have been deleted to simplify the API.
Does this PR introduce a breaking change or deprecate an API?
What changes might users need to make in their application due to this PR? (migration steps)
Users now have to use Crac.read or Crac.readWithContext to import a CRAC object. If they need the CracCreationContext to be of a certain type, they have to cast it.