Metadata-Version: 2.4
Name: robotpy-cli
Version: 2026.0.1b1
Project-URL: repository, https://github.com/robotpy/robotpy-cli
Author-email: Dustin Spicuzza <robotpy@googlegroups.com>
License: Copyright © Dustin Spicuzza and contributors
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its contributors
           may be used to endorse or promote products derived from this software
           without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
        ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
        WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Requires-Python: >=3.8
Description-Content-Type: text/markdown

robotpy-cli
===========

New for 2024, this package is used to execute subcommands on a RobotPy project.
This does not actually implement any subcommands itself, but provides a mechanism
to execute those subcommands.

Usage
-----

On Windows:

    py -m robotpy

On Linux/macOS:

    python -m robotpy

See the RobotPy documentation for more information.

How RobotPy subcommands are implemented
---------------------------------------

When a user runs `robotpy` or `python -m robotpy`, they are presented with
several subcommands. Each of these subcommands is implemented as a class
that is registered using python's entry point mechanism in the "robotpy_cli.YEAR"
group. The registered class must meet the following requirements:

* The docstring of the class is used when the user does --help. The first
  line is treated as the summary, and all other lines are displayed when
  the subcommand specific help is queried.

If the subcommand is a group of commands:

* The class must have a `subcommands` attribute, which is a list of
  (name, subcommand_class) tuples. The subcommand_class must meet the requirements
  for a subcommand.

If it is a subcommand that is executed:

* The constructor must take a single argument, an argparse.ArgumentParser.
  The object may register any arguments or subparsers that it needs.
* The `run` function is called when the subcommand is used by the user.
  The arguments to this function are passed in by name, and the names can
  be any of the options that the subcommand registered. There are two other
  special argument names:
  * `options` - if specified, this is the Namespace returned by parse_args
  * `robot_class` - if specified, the user's robot.py will be loaded and
    it will be inspected for their robot class, which will be passed in
    as this option
  * `main_file` - if specified, the name of the user's robot.py file. This
    is not guaranteed to exist unless robot_class is also an option.
  * `project_path` - if specified, the name of the directory that contains 
    the user's robot.py file. This is not guaranteed to exist unless robot_class
    is also an option.
