antaressimulatorteam / antarest Goto Github PK
View Code? Open in Web Editor NEWAPI REST and WebUI for Antares_Simulator
License: Apache License 2.0
API REST and WebUI for Antares_Simulator
License: Apache License 2.0
Linked to
#1
What
Besoins
Linked to
#2
What
Currently, file system is parsed at one time, these force a tree structure with key / value at each node. However, we need more flexibility in node like array.
Need
More flexibility in tree structure
Linked to
#1
What
As a user (who is in the process of building a new study)
I want to create a new simulation from scrath (with all the default values)
in order to later start modifying the paramters of the study and eventually launch the calculation
name
of new simulation, that becomes the directory namename
should be written in the study.antares
file as the value of the field caption
created
and lastsave
note: an empty study named empty-study72 is provided
empty-study72.zip
As a user that is going to prepare and eventually run a simulation
I would need to know what is the version of Antares that is going to execute my study.
When parsing filesystem use 'filename' value rather than key value
What
As a user (who has launched or simply created a simulation)
I want to retrieve the informations of the simulation settings of a simulation (the content of settings/generaldata.ini
)
in order to check the values of the general settings of the simulation
Definition of done
generaldata.ini
Besoins
generaldata.ini
Linked to
#2
What
Linked to
#2
What
Use $ref keyword in jsonschema to remove duplicate object and simplify jsonschema
Need
Mange URL like /metadata/STA-mini/output/20201014-1427eco/annualSystemCost.txt
The file /settings/resources/study.ico is a picture, and is for now treated as a .txt file.
@FrancoisJ ?
@Hyralc ?
Linked to
#2
What
Besoins
Linked to
#1
What
Besoins
as a user who created or run a study
I need to read the content of the study.antares
file that is at the root of the study directory
in order to check its content, for example the version of Antares with which it has been generated
study.antares
is standard inifile
the content of study.antares can be added to the variables of the study, hence accessed directly
for example inside study.antares "antares/version": 700 can be found.
I expect to find the version of Antares by requesting "/studyname/antaresversion"
i expect to find the caption of the simulation by requesting "studyname/caption"
I expect to find the "created" value of the simulation by requesting "studyname/created" (it is a unixtime, to confirm)
I expect to find the "lastsave" value of the simulation by requesting "studyname/lastsave" (it is a unixtime, to confirm)
As a user who is reading the results of a simulation
I would like to retrieve the version of Antares that was used to produce the simulation
This information is contained in the info.antares-output
inside the output directory of the simulation
This file also contains in a .ini
format all the metadata of the simulation
[general]
version = 710
name = hello-world
mode = Economy
date = 2020.10.09 - 12:21
title = 2020.10.09 - 12:21
timestamp = 1602238885
The idea:
/studies/{study}/output/{simulation}/version
can be used as
/studies/{study}/output/{simulation}/about-the-study/study/antares/version
antares version
Linked to
#2
Happy path
Error path
As a user (who is reading a finished simulation)
I want to retrieve the data contained in one of the files values-hourly
or values-weekly
or values-monthly
or values-yearly
inside mc-all/areas/$AREA-NAME/
(a text file corresponding to one area of the simulation) if:
values-hourly
or one of the other three exists for the chosen areaNote
A small simulation with the output is provided (TODO)
ìf values_hourly
does not exists inside mc-all/areas/$AREA-NAME/
an error message should be retuned saying that "values_hourly
does not exist for the chosen area"
ìf mc-all/areas/$AREA-NAME/
is not found an error message should be retuned saying that "no mc-all for the chosen area"
ìf mc-all
is not found an error message should be returned saying "no mc-all for the current simulation"
if the chosen file is found it should be returned as a reply of the API request
What
Launch and test API via a binary executor
Test acceptance
As a user, I can acces an api documentation via /api/v1/swagger and get a swagger html page similar to this: https://petstore.swagger.io/
Steps
Strategy 12
As a user (who is reading a finished simulation)
I want to acces to the different outputs of the simulations of a study
In order to analyse the results of my simulationsoverall cost
Note
A small study with two simulations is provided
STA-mini.zip
if the user request "/studyname/output" it should get the json with a depth on 1: list of the simulation outputs
one simulation output should be an object that contains the data of the directory (for example the directory "20201014-1422eco-hello" ) and some additional variable whose values are inferred for the directoryname (yearmonthday-hourminutes[-simulationname]
"date": YearMonthDayHourMinute
"run type": "adequacy" (adq) or "economy" (eco) or "draft" (dft)
"simulationname"(optional): ("hello", "goodbye", "", "" in the example)
"id"(int): 1 (oldest) to NUM-OF-SIMULATIONS
it should be possible to acces to the simulation output by a request "/studyname/output/ID"
"output": [
{
"date": date,
"ID": 1,
"name": "",
"type": "economy",
"data":{
...
...
},
{
"date": 20201014-1045,
"ID": 2,
"name": "goodbye",
"type": "adequacy",
"data":{
...
...
}
}
]
Linked to
#1
What
Besoins
Linked to
#2
What
Allow to use #ref keyword in json schema which point to an other file containing jsonschema definition
Linked to
#1
What
What*
Transform Exception from folder_reader in to HtmlException
Linked to
#2
What
Besoins
What
Manage .ini: study.antares, settings/scenariobuilder.dat,
Manage xml: settings/comment.txt
Manage .log: logs/*
implement strategy filter at the beginning of _parse_recursive
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.