#20 Average temperature for year, and a cache #227

Closed
b24hugst wants to merge 14 commits from #20-aggregated-data-for-tempservice into team_1_week_1
Collaborator

A new card showing the average temperature from that specific year.

Works together with a cache that updates every 10 minutes to increase performance.

Cache seems to work as I checked the logs during execution and it first prints that it looks for database
, and then on the second request, it prints that it requested from cache instead.


This was a part of the #20 issue.

New sub-issues for adding /year/month and /year/week are needed.

Maybe also an issue for fixing the frontend output, because right now I have just statically set it to always show 2026, and it also shows on any URL and not only on /temperature/2026

A new card showing the average temperature from that specific year. Works together with a cache that updates every 10 minutes to increase performance. Cache seems to work as I checked the logs during execution and it first prints that it looks for database , and then on the second request, it prints that it requested from cache instead. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This was a part of the #20 issue. New sub-issues for adding **/year/month** and **/year/week** are needed. Maybe also an issue for fixing the frontend output, because right now I have just statically set it to always show 2026, and it also shows on any URL and not only on **/temperature/2026**
returns average temperature for the written year
Shows 2026 average temperature currently
Showcases average temperature from that month
Outputs average temperature for written month
months addressed with ints instead of strings and also datatype int added in parameter
Decided it's better to save this for another issue
Noticed I missed this
needed to save database results into cache
Cache will now get checked before database, and updated every 10 minutes
Collaborator

Code looks good and is well commented and structure. There is a minor merge conflict with the App.js mostly due to it being used to test displaying information meaning it no longer matches the changes currently made in the group branch.

You can fix this merge conflict by merging the group branch into your working branch then selecting to use the group branches version of the app.js file when fixing conflicts. If your unsure about or nervous about this process tell me and i can fix it tomorrow. When this is fixed its ready to be merged into the group branch

Code looks good and is well commented and structure. There is a minor merge conflict with the App.js mostly due to it being used to test displaying information meaning it no longer matches the changes currently made in the group branch. You can fix this merge conflict by merging the group branch into your working branch then selecting to use the group branches version of the app.js file when fixing conflicts. If your unsure about or nervous about this process tell me and i can fix it tomorrow. When this is fixed its ready to be merged into the group branch
a24hirsa removed their assignment 2026-04-10 13:32:47 +00:00
a24hirsa 2026-04-10 13:32:59 +00:00
Author
Collaborator

@a24hirsa Ah ok yeah I'll do that. Thanks for the guide.

@a24hirsa Ah ok yeah I'll do that. Thanks for the guide.
Collaborator

Is this derived from an issue? we're a little confused where this came from. Usually the issue number is added to the title of the branch.

Is this derived from an issue? we're a little confused where this came from. Usually the issue number is added to the title of the branch.
b24hugst changed title from Average temperature for year, and a cache to #20 Average temperature for year, and a cache 2026-04-13 11:43:54 +00:00
Author
Collaborator

@b24johka wrote in #227 (comment):

Is this derived from an issue? we're a little confused where this came from. Usually the issue number is added to the title of the branch.

I updated the title now. I did however write that it's from the #20 issue but it was a little hidden.

This was only a sub-part of the #20 issue, I'm working on the rest of it right now but thought this could get pulled in the meantime. Although I'll update this as well to meet the new home.js requirements.

@b24johka wrote in https://git.webug.se/Andras/BoundlessFlowCampus2K/pulls/227#issuecomment-2261: > Is this derived from an issue? we're a little confused where this came from. Usually the issue number is added to the title of the branch. I updated the title now. I did however write that it's from the #20 issue but it was a little hidden. This was only a sub-part of the #20 issue, I'm working on the rest of it right now but thought this could get pulled in the meantime. Although I'll update this as well to meet the new home.js requirements.
Author
Collaborator

Actually. Could you close this pull request all together so I can create a new one? Because I have a new branch with the new structure of home.js and that, which I don't want to have to change again on this branch. And I also have implemented so /year/month works as well.

Actually. Could you close this pull request all together so I can create a new one? Because I have a new branch with the new structure of home.js and that, which I don't want to have to change again on this branch. And I also have implemented so /year/month works as well.
b24hugst 2026-04-13 12:50:07 +00:00
  • closed this pull request
  • added the
    wontfix
    label

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K!227
No description provided.