Skip to content

Commit

Permalink
Added/improved code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-asplin-met-no committed Feb 16, 2024
1 parent 76ee807 commit ee43d52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion datastore/datastore/dsimpl/getobservations.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ func getTemporalSpec(request *datastore.GetObsRequest) (common.TemporalSpec, err
// tspec.LatestMaxage)
return common.TemporalSpec{}, fmt.Errorf("latest_maxage unimplemented")
} else {
// by default don't consider any observation as too old
// by default disable filtering on maxage, i.e. don't consider any observation as too
// old
tspec.LatestMaxage = time.Duration(-1)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ func getObs(
oldestTime := time.Time{}
if !tspec.IntervalMode {
loTime, hiTime := common.GetValidTimeRange()
if tspec.LatestMaxage < 0 {
if tspec.LatestMaxage < 0 { // i.e. filtering on maxage is disabled
oldestTime = loTime
} else {
oldestTime = hiTime.Add(-tspec.LatestMaxage)
Expand Down

1 comment on commit ee43d52

@github-actions
Copy link

Choose a reason for hiding this comment

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

API Unit Test Coverage Report
FileStmtsMissCoverMissing
\_\_init\_\_.py00100% 
datastore_pb2.py584621%24–69
datastore_pb2_grpc.py432347%37–52, 85–87, 92–94, 99–101, 106–108, 112–136, 174, 191, 208, 225
dependencies.py31487%23–24, 31, 38
grpc_getter.py8450%12–16
locustfile.py15150%1–31
main.py22386%27, 37, 47
metadata_endpoints.py19479%16, 33–66, 70
formatters
   \_\_init\_\_.py70100% 
   covjson.py46198%58
routers
   \_\_init\_\_.py00100% 
   edr.py711185%36–59, 109–110, 137–138
   records.py00100% 
TOTAL32011165% 

API Unit Test Coverage Summary

Tests Skipped Failures Errors Time
16 0 💤 0 ❌ 0 🔥 1.764s ⏱️

Please sign in to comment.