Skip to content

Commit

Permalink
Pub Workspace and opencv_dart -> dartcv (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Lesches authored Dec 19, 2024
1 parent b36a80e commit 912698a
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 14 deletions.
7 changes: 7 additions & 0 deletions .github/pubspec_overrides.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
resolution:

dependency_overrides:
burt_network:
git:
url: https://github.com/BinghamtonRover/Networking
ref: 2.3.1
12 changes: 10 additions & 2 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@ jobs:
# https://github.com/dart-lang/setup-dart/blob/main/README.md
- uses: dart-lang/setup-dart@v1

# This package is part of a Pub Workspace. However, CI still needs to
# run on this repo by itself, so we want to override burt_network to use
# a Git dependency ONLY on GitHub Actions.
#
# To get around this, we commit the overrides to the .github folder where
# Dart can't find them, then copy them as part of the CI workflow.
- name: Install dependencies
run: dart pub get

run: |
mv .github/pubspec_overrides.yaml .
dart pub get
- name: Analyze project source
run: dart analyze --fatal-infos

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.dart_tool/

# Needed to allow the rover to build offline but allow us to build online
pubspec_overrides.yaml
./pubspec_overrides.yaml
pubspec.lock

# RealSense SDK build artifacts
Expand Down
2 changes: 1 addition & 1 deletion lib/src/isolates/opencv.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "package:opencv_dart/opencv_dart.dart";
import "package:dartcv4/dartcv.dart";
import "package:burt_network/burt_network.dart";

import "package:video/utils.dart";
Expand Down
2 changes: 1 addition & 1 deletion lib/src/utils/aruco.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "package:opencv_dart/opencv_dart.dart";
import "package:dartcv4/dartcv.dart";

final _arucoDictionary = ArucoDictionary.predefined(PredefinedDictionaryType.DICT_4X4_50);
final _arucoParams = ArucoDetectorParameters.empty();
Expand Down
4 changes: 2 additions & 2 deletions lib/src/utils/constants.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "dart:io";

import "package:burt_network/generated.dart";
import "package:opencv_dart/opencv_dart.dart";
import "package:burt_network/protobuf.dart";
import "package:dartcv4/dartcv.dart";

/// These list maps OpenCV IDs (index) to [CameraName]s.
///
Expand Down
2 changes: 1 addition & 1 deletion lib/src/utils/opencv.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "dart:ffi";
import "dart:typed_data";

import "package:opencv_dart/opencv_dart.dart";
import "package:dartcv4/dartcv.dart";
import "package:video/realsense.dart";

/// Useful methods to adjust settings of an OpenCV video device.
Expand Down
12 changes: 6 additions & 6 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: video
description: A sample command-line application.
version: 1.0.0
version: 1.1.0
publish_to: none

resolution: workspace
environment:
sdk: ^3.0.0
sdk: ^3.6.0

# Add regular dependencies here.
dependencies:
burt_network:
git: https://github.com/BinghamtonRover/Networking
burt_network: ^2.3.1
typed_isolate: ^6.0.0
ffi: ^2.1.0
protobuf: ^3.1.0
opencv_dart: ^2.1.0-dev.0
dartcv4: ^1.0.1

dev_dependencies:
ffigen: ^15.0.0
ffigen: ^16.0.0
test: ^1.21.0
very_good_analysis: ^6.0.0

Expand Down

0 comments on commit 912698a

Please sign in to comment.