Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable address geolocation flaky test, lint #132

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/apply_lut.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func applyLUTToFile(sourceFilename, lutFilename string, intensity float64, quali
var applyLutCmd = &cobra.Command{
Use: "apply-lut",
Short: "Apply LUT to one or more images",
Run: func(cmd *cobra.Command, args []string) {
Run: func(cmd *cobra.Command, _ []string) {
input := getFlagString(cmd, "input")
lutFile := getFlagString(cmd, "lut")

Expand Down
2 changes: 1 addition & 1 deletion cmd/calendar.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func getModDates(input string) ([]time.Time, error) {
var calendarView = &cobra.Command{
Use: "calendar",
Short: "View days in which media was captured",
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
detectedGoPro, connectionType, err := gopro.Detect()
if err != nil {
cui.Error(err.Error())
Expand Down
2 changes: 1 addition & 1 deletion cmd/export_tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func extractIndividual(input, output, format string) (int, error) {
var exportTags = &cobra.Command{
Use: "export-tags",
Short: "Export HiLight/other tags in video",
Run: func(cmd *cobra.Command, args []string) {
Run: func(cmd *cobra.Command, _ []string) {
input := getFlagString(cmd, "input")
format := getFlagString(cmd, "format")
output := getFlagString(cmd, "output")
Expand Down
2 changes: 1 addition & 1 deletion cmd/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
var importCmd = &cobra.Command{
Use: "import",
Short: "Import media",
Run: func(cmd *cobra.Command, args []string) {
Run: func(cmd *cobra.Command, _ []string) {
input := getFlagString(cmd, "input")
output := getFlagString(cmd, "output")
camera := getFlagString(cmd, "camera")
Expand Down
2 changes: 1 addition & 1 deletion cmd/list_devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
var listDevicesCmd = &cobra.Command{
Use: "list",
Short: "List devices available for importing",
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
partitions, _ := disk.Partitions(false)

if len(partitions) >= 1 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
var mergeCmd = &cobra.Command{
Use: "merge",
Short: "Merge two or more videos together",
Run: func(cmd *cobra.Command, args []string) {
Run: func(cmd *cobra.Command, _ []string) {
videoMan := videomanipulation.New()
videos := getFlagSlice(cmd, "input")
totalFrames := 0
Expand Down
2 changes: 1 addition & 1 deletion cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
var updateCmd = &cobra.Command{
Use: "update",
Short: "Update camera firmware",
Run: func(cmd *cobra.Command, args []string) {
Run: func(cmd *cobra.Command, _ []string) {
input := getFlagString(cmd, "input")
camera := getFlagString(cmd, "camera")
c, err := utils.CameraGet(camera)
Expand Down
1 change: 0 additions & 1 deletion pkg/dji/dji.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ func (Entrypoint) Import(params utils.ImportParams) (*utils.Result, error) {
return nil
},
})

if err != nil {
inlineCounter.SetFailure(err, "")
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/gopro/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (

const parent = "gopro"

func gpsMinAccuracyFromConfig() uint16 {
func gpsMinAccuracyFromConfig() uint {
key := fmt.Sprintf("%s.gps_accuracy", parent)
viper.SetDefault(key, 500)
return uint16(viper.GetUint(key))
return viper.GetUint(key)
}

func gpsMaxAltitudeFromConfig() float64 {
Expand Down
2 changes: 0 additions & 2 deletions pkg/gopro/gopro.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ folderLoop:
},
Unsorted: true,
})

if err != nil {
inlineCounter.SetFailure(err, "")
}
Expand Down Expand Up @@ -510,7 +509,6 @@ func importFromGoProV1(params utils.ImportParams) utils.Result {
},
Unsorted: true,
})

if err != nil {
inlineCounter.SetFailure(err, "")
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/gopro/location.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ GetLocation:

telems := lastEvent.ShitJson()
for _, telem := range telems {
if telem.Altitude > gpsMaxAltitudeFromConfig() || telem.Latitude == 0 || telem.Longitude == 0 || telem.GpsAccuracy > gpsMinAccuracyFromConfig() {
if telem.Altitude > gpsMaxAltitudeFromConfig() || telem.Latitude == 0 || telem.Longitude == 0 || uint(telem.GpsAccuracy) > gpsMinAccuracyFromConfig() {
continue
}

Expand Down
1 change: 0 additions & 1 deletion pkg/insta360/insta360.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ func (Entrypoint) Import(params utils.ImportParams) (*utils.Result, error) {
return nil
},
})

if err != nil {
inlineCounter.SetFailure(err, "")
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/utils/reversegeo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ type pair struct {
}

func TestPrettyAddress(t *testing.T) {
t.Skip("Flaky test")

expected := []pair{
{
Address: Location{
Expand Down
Loading