-
Notifications
You must be signed in to change notification settings - Fork 24
Port Commands to Pure Python #26
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
Closed
Closed
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
00f9a55
lights out
TheTripleV 38ecaf5
finish impl
TheTripleV 2a1e56c
circularimports
TheTripleV 3e1c60e
fix tests / port java docstrings
TheTripleV ddb24f6
switch actions to pure workflow
TheTripleV d1f711b
port some tests
TheTripleV 896e6d2
custom_format tests
TheTripleV 209c57e
140 tests!
TheTripleV 117cbac
use setuptools scm
TheTripleV d916916
1
TheTripleV f7344aa
1
TheTripleV ae8d116
1
TheTripleV 66366e5
Update dist.yml
TheTripleV 6e9bb5e
timedcommandrobot +exports
TheTripleV 3f49a4e
rename commndfactories
TheTripleV 8398c18
fix tests
TheTripleV 1b4cc40
black
TheTripleV 58c5219
add sendable
TheTripleV d98604c
fix types
TheTripleV bd6a0c2
comments
TheTripleV cff15ca
m
TheTripleV 26c63c1
c
TheTripleV 12f232f
skip more
TheTripleV b764500
port latest test changes
TheTripleV b24ca6a
Clear the eventloop otherwise test resources get leaked
virtuald 40bc520
Add *Base aliases in module
virtuald c2c2280
Update deps
virtuald File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,107 @@ | ||
from . import _init_impl | ||
from .button import Trigger | ||
from .command import Command, InterruptionBehavior | ||
|
||
from .version import version as __version__ | ||
from . import cmd | ||
|
||
# autogenerated by 'robotpy-build create-imports commands2 commands2._impl' | ||
from ._impl import ( | ||
Command, | ||
CommandBase, | ||
CommandGroupBase, | ||
CommandScheduler, | ||
ConditionalCommand, | ||
FunctionalCommand, | ||
InstantCommand, | ||
MecanumControllerCommand, | ||
NotifierCommand, | ||
PIDCommand, | ||
PIDSubsystem, | ||
ParallelCommandGroup, | ||
ParallelDeadlineGroup, | ||
ParallelRaceGroup, | ||
PerpetualCommand, | ||
PrintCommand, | ||
ProfiledPIDCommand, | ||
ProfiledPIDSubsystem, | ||
ProxyScheduleCommand, | ||
RamseteCommand, | ||
RepeatCommand, | ||
RunCommand, | ||
ScheduleCommand, | ||
SelectCommand, | ||
SequentialCommandGroup, | ||
StartEndCommand, | ||
Subsystem, | ||
SubsystemBase, | ||
Swerve2ControllerCommand, | ||
Swerve3ControllerCommand, | ||
Swerve4ControllerCommand, | ||
Swerve6ControllerCommand, | ||
TimedCommandRobot, | ||
TrapezoidProfileCommand, | ||
TrapezoidProfileCommandRadians, | ||
TrapezoidProfileSubsystem, | ||
TrapezoidProfileSubsystemRadians, | ||
Trigger, | ||
WaitCommand, | ||
WaitUntilCommand, | ||
# button, | ||
# cmd, | ||
requirementsDisjoint, | ||
) | ||
# from .cmd import ( | ||
# deadline, | ||
# either, | ||
# none, | ||
# parallel, | ||
# print_, | ||
# race, | ||
# repeatingSequence, | ||
# run, | ||
# runEnd, | ||
# runOnce, | ||
# select, | ||
# sequence, | ||
# startEnd, | ||
# waitSeconds, | ||
# waitUntil, | ||
# ) | ||
from .commandgroup import CommandGroup, IllegalCommandUse | ||
from .commandscheduler import CommandScheduler | ||
from .conditionalcommand import ConditionalCommand | ||
from .functionalcommand import FunctionalCommand | ||
from .instantcommand import InstantCommand | ||
from .notifiercommand import NotifierCommand | ||
from .parallelcommandgroup import ParallelCommandGroup | ||
from .paralleldeadlinegroup import ParallelDeadlineGroup | ||
from .parallelracegroup import ParallelRaceGroup | ||
from .perpetualcommand import PerpetualCommand | ||
from .printcommand import PrintCommand | ||
from .proxycommand import ProxyCommand | ||
from .proxyschedulecommand import ProxyScheduleCommand | ||
from .repeatcommand import RepeatCommand | ||
from .runcommand import RunCommand | ||
from .schedulecommand import ScheduleCommand | ||
from .selectcommand import SelectCommand | ||
from .sequentialcommandgroup import SequentialCommandGroup | ||
from .startendcommand import StartEndCommand | ||
from .subsystem import Subsystem | ||
from .timedcommandrobot import TimedCommandRobot | ||
from .waitcommand import WaitCommand | ||
from .waituntilcommand import WaitUntilCommand | ||
from .wrappercommand import WrapperCommand | ||
|
||
__all__ = [ | ||
"cmd", | ||
"Command", | ||
"CommandBase", | ||
"CommandGroupBase", | ||
"CommandGroup", | ||
"CommandScheduler", | ||
"ConditionalCommand", | ||
"SelectCommand", | ||
"FunctionalCommand", | ||
"IllegalCommandUse", | ||
"InstantCommand", | ||
"MecanumControllerCommand", | ||
"InterruptionBehavior", | ||
"NotifierCommand", | ||
"PIDCommand", | ||
"PIDSubsystem", | ||
"ParallelCommandGroup", | ||
"ParallelDeadlineGroup", | ||
"ParallelRaceGroup", | ||
"PerpetualCommand", | ||
"PrintCommand", | ||
"ProfiledPIDCommand", | ||
"ProfiledPIDSubsystem", | ||
"ProxyCommand", | ||
"ProxyScheduleCommand", | ||
"RamseteCommand", | ||
"RepeatCommand", | ||
"RunCommand", | ||
"ScheduleCommand", | ||
"SelectCommand", | ||
"SequentialCommandGroup", | ||
"StartEndCommand", | ||
"Subsystem", | ||
"SubsystemBase", | ||
"Swerve2ControllerCommand", | ||
"Swerve3ControllerCommand", | ||
"Swerve4ControllerCommand", | ||
"Swerve6ControllerCommand", | ||
"TimedCommandRobot", | ||
"TrapezoidProfileCommand", | ||
"TrapezoidProfileCommandRadians", | ||
"TrapezoidProfileSubsystem", | ||
"TrapezoidProfileSubsystemRadians", | ||
"Trigger", | ||
"WaitCommand", | ||
"WaitUntilCommand", | ||
# "button", | ||
# "cmd", | ||
"requirementsDisjoint", | ||
"WrapperCommand", | ||
# "none", | ||
# "runOnce", | ||
# "run", | ||
# "startEnd", | ||
# "runEnd", | ||
# "print_", | ||
# "waitSeconds", | ||
# "waitUntil", | ||
# "either", | ||
# "select", | ||
# "sequence", | ||
# "repeatingSequence", | ||
# "parallel", | ||
# "race", | ||
# "deadline", | ||
"Trigger", # was here in 2023 | ||
] | ||
|
||
def __getattr__(attr): | ||
if attr == "SubsystemBase": | ||
import warnings | ||
warnings.warn("SubsystemBase is deprecated", DeprecationWarning, stacklevel=2) | ||
return Subsystem | ||
|
||
if attr == "CommandBase": | ||
import warnings | ||
warnings.warn("CommandBase is deprecated", DeprecationWarning, stacklevel=2) | ||
return Command | ||
|
||
raise AttributeError("module {!r} has no attribute " | ||
"{!r}".format(__name__, attr)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.