Skip to content

Commit 1bb1d25

Browse files
committed
Fix GH actions, update README and rm redundant aro/mcc READMEs
1 parent 137b175 commit 1bb1d25

File tree

5 files changed

+64
-97
lines changed

5 files changed

+64
-97
lines changed

.github/workflows/frontend_build.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v4
15-
- name: Use Node.js
16-
uses: actions/setup-node@v4
15+
- uses: denoland/setup-deno@v2
1716
with:
18-
node-version: '20.x'
19-
- name: Install dependencies for ${{matrix.project}}
17+
deno-version: v2.x
18+
- name: Install dependencies
2019
run: |
21-
cd ./gs/frontend/${{matrix.project}}
22-
npm ci
20+
cd ./gs/frontend/
21+
deno install
2322
- name: Build ${{matrix.project}}
2423
run: |
2524
cd ./gs/frontend/${{matrix.project}}
26-
npm run build
25+
deno task build

.github/workflows/pre-commit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
- uses: actions/setup-python@v3
1414
with:
1515
python-version: '3.10'
16+
- uses: denoland/setup-deno@v2
17+
with:
18+
deno-version: v2.x
1619
- id: file_changes
1720
uses: trilom/file-changes-action@v1.2.4
1821
with:

README.md

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This repository holds all the code written by UW Orbital's firmware team. This i
99
- [C Style Guide](#c-style-guide)
1010
- [Python Style Guide](#python-style-guide)
1111
- [Pytest Style Guide](#pytest-style-guide)
12+
- [Typescript/React Style Guide](#typescript/react-style-guide)
1213
- [Authors](#authors)
1314

1415
**[Back to top](#table-of-contents)**
@@ -22,7 +23,7 @@ This section will explain how to set up the repo, and how to build, flash, and d
2223
1. Check if you have Git installed on your system by running `git --version` in a terminal. If it returns some version number, then it's installed. If not, follow the installation steps listed [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). If you're on Windows, it's highly recommended that you also install Git Bash and use that instead of the command prompt or Powershell.
2324
2. To clone this project, run the following command in whatever directory you want to store the repository in:
2425
```
25-
git clone git@github.com:UWOrbital/OBC-firmware.git
26+
git clone https://github.com/UWOrbital/OBC-firmware.git
2627
```
2728

2829
### Dependencies
@@ -60,10 +61,11 @@ Once you open the docker instance, open a terminal in VSCode and run the followi
6061
This command opens a terminal in VSCode: ```Ctrl + Shift + ` ```
6162

6263
Enter these commands in your terminal:
63-
```
64+
```sh
6465
sudo apt-get update
65-
sudo apt-get install -y python3-pip build-essential cmake
66+
sudo apt-get install -y python3-pip build-essential cmake curl
6667
pip3 install -r requirements.txt
68+
curl -fsSL https://deno.land/install.sh | sh # Deno is required for pre-commit
6769
pre-commit install
6870
```
6971

@@ -83,9 +85,9 @@ Skip this section if you set up a Docker development environment.
8385
2. In WSL2, run the following:
8486
```sh
8587
sudo apt-get update
86-
sudo apt-get install build-essential
88+
sudo apt-get install build-essential curl
8789
```
88-
3. Choose the environment where you'll be running `git commit` (either WSL2 or the host) and install Python 3.10 and pip. (Only required for Python devs)
90+
3. Choose the environment where you'll be running `git commit` (either WSL2 or the host) and install Python 3.10 and pip. (Only required for Backend devs)
8991
A. If using WSL, follow the instructions under the `Linux` section 2.
9092
9193
B. If you are using Windows. Run the following commands in the OBC-firmware directory:
@@ -101,6 +103,7 @@ Skip this section if you set up a Docker development environment.
101103
4. Setup pre-commit.
102104
In the WSL, under the OBC-firmware directory, run the following commands:
103105
```sh
106+
curl -fsSL https://deno.land/install.sh | sh # Deno is required for pre-commit
104107
pip install -r requirements.txt # You may want to create a Python virtual env before this if you haven't already
105108
pre-commit install
106109
```
@@ -121,7 +124,7 @@ brew install make
121124
brew install gcc
122125
```
123126
124-
2. Install Python 3.10 and setup Python virtual environment (Only required for Python devs)
127+
2. Install Python 3.10 and setup Python virtual environment (Only required for Backend devs)
125128
126129
Run the following commands in the OBC-firmware directory:
127130
```sh
@@ -134,6 +137,7 @@ pip install -e .
134137
135138
3. Setup pre-commit
136139
```sh
140+
curl -fsSL https://deno.land/install.sh | sh # Deno is required for pre-commit
137141
pip install -r requirements.txt # You may want to create a Python virtual env before this if you haven't already
138142
pre-commit install
139143
```
@@ -144,10 +148,10 @@ Skip this section if you set up a Docker development environment.
144148
1. Install required build tools (CMake, Make, gcc)
145149
```sh
146150
sudo apt-get update
147-
sudo apt-get install build-essential
151+
sudo apt-get install build-essential curl
148152
```
149153

150-
2. Install Python 3.10 and setup Python virtual environment (Only required for Python devs)
154+
2. Install Python 3.10 and setup Python virtual environment (Only required for Backend devs)
151155

152156
Run the following commands in the OBC-firmware directory:
153157
```sh
@@ -160,6 +164,7 @@ pip install -e .
160164

161165
3. Setup pre-commit
162166
```sh
167+
curl -fsSL https://deno.land/install.sh | sh # Deno is required for pre-commit
163168
pip install -r requirements.txt # You may want to create a Python virtual env before this if you haven't already
164169
pre-commit install
165170
```
@@ -431,21 +436,21 @@ Handled by pre-commit
431436
#### Notes about imports
432437

433438
- Imports should only be used at the top of the file (no function or scoped imports)
434-
- Only modules should be imported
439+
- Modules should not be imported
435440

436441
```python
437442
# module1 contains very_long_module_name and function foo and variable var.
438443
# very_long_module_name contains bar
439444

440-
# Yes:
441-
from module1 import very_long_module_name as module2 # Casting to shorter name
445+
# No:
446+
from module1 import very_long_module_name as module2
442447
import module1
443448

444449
module1.foo()
445450
module1.var
446451
module2.bar()
447452

448-
# No:
453+
# Yes:
449454
from module1.very_long_module_name import bar
450455
from module1 import foo, var
451456

@@ -470,6 +475,44 @@ bar()
470475

471476
**[Back to top](#table-of-contents)**
472477

478+
## Typescript/React Style Guide
479+
480+
### Comments
481+
482+
#### Single Line Comments
483+
484+
Variable and function names should be descriptive enough to understand even without comments. Comments are needed to describe any complicated logic. You may use `//` or `/* */` for single line comments.
485+
486+
#### Function Comments
487+
488+
Function comments should follow the format shown below:
489+
```typescript
490+
/**
491+
* @brief Adds two numbers together
492+
*
493+
* @param num1 - The first number to add.
494+
* @param num2 - The second number to add.
495+
* @return Returns the sum of the two numbers.
496+
*/
497+
function addNumbers(num1: number, num2: number): number {
498+
return num1 + num2;
499+
}
500+
```
501+
502+
#### File Comments
503+
504+
- File comments are not required
505+
506+
### ****Naming and typing conventions****
507+
508+
- `variableNames` in camelCase
509+
- `functionNames()` in camelCase
510+
- `CONSTANT_NAME` in CAPITAL_SNAKE_CASE
511+
- `file_names` in snake_case
512+
- `ClassName` and `ComponentName` in PascalCase
513+
514+
**[Back to top](#table-of-contents)**
515+
473516
## Authors
474517
This codebase was developed by the members of UW Orbital, the University of Waterloo's CubeSat design team.
475518

gs/frontend/aro/README.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

gs/frontend/mcc/README.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)