Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Lun4m committed Sep 25, 2024
1 parent f0196aa commit 648d5f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions kdvh_importer/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ func getElements(table *TableInstructions, conn *sql.DB) ([]Element, error) {
return elements, nil
}

// List of columns that are not selected in KDVH queries
// TODO: what's the difference between obs_origtime and klobs (they have same paramid)?
// TODO: should they be added here?
// TODO: do we need to exclude other elements?
// Should they be added here? Do we need to exclude other elements?
var INVALID_COLUMNS = []string{"dato", "stnr", "typeid", "season"}

// Fetch column names for a given table
Expand Down
3 changes: 1 addition & 2 deletions kdvh_importer/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,6 @@ func parseData(handle io.Reader, ts *TimeseriesInfo, table *TableInstructions, c
scanner.Scan()
}

// TODO: maybe use csv.Reader
var data []ObsLARD
for scanner.Scan() {
cols := strings.Split(scanner.Text(), config.Sep)
Expand All @@ -473,8 +472,8 @@ func parseData(handle io.Reader, ts *TimeseriesInfo, table *TableInstructions, c
return nil, err
}

// TODO: not sure why we need this?
// only import data between kdvh's defined fromtime and totime
// TODO: not 100% sure why we need this?
if ts.Meta != nil {
if ts.Meta.FromTime != nil && obsTime.Sub(*ts.Meta.FromTime) < 0 {
continue
Expand Down

0 comments on commit 648d5f8

Please sign in to comment.