Skip to content

Commit ede706b

Browse files
authored
[choreolib] Merge spec version into main package (#940)
1 parent 507879e commit ede706b

File tree

6 files changed

+5
-16
lines changed

6 files changed

+5
-16
lines changed

choreolib/py/choreo/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import json
22

3-
from choreo.spec_version import SPEC_VERSION
43
from choreo.trajectory import (
54
DifferentialSample,
65
DifferentialTrajectory,
@@ -10,6 +9,8 @@
109
load_event_marker,
1110
)
1211

12+
SPEC_VERSION = "v2025.0.0"
13+
1314

1415
def load_differential_trajectory_string(
1516
trajectory_json_string: str,

choreolib/py/choreo/spec_version.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

choreolib/py/choreo/trajectory/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import math
55
import os
66

7-
from choreo.spec_version import SPEC_VERSION
87
from choreo.util import DEFAULT_YEAR, get_flipper_for_year
98
from wpimath.geometry import Pose2d, Rotation2d
109
from wpimath.kinematics import ChassisSpeeds
@@ -131,6 +130,7 @@ def get_chassis_speeds(self) -> ChassisSpeeds:
131130
"""
132131
Returns the field-relative chassis speeds of this state.
133132
"""
133+
from choreo import SPEC_VERSION
134134
from wpilib import getDeployDirectory
135135

136136
# Get only .chor file in deploy directory

choreolib/src/main/native/include/choreo/Choreo.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717
#include <wpi/MemoryBuffer.h>
1818
#include <wpi/json.h>
1919

20-
#include "choreo/SpecVersion.h"
2120
#include "choreo/trajectory/ProjectFile.h"
2221
#include "choreo/trajectory/Trajectory.h"
2322
#include "choreo/trajectory/TrajectorySample.h"
2423
#include "choreo/util/AllianceFlipperUtil.h"
2524

2625
namespace choreo {
2726

27+
inline constexpr std::string_view kSpecVersion = "v2025.0.0";
28+
2829
template <TrajectorySample SampleType, int Year>
2930
class AutoFactory;
3031

choreolib/src/main/native/include/choreo/SpecVersion.h

Lines changed: 0 additions & 11 deletions
This file was deleted.

choreolib/src/test/native/cpp/main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include <gtest/gtest.h>
44

55
#include "choreo/Choreo.h"
6-
#include "choreo/SpecVersion.h"
76

87
int main(int argc, char** argv) {
98
::testing::InitGoogleTest(&argc, argv);

0 commit comments

Comments
 (0)