Skip to content

Commit

Permalink
Merge branch 'dev' into feat/support-solver-v87
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Mar 11, 2024
2 parents ce96783 + aeaf738 commit 39be102
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tests/study/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,8 @@ def test_get_all__study_folder_filter(
assert len(db_recorder.sql_statements) == 1, str(db_recorder)


# TODO fix this test and all the others
@pytest.mark.skip(reason="This bug is to be fixed asap, the sql query is not working as expected")
@pytest.mark.parametrize(
"tags, expected_ids",
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,19 +160,23 @@ function ResultDetails() {
return ["Annual"];
}

// Directly use API's week index (handles 53 weeks) as no formatting is required.
// !NOTE: Suboptimal: Assumes API consistency, lacks flexibility.
if (timestep === Timestep.Weekly) {
return matrixRes.data.index.map((weekNumber) => weekNumber.toString());
}

// Original date/time format mapping for moment parsing
const parseFormat = {
[Timestep.Hourly]: "MM/DD HH:mm",
[Timestep.Daily]: "MM/DD",
[Timestep.Weekly]: "WW",
[Timestep.Monthly]: "MM",
}[timestep];

// Output formats for each timestep to match legacy UI requirements
const outputFormat = {
[Timestep.Hourly]: "DD MMM HH:mm I",
[Timestep.Daily]: "DD MMM I",
[Timestep.Weekly]: "WW",
[Timestep.Monthly]: "MMM",
}[timestep];

Expand Down

0 comments on commit 39be102

Please sign in to comment.