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

Expose API [ANT-1158] #1993

Merged
merged 250 commits into from
Jun 27, 2024
Merged

Expose API [ANT-1158] #1993

merged 250 commits into from
Jun 27, 2024

Conversation

JasonMarechal25
Copy link
Contributor

@JasonMarechal25 JasonMarechal25 commented Mar 14, 2024

Expose Antares Solver in a library. the library and target are called AntaresAPI. This API expose one entry point to run a simulation on a study. The return value of this is a data structure with the path to the simulation and the weekly problems.

  • New component API
  • Create a new project "api_client" and corresponding tests to detect API lib install regressions
  • rename "utils" project in tests as "in-memory-study"
  • promote this project at top level in tests. This allow in-memory-study to be used for any tests
  • create SimulationObserver. Object passed throughout all "frames" of the simulation.

@flomnes flomnes added this to the Sprint 3 milestone Mar 18, 2024
src/tests/src/api/CMakeLists.txt Outdated Show resolved Hide resolved
src/api/API.cpp Outdated Show resolved Hide resolved
src/api/API.cpp Outdated Show resolved Hide resolved
@flomnes flomnes changed the title Expose API Expose API [ANT-1158] Mar 20, 2024
@JasonMarechal25 JasonMarechal25 force-pushed the feature/expose-api branch 3 times, most recently from 079f4bf to cab2675 Compare April 11, 2024 13:14
src/api/include/antares/api/solver.h Outdated Show resolved Hide resolved
src/ext/yuni/src/yuni/core/system/cpu.h Outdated Show resolved Hide resolved
src/api_client/README.md Outdated Show resolved Hide resolved
src/api/SimulationObserver.cpp Outdated Show resolved Hide resolved
*
* This class is responsible for translating a weekly problem to a linear programming problem.
*/
class HebdoProblemToLpsTranslator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would make more sense to have plain functions here than a class:
there is no undrlying state to maintain, we don't need an object here, it's only functions with an input and an output.

Nice ref about free functions :) : https://www.youtube.com/watch?v=WLDT1lDOsb4

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand however I tend to prefer to stick to OOP paradigme in case I must stub behavior. I can do the change if required though because atm there is no stubing required
(didn't watch the video yet)

docs/Architecture_Decision_Records/Remove_fetch_content.md Outdated Show resolved Hide resolved
src/solver/lps/include/antares/solver/lps/LpsFromAntares.h Outdated Show resolved Hide resolved
src/solver/lps/include/antares/solver/lps/LpsFromAntares.h Outdated Show resolved Hide resolved
@JasonMarechal25 JasonMarechal25 changed the base branch from develop to feature/remove_fetch_content April 17, 2024 14:15
@JasonMarechal25 JasonMarechal25 marked this pull request as ready for review April 17, 2024 14:18
@flomnes flomnes requested a review from sylvlecl June 21, 2024 12:26
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@JasonMarechal25 JasonMarechal25 merged commit 60977f6 into develop Jun 27, 2024
6 of 7 checks passed
@JasonMarechal25 JasonMarechal25 deleted the feature/expose-api branch June 27, 2024 09:38
@JasonMarechal25 JasonMarechal25 mentioned this pull request Oct 17, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants