Skip to content

Commit

Permalink
Merge branch 'develop' into feature/ANT-2749
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir authored Feb 20, 2025
2 parents 6e2de9a + 7338546 commit d78c8c2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 105 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ jobs:
batch-name: valid-v920
os: ${{ matrix.os }}

- name: Run cucumber on modeler
uses: ./.github/workflows/cucumber-tests
with:
feature: "features/modeler-features"

- name: Collect coverage into one XML report
run: |
gcovr --sonarqube --output coverage.xml
Expand Down
8 changes: 6 additions & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,18 @@ sonar.coverage.exclusions=src/ext/**,\
src/distrib/**,\
src/tools/**,\
src/ui/**,\
src/solver/constraints-builder/** \
src/libs/fswalker/**,\
src/libs/antares/study/cleaner/**,\
src/libs/antares/jit/**,\
src/libs/antares/sys/**,\
src/libs/antares/path/**,\
src/libs/antares/paths/**,\
src/libs/antares/locator/**,\
src/libs/antares/correlation/**,\
src/libs/antares/antlr-interface/**
src/libs/antares/antlr-interface/** \
src/libs/antares/study/ui-runtimeinfos.cpp \
src/libs/antares/study/include/antares/study/ui-runtimeinfos.h \
src/libs/antares/study/area/ui.cpp

sonar.coverageReportPaths=coverage.xml
sonar.cfamily.threads=4
103 changes: 0 additions & 103 deletions src/libs/antares/date/date.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,109 +360,6 @@ bool StringToDayOfTheWeek(DayOfTheWeek& v, const AnyString& text)
return false;
}

bool Calendar::saveToCSVFile(const AnyString& filename) const
{
IO::File::Stream file;
if (file.openRW(filename))
{
struct
{
String::Vector hours;
String::Vector days;
String::Vector weeks;
String::Vector months;
} report;

report.hours.push_back("HOURS\t\t\t\t");
report.hours.push_back("");
report.days.push_back("DAYS\t\t\t\t\t");
report.days.push_back("");
report.weeks.push_back("WEEKS");
report.weeks.push_back("");
report.months.push_back("MONTHSi\t\t\t\t\t");
report.months.push_back("");

String line;

line.clear() << "weekday\tday year\tday month\tmonth\tweek";
report.hours.push_back(line);

for (uint h = 0; h != maxHoursInYear; ++h)
{
auto& hour = hours[h];
line.clear();
line << (uint)hour.weekday << '\t';
line << hour.dayYear << '\t';
line << hour.dayMonth << '\t';
line << hour.month << '\t';
line << hour.week;
report.hours.push_back(line);
}

line.clear() << "weekday\thour begin\thour end\tmonth\tday month\tweek";
report.days.push_back(line);

for (uint h = 0; h != maxDaysInYear; ++h)
{
auto& day = days[h];
line.clear();
line << (uint)day.weekday << '\t';
line << day.hours.first << '\t';
line << day.hours.end << '\t';
line << day.month << '\t';
line << day.dayMonth << '\t';
line << day.week;
report.days.push_back(line);
}

line.clear() << "week";
report.days.push_back(line);

for (uint h = 0; h != maxDaysInYear; ++h)
{
line.clear();
report.days.push_back(line);
}

line.clear() << "hour begin\thour end\tdays\tday uear begin\tday year end\tfirst weekday";
report.months.push_back(line);

for (uint m = 0; m != MONTHS_PER_YEAR; ++m)
{
auto& month = months[m];
line.clear();
line << month.hours.first << '\t';
line << month.hours.end << '\t';
line << month.days << '\t';
line << month.daysYear.first << '\t';
line << month.daysYear.end << '\t';
line << (uint)month.firstWeekday;

report.months.push_back(line);
}

for (uint i = 0; i < report.hours.size(); ++i)
{
file << report.hours[i] << '\t';
if (i < report.days.size())
{
file << report.days[i] << '\t';
}
if (i < report.weeks.size())
{
file << report.weeks[i] << '\t';
}
if (i < report.months.size())
{
file << report.months[i] << '\t';
}
file << '\n';
}
return true;
}
return false;
}

Calendar::Calendar()
{
settings_.weekday1rstJanuary = monday;
Expand Down
4 changes: 4 additions & 0 deletions src/libs/antares/resources/resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ namespace Antares
{
namespace Resources
{
// TODO VP: delete with GUI
bool FindFile(Yuni::String& out, const AnyString& filename)
{
if (not filename.empty())
Expand All @@ -67,11 +68,13 @@ bool FindFile(Yuni::String& out, const AnyString& filename)
return false;
}

// TODO VP: delete with GUI
void GetRootFolder(Yuni::String& out)
{
out = RootFolder;
}

// TODO VP: delete with GUI
bool FindExampleFolder(Yuni::String& folder)
{
// Temporary string
Expand Down Expand Up @@ -184,6 +187,7 @@ void Initialize(int argc, const char** argv, bool initializeSearchPath)
}
}

// TODO VP: delete with GUI
bool FindFirstOf(String& out, const char* const* const list)
{
String tmp;
Expand Down
1 change: 1 addition & 0 deletions src/libs/antares/study/parts/thermal/cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ uint ThermalCluster::groupId() const
return groupID;
}

// TODO VP: delete with GUI
void Data::ThermalCluster::copyFrom(const ThermalCluster& cluster)
{
// Note: In this method, only the data can be copied (and not the name or
Expand Down

0 comments on commit d78c8c2

Please sign in to comment.