{"id":21130616,"url":"https://github.com/choate-robotics/b_block_swerve","last_synced_at":"2025-07-01T01:37:49.298Z","repository":{"id":210284159,"uuid":"726191089","full_name":"Choate-Robotics/B_Block_Swerve","owner":"Choate-Robotics","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-05T19:53:26.000Z","size":39,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T12:14:03.614Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Choate-Robotics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-01T18:21:41.000Z","updated_at":"2023-12-05T12:37:53.000Z","dependencies_parsed_at":"2025-01-21T06:11:10.488Z","dependency_job_id":"fdd4f4ab-5a37-4bc7-ae4f-ea552c47a350","html_url":"https://github.com/Choate-Robotics/B_Block_Swerve","commit_stats":null,"previous_names":["choate-robotics/b_block_swerve"],"tags_count":0,"template":false,"template_full_name":"Choate-Robotics/7407-DriveCode-Template","purl":"pkg:github/Choate-Robotics/B_Block_Swerve","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Choate-Robotics%2FB_Block_Swerve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Choate-Robotics%2FB_Block_Swerve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Choate-Robotics%2FB_Block_Swerve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Choate-Robotics%2FB_Block_Swerve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Choate-Robotics","download_url":"https://codeload.github.com/Choate-Robotics/B_Block_Swerve/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Choate-Robotics%2FB_Block_Swerve/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262880411,"owners_count":23378782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T05:35:42.023Z","updated_at":"2025-07-01T01:37:49.275Z","avatar_url":"https://github.com/Choate-Robotics.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 7407-DriveCode-{TEMPLATE}\n\nTeam 7407 Wired Boars {TEMPLATE} Robot Code\n\n## File Tree:\n```\n7407-DriveCode-Template\n├── autonomous (Contains autonomous routines for robot)\n├── command (Contains commands for command scheduling)\n│   └── __init__.py\n├── oi (Operator Interface)\n│   ├── OI.py (Contains keymappings to commands)\n│   └── keymap.py (Contains controller keymaps for each subsystem and controller)\n├── sensors (Contains sensor classes)\n│   └── __init__.py (Contains sensor classes)\n├── subsystem (Contains subsystem classes)\n│   └── __init__.py\n├── tests (Contains custom tests for code verification)\n│   └── __init__.py\n│   └── conftest.py (Contains test fixtures)\n│   └── test_examples.py (Contains test examples for writing tests)\n├── utils (Contains utilities like optimizations, conversions)\n│   └── __init__.py\n├── .gitignore (Filters out unnecessary files, for example *.pyc)\n├── README.md (This file)\n├── constants.py (Variables held constant throughout code.)\n├── config.py (Easy configurations for entire robot.)\n├── poetry.lock (DO NOT EDIT. Use \"poetry add {package}\" to add packages.)\n├── pyproject.toml (DO NOT EDIT.)\n├── robot.py (Central program, controls everything.)\n└── robot_systems.py (Contains initialized sensors and subsystems)\n```\n\n\n## Getting Started:\n\nYou will need to have at least python 3.10 installed on your computer. \n\n\n### Apple Silicon ARM Mac\n\nIf you have a Apple Silicon ARM mac, at some point you will be asked to intall Rosetta, you will be asked to install it at some point. It is required, so go ahead when it asks.\n\nIf you want to know if Rosetta is installed you can look at the folder ```usr/libexec/Rosetta```. If there is any files in this folder then you have Rosetta installed.\n\nYou will need to intall the intel x64 version python 3.10 on your computer. \n\n#### Install Homebrew\n\nYou will need to install homebrew first.\n\n```\narch -x86_64 /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n\n```\n\n#### Install Python\nAll the intel versions of all software on the Mac is in the ```/usr/local/bin``` folder. You will need to be in that directory to run any of the intel versions on your Mac. After getting into ```/usr/local/bin``` then use homebrew to install at least python 3.10.\n```\n\narch -x86_64 ./brew install python@3.10\n\n```\n\nIf you want a convenient alias for intel python, run the next command with the successful python from the last command:\n\n```\n echo \"alias python86='arch -x86_64 /usr/local/bin/python3.10-intel64'\" \u003e ~/.zshrc\n```\n\n\n#### Install Poetry\n\n```\narch -x86_64 curl -sSL https://install.python-poetry.org | ./python3-intel64 -\n```\n\nYou may get an error when you try to install poetry:\n\n```\nurllib.error.URLError: \u003curlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)\u003e\n```\n\nIf this happens you need go to spotlight and run ```Install Certificates.Command```.  Then you will be able to install poetry.\n\nAfter poetry installation is complete, change into a directory where you want python programs\n\n```\n      git clone https://github.com/Choate-Robotics/7407-DriveCode-Template.git\n      cd 7407-DriveCode-Template\n      poetry update\n ```\n   \n To open virtualenv shell (Run this every time you open a new terminal in that folder)\n ```\n      python86 -m poetry shell\n ```\n\n### Non-Mac Directions\n\n#### Clone the repository code onto your computer:\n\n```\n\ngit clone https://github.com/Choate-Robotics/7407-DriveCode-Template.git\n\n```\nIf you prefer ssh:\n\n```\n\ngit clone git@github.com:Choate-Robotics/7407-DriveCode-Template.git\n\n```\n\n### If you don't have Poetry installed already:\n\n#### Linux and Mac\n\n```\n\ncurl -k https://install.python-poetry.org/ | python3 - \n\n```\nYou might have to replace \"python\" at the end with \"python3\" depending on how python is configured in your system.\n\n#### Windows Powershell\n\n```\n\n(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python -\n\n```\n\nFurther information can be found here: https://python-poetry.org/docs/\n\n\n\nMake sure to add Poetry to your path.\n\n\n\n### With Poetry Installed:\n\n```\n\npoetry shell\n\npoetry install\n\n```\n\n### Deploying Code:\nConnect to the robot's wifi.\n``python robot.py deploy``\nIf absolutely necessary, use ``python robot.py deploy --no-version-check`` to avoid WPILib version issues on the robot.\n\n\n## Best Practices\n\n### Pre-Commit, Formatting\n\nMake sure to run ```pre-commit install``` before your first commit. When you commit, pre-commit will automatically check all files you have staged using Flake8, Black, ISort, and other formatters.\n\n- If the response contains an ERROR:\n\n\t- If the error response contains \"Files were modified by this hook\":\n\t\t- ``git add .``\n\t\t- ``git commit -m \"Message\"``\n\t- Otherwise, manually fix the issues outlined, re-stage your files ( ``git add.``) and recommit.\n\nDo not forget to ``git add .`` before committing.\n\n### Commenting\nComment, comment, comment!\n - Use block quotes to start any function with parameters, and every class's \"\\_\\_init\\_\\_\" function. Block quotes should contain:\n\t - Summary\n\t - Arguments, with types and descriptions\n\t - Return description\n\t There are many extensions to help with docstrings. Examples include:\n\t\t - autoDocstring on VsCode\n\t\t - On PyCharm\n\t\t\t - Place your cursor over a function or class name.\n\t\t\t - Alt-Enter\n\t\t\t - Generate documentation string stub\n - Use single line comments for any function without parameters with a description of the function.\n - Use single line comments before any complex function to describe how it works, and to the right of any line or variable that is very complicated.\n - Use TODO comments freely.\n\n### Adding libraries\nAlways use ``poetry add {library}`` to add libraries. This ensures that libraries are compatible and allows everyone to work easier.\nNever, ever, edit poetry.lock or pyproject.toml manually.\n\n### Committing, Pushing, and Pulling\nTo commit:\n```\ngit add .\ngit commit -m \"Message\"\n```\nTo push:\n```\ngit push\n```\nTo pull:\n```\ngit fetch\ngit pull\n```\n\n### Branching\nTo branch, first make sure that all your local changes are committed. If you would like to abandon the changes, run ``git reset --hard``. Be very careful with resetting.\nTo branch: ``git branch {branch name}\n\nBranch names are as follows:\n - Subsystem Initialization branch format: init/{subsystem}\n\t - Example: init/shooter\n\t - Example: init/drivetrain\n - Feature branch format: feat/{subsystems}/{feature}\n\t - Example: feat/shooter/optimized_shooting\n\t - Example: feat/intake-index/ejection\n - Fix branch format: fix/{subsystems}/issue\n\t - Example: fix/camera_server/wrong_ports\n\t - Example: fix/robot/network_loop_time\n\t - Example: fix/sensors/clean_up\n - Competition branch format: comp/{competition}/day/{day}\n\t - Example: comp/battlecry/day/0 (load_in, initial setup, configurations)\n\t - Example: comp/hartford/day/1\n\n### Pull Requests\nTo integrate a branch with branch **Main**,  create a pull-request with the same title as your branch. Make sure pre-commits pass before pushing to ensure clean code.\n\n### Competition Exceptions\n#### Pre-commits\n - To avoid frustration, please use ``git commit -m \"{Message}\" --no-verify``\n### Debugging:\n#### Logger\n - USE LOGGER! It makes it easier on everyone to debug.\n#### Smart Dashboard/Shuffleboard\n - Shuffleboard is preferred over the Smart Dashboard and console for debugging. To use shuffleboard, just push a string, number, boolean, or similar value to the SmartDashboard using \"wpilib.SmartDashboard.pushNumber ...\" etc. The value is then accessible through ShuffleBoard.\n\n## Resources\n - [RobotPy Documentation](https://robotpy.readthedocs.io/en/stable/) We love RobotPy!\n - [WPILib Documentation](https://docs.wpilib.org/en/stable/index.html) RobotPy is just a wrapper for the WPILib C++ Code. Most of the structure remains the same.\n - [Chief Delphi](https://www.chiefdelphi.com/) Many a sensor problem have been fixed by looking here.\n - [7407 DriveCode-2021-Python](https://github.com/Choate-Robotics/7407-DriveCode-2021-Python) Worlds level code!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoate-robotics%2Fb_block_swerve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchoate-robotics%2Fb_block_swerve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoate-robotics%2Fb_block_swerve/lists"}