Skip to content

Commit

Permalink
Improve repo docs (#32)
Browse files Browse the repository at this point in the history
* Improve readme

* add some more details

* change some stuff in contributing

* fix dependabot.yml

* actually fix dependabot.yml
  • Loading branch information
spacey-sooty authored Dec 31, 2023
1 parent ad2769e commit 3ff357f
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 18 deletions.
9 changes: 5 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
Expand All @@ -7,7 +8,7 @@ version: 2
directory: "/wombat"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Contributing to our 2024 Codebase.
Our 2024 Codebase is split up into two main projects, our robot code and our library Wombat. This will only focus on our robot code but if you our on programming team it is recomended that you also read the contributing guide for Wombat. This guide assumes you have already read the README.md.
Our 2024 Codebase is split up into two main projects, our robot code and our library Wombat. This will only focus on our robot code but if you are on our programming team it is recomended that you also read the contributing guide for Wombat. This guide assumes you have already read the README.

## Git
Whenever you start on something new create a new branch from your master branch. The branch name should describe what it aims to achieve. When you are done you should open a pull request to CurtinFRC master.
Expand All @@ -17,7 +17,10 @@ git push _remotename_ _branchname_ eg origin intake-fix
Issues should be created to report bugs or request features. Use the appropriate template for your issue and make sure to apply the appropriate labels. If you are working on an issue assign yourself to the issue.

## Creating Pull Requests
Pull requests should be created to resolve issues. Reference the issue you are resolving in your pull request. Pull requests are required to pass continuous integration checks that run automatically, follow formatting rules as per Wombat documentation. Request a review from programming captain.
Pull requests should be created to resolve issues. Reference the issue you are resolving in your pull request. Pull requests are required to pass continuous integration checks that run automatically. This will include formatting, tests and build checks. Your pull request will automatically request a review from relevant teams.

## Wombat Contributions
Wombat contributions are expected to follow the guidelines set out in the contributing guide for Wombat. All Wombat changes during build season will be periodically reviewed and merged into a seperate branch of Wombat during build season. Outside of build season it will be less periodically merged in but will be directly merged to master. As Wombat is a 4788 published library there are stricter standards.

## Code Formatting
We have strict formatting rules to keep code consistent. We use the [WPILib styleguide](https://github.com/wpilibsuite/styleguide). In particular this means we use wpiformat. You can see [here](https://github.com/wpilibsuite/styleguide/blob/main/wpiformat/README.rst) how to install it. Before opening a pull request make sure to run wpiformat on the codebase.
43 changes: 32 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
CurtinFRC 2024 Codebase
===
Our code for the 2024 FRC game, CRESCENDO, using GradleRIO, Wombat, and probably other stuff. Contains two key sections, src/ where all our robot code is stored and wombat/ where our teams library Wombat is stored. To get started follow the setup instructions and read more in [CONTRIBUTING.md](./CONTRIBUTING.md).

# Setup
Setup
===

**This assumes that you have the WPILib tools installed. If you do not, follow the instructions [here](https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-2/wpilib-setup.html).**
First install WPILib and if running Windows the FRC game tools. Instructions can be found [here](https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-2/index.html).

## Linux
Linux
---
Fork this repository then open up a terminal and run :
```bash
git clone https://github.com/*yourusernamehere*/2024-Crescendo.git
cd 2024-Crescendo
chmod +x init
./init
chmod +x init.sh
./init.sh
```
Now look in [CONTRIBUTING.md](./CONTRIBUTING.md) before continuing!

## Windows
Windows
---
Fork this repository then open up a terminal and run :
```powershell
git clone https:\\github.com\*yourusernamehere*\2024-Crescendo.git
Expand All @@ -24,21 +28,38 @@ cd 2024-Crescendo
```
Now look in [CONTRIBUTING.md](./CONTRIBUTING.md) before continuing!

# Quick Commands
Quick Commands
===
These commands can be used in a variety of combinations, feel free to experiment!

## Build
Build
---
`./gradlew build`
Build will compile and get the code ready without deploying it. It will also run all automated tests, which is great for testing your code before it ever gets run on a robot (which also means you can build whenever).
Build will compile and get the code ready without deploying it. It will also run all automated tests, which is great for testing your code before it ever gets run on a robot (which also means you can build whenever).

`./gradlew :Wombat:build`
Will compile and build the Wombat library. Also runs all of Wombat's inbuilt tests.

## Deploy
Deploy
---
`./gradlew deploy`
Deploying will build your code (as above), and deploy it to the robot. You have to be connected to the robot for this to work. Just keep in mind that deploying does not run any automated tests

## Clean
Clean
---
`./gradlew clean`
Cleaning removes caches of your compiled code. If you do not understand an error it can often help to clean before getting help. Clean building is slower so you should not generally use it.

Simulation
----------
**Release**
`./gradlew :nativeSimulation`
Runs a simulation of your code at highest optimisation.

**Debug**
`./gradlew :nativeSimulationDebug`
Runs a debug simulation of your code, including a variety of debugging tools similar to glass but at lower optimisation.

Documentation
=============
Our documentation for Wombat and each years codebase can be found [here](https://4788-docs.vercel.app/). It is a powerful reference for writing code using Wombat going over how to use and the implementation for everything within Wombat. It also has a variety of guides to teach you how to use a variety of things in a more tutorial style way.
1 change: 0 additions & 1 deletion init → init.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/sh
sudo apt update
sudo apt install -y openjdk-11-jre-headless
chmod +x gradlew
./gradlew installRoborioToolchain
./gradlew build
Expand Down

0 comments on commit 3ff357f

Please sign in to comment.