Skip to content

Commit

Permalink
Merge pull request #100 from robotpy/2025-dev
Browse files Browse the repository at this point in the history
2025 WPILib updates
  • Loading branch information
virtuald authored Oct 19, 2024
2 parents f82f8c1 + 5b9c72b commit 1318d87
Show file tree
Hide file tree
Showing 137 changed files with 1,206 additions and 407 deletions.
44 changes: 25 additions & 19 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: Install deps
shell: bash
Expand All @@ -68,13 +68,13 @@ jobs:
max-parallel: ${{ fromJSON(needs.setup_concurrency.outputs.max-parallel).v }}
fail-fast: true
matrix:
os: ["ubuntu-22.04", "macos-12", "windows-2022"]
os: ["ubuntu-22.04", "macos-13", "windows-2022"]
python_version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
- name: Install numpy (needed for stubgen but broken in raspbian CI)
shell: bash
run: |
python -m pip --disable-pip-version-check install 'numpy<2'
python -m pip --disable-pip-version-check install numpy
- name: Build + test wheels
shell: bash
Expand Down Expand Up @@ -169,30 +169,30 @@ jobs:
max-parallel: ${{ fromJSON(needs.setup_concurrency.outputs.max-parallel).v }}
matrix:
os:
- container: wpilib/roborio-cross-ubuntu:2024-22.04-py312
- container: wpilib/roborio-cross-ubuntu:2025-22.04-py313
name: roborio

- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04-py38
name: raspbian-py38
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04-py39
- container: wpilib/raspbian-cross-ubuntu:2025-bullseye-22.04-py39
name: raspbian-py39
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04-py310
- container: wpilib/raspbian-cross-ubuntu:2025-bullseye-22.04-py310
name: raspbian-py310
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04-py311
- container: wpilib/raspbian-cross-ubuntu:2025-bullseye-22.04-py311
name: raspbian-py311
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04-py312
- container: wpilib/raspbian-cross-ubuntu:2025-bullseye-22.04-py312
name: raspbian-py312

- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04-py38
name: raspbian-aarch64-py38
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04-py39
- container: wpilib/raspbian-cross-ubuntu:2025-bullseye-22.04-py313
name: raspbian-py313

- container: wpilib/aarch64-cross-ubuntu:2025-bullseye-22.04-py39
name: raspbian-aarch64-py39
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04-py310
- container: wpilib/aarch64-cross-ubuntu:2025-bullseye-22.04-py310
name: raspbian-aarch64-py310
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04-py311
- container: wpilib/aarch64-cross-ubuntu:2025-bullseye-22.04-py311
name: raspbian-aarch64-py311
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04-py312
- container: wpilib/aarch64-cross-ubuntu:2025-bullseye-22.04-py312
name: raspbian-aarch64-py312
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04-py313
name: raspbian-aarch64-py313

container:
image: "${{ matrix.os.container }}"
Expand Down Expand Up @@ -222,7 +222,13 @@ jobs:
run: |
pwd
/usr/bin/git config --global --add safe.directory $(pwd)
# See https://github.com/pallets/markupsafe/issues/475
- name: Install MarkupSafe
shell: bash
run: |
/build/venv/bin/cross-pip install --no-build-isolation "markupsafe; python_version < '3.12'"
- name: Install deps
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion devtools/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# MACOSX_DEPLOYMENT_TARGET is required for linking to WPILib
if sys.platform == "darwin":
os.environ["MACOSX_DEPLOYMENT_TARGET"] = "12"
os.environ["MACOSX_DEPLOYMENT_TARGET"] = "13"


@click.group()
Expand Down
8 changes: 4 additions & 4 deletions rdev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

[params]

wpilib_bin_url = "https://frcmaven.wpi.edu/artifactory/release"
wpilib_bin_version = "2024.3.2"
# wpilib_bin_url = "https://frcmaven.wpi.edu/artifactory/development"
# wpilib_bin_url = "https://frcmaven.wpi.edu/artifactory/release"
wpilib_bin_version = "2025.1.1-beta-1"
wpilib_bin_url = "https://frcmaven.wpi.edu/artifactory/development"

# Don't update these artifacts
exclude_artifacts = [
"opencv-cpp"
]

robotpy_build_req = "<2025.0.0,~=2024.0.0"
robotpy_build_req = "<2025.0.0b1,~=2025.0.0a1"

#
# Subproject configuration
Expand Down
1 change: 1 addition & 0 deletions rdev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ black
click
packaging
pydantic<2
pytest
requests
setuptools
setuptools_scm >= 6.2, < 8
Expand Down
2 changes: 1 addition & 1 deletion subprojects/pyntcore/gen/NetworkTableInstance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ classes:
StopClient:
SetServer:
overloads:
const char*, unsigned int:
std::string_view, unsigned int:
std::span<const std::pair<std::string_view, unsigned int>>:
std::span<const std::string_view>, unsigned int:
SetServerTeam:
Expand Down
2 changes: 1 addition & 1 deletion subprojects/pyntcore/ntcore/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from . import _init_ntcore

# autogenerated by 'robotpy-build create-imports ntcore'
# autogenerated by 'robotpy-build create-imports ntcore ntcore._ntcore'
from ._ntcore import (
BooleanArrayEntry,
BooleanArrayPublisher,
Expand Down
24 changes: 16 additions & 8 deletions subprojects/pyntcore/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,32 @@ install_requires = [

[build-system]
requires = [
"robotpy-build<2025.0.0,~=2024.0.0",
"robotpy-build<2025.0.0b1,~=2025.0.0a1",
"robotpy-wpiutil~=2024.3.1",
"robotpy-wpinet~=2024.3.1",
]

[tool.robotpy-build]
base_package = "ntcore"
update_init = [
"ntcore",
"ntcore.meta ntcore._ntcore.meta"
]
scan_headers_ignore = [
"networktables/ProtobufTopic.h",
"networktables/UnitTopic.h",

"ntcore.h",
"ntcore_c.h",
"ntcore_c_types.h",
"ntcore_test.h",
]

[tool.robotpy-build.wrappers."ntcore".maven_lib_download]
artifact_id = "ntcore-cpp"
group_id = "edu.wpi.first.ntcore"
repo_url = "https://frcmaven.wpi.edu/artifactory/release"
version = "2024.3.2"
repo_url = "https://frcmaven.wpi.edu/artifactory/development"
version = "2025.1.1-beta-1"

libs = ["ntcore"]

Expand Down Expand Up @@ -66,11 +79,6 @@ StructArrayTopic = "networktables/StructArrayTopic.h"
StringArrayTopic = "networktables/StringArrayTopic.h"
StringTopic = "networktables/StringTopic.h"
Topic = "networktables/Topic.h"
# UnitTopic = "networktables/UnitTopic.h"

# ntcore = "ntcore.h"
# ntcore_c = "ntcore_c.h"
# ntcore_c_types = "ntcore_c_types.h"
ntcore_cpp = "ntcore_cpp.h"
ntcore_cpp_types = "ntcore_cpp_types.h"
# ntcore_test = "ntcore_test.h"
3 changes: 3 additions & 0 deletions subprojects/robotpy-apriltag/gen/AprilTagFieldLayout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ functions:
ignore: true
from_json:
ignore: true
LoadAprilTagLayoutField:
ignore: true
classes:
AprilTagFieldLayout:
enums:
Expand All @@ -15,6 +17,7 @@ classes:
"":
std::string_view:
std::vector<AprilTag>, units::meter_t, units::meter_t:
LoadField:
GetFieldLength:
GetFieldWidth:
GetTags:
Expand Down
22 changes: 19 additions & 3 deletions subprojects/robotpy-apriltag/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,35 @@ install_requires = [

[build-system]
requires = [
"robotpy-build<2025.0.0,~=2024.0.0",
"robotpy-build<2025.0.0b1,~=2025.0.0a1",
"robotpy-wpiutil~=2024.3.1",
"robotpy-wpimath~=2024.3.1",
]

[tool.robotpy-build]
base_package = "robotpy_apriltag"
update_init = [
"robotpy_apriltag robotpy_apriltag._apriltag"
]
scan_headers_ignore = [
"common/*",
"test/*",

"apriltag.h",
"apriltag_math.h",
"apriltag_pose.h",

"frc/apriltag/AprilTagDetector_cv.h",

"tag16h5.h",
"tag36h11.h",
]

[tool.robotpy-build.wrappers."robotpy_apriltag".maven_lib_download]
artifact_id = "apriltag-cpp"
group_id = "edu.wpi.first.apriltag"
repo_url = "https://frcmaven.wpi.edu/artifactory/release"
version = "2024.3.2"
repo_url = "https://frcmaven.wpi.edu/artifactory/development"
version = "2025.1.1-beta-1"

libs = ["apriltag"]

Expand Down
2 changes: 0 additions & 2 deletions subprojects/robotpy-apriltag/robotpy_apriltag/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
AprilTagFieldLayout,
AprilTagPoseEstimate,
AprilTagPoseEstimator,
loadAprilTagLayoutField,
)

__all__ = [
Expand All @@ -20,5 +19,4 @@
"AprilTagFieldLayout",
"AprilTagPoseEstimate",
"AprilTagPoseEstimator",
"loadAprilTagLayoutField",
]
Binary file modified subprojects/robotpy-apriltag/tests/tag1_640_480.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions subprojects/robotpy-cscore/cscore/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from . import _init_cscore

from ._logging import enableLogging

# autogenerated by 'robotpy-build create-imports cscore'
# autogenerated by 'robotpy-build create-imports cscore cscore._cscore'
from ._cscore import (
AxisCamera,
CameraServer,
Expand Down Expand Up @@ -49,9 +47,12 @@
"runMainRunLoop",
"runMainRunLoopTimeout",
"stopMainRunLoop",
"enableLogging",
]

from ._logging import enableLogging

__all__.append("enableLogging")

try:
from .version import __version__
except ImportError:
Expand Down
10 changes: 1 addition & 9 deletions subprojects/robotpy-cscore/cscore/cvnp/cvnp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,7 @@ namespace cvnp

bool is_array_contiguous(const pybind11::array& a)
{
pybind11::ssize_t expected_stride = a.itemsize();
for (int i = a.ndim() - 1; i >=0; --i)
{
pybind11::ssize_t current_stride = a.strides()[i];
if (current_stride != expected_stride)
return false;
expected_stride = expected_stride * a.shape()[i];
}
return true;
return a.flags() & pybind11::array::c_style;
}


Expand Down
1 change: 1 addition & 0 deletions subprojects/robotpy-cscore/cscore/cvnp/cvnp.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ namespace cvnp
return pybind11::array(
pybind11::dtype::of<_Tp>()
, std::vector<std::size_t> {_rows, _cols}
, std::vector<std::size_t>{_cols * sizeof(_Tp), sizeof(_Tp)} // Strides
, m.val
);
}
Expand Down
13 changes: 8 additions & 5 deletions subprojects/robotpy-cscore/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ install_requires = [

[build-system]
requires = [
"robotpy-build<2025.0.0,~=2024.0.0",
"robotpy-build<2025.0.0b1,~=2025.0.0a1",
"robotpy-wpiutil~=2024.3.1",
"robotpy-wpinet~=2024.3.1",
"pyntcore~=2024.3.1",
Expand All @@ -22,20 +22,23 @@ requires = [

[tool.robotpy-build]
base_package = "cscore"
update_init = [
"cscore"
]

[tool.robotpy-build.static_libs."cscore_cpp".maven_lib_download]
artifact_id = "cscore-cpp"
group_id = "edu.wpi.first.cscore"
repo_url = "https://frcmaven.wpi.edu/artifactory/release"
version = "2024.3.2"
repo_url = "https://frcmaven.wpi.edu/artifactory/development"
version = "2025.1.1-beta-1"

libs = ["cscore"]

[tool.robotpy-build.static_libs."cameraserver_cpp".maven_lib_download]
artifact_id = "cameraserver-cpp"
group_id = "edu.wpi.first.cameraserver"
repo_url = "https://frcmaven.wpi.edu/artifactory/release"
version = "2024.3.2"
repo_url = "https://frcmaven.wpi.edu/artifactory/development"
version = "2025.1.1-beta-1"

libs = ["cameraserver"]

Expand Down
12 changes: 7 additions & 5 deletions subprojects/robotpy-hal/gen/DriverStation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ functions:
HAL_GetJoystickIsXbox:
HAL_GetJoystickType:
HAL_GetJoystickName:
param_override:
name:
ignore: true
cpp_code: |
[](int32_t joystickNum) {
auto name = HAL_GetJoystickName(joystickNum);
std::string sname(name);
HAL_FreeJoystickName(name);
WPI_String name;
HAL_GetJoystickName(&name, joystickNum);
std::string sname(wpi::to_string_view(&name));
WPI_FreeString(&name);
return sname;
}
HAL_FreeJoystickName:
ignore: true
HAL_GetJoystickAxisType:
HAL_SetJoystickOutputs:
HAL_GetMatchTime:
Expand Down
Loading

0 comments on commit 1318d87

Please sign in to comment.