You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
94
95
A. If using WSL, follow the instructions under the `Linux` section 2.
@@ -107,6 +108,7 @@ Skip this section if you set up a Docker development environment.
107
108
4. Setup pre-commit.
108
109
In the WSL, under the OBC-firmware directory, run the following commands:
109
110
```sh
111
+
curl -fsSL https://deno.land/install.sh | sh # Deno is required for pre-commit
110
112
pip install -r requirements.txt # You may want to create a Python virtual env before this if you haven't already
111
113
pre-commit install
112
114
```
@@ -129,7 +131,7 @@ brew install make
129
131
brew install gcc
130
132
```
131
133
132
-
2. Install Python 3.10 and setup Python virtual environment (Only required for Python devs)
134
+
2. Install Python 3.10 and setup Python virtual environment (Only required for Backend devs)
133
135
134
136
Run the following commands in the OBC-firmware directory:
135
137
@@ -144,6 +146,7 @@ pip install -e .
144
146
3. Setup pre-commit
145
147
146
148
```sh
149
+
curl -fsSL https://deno.land/install.sh | sh # Deno is required for pre-commit
147
150
pip install -r requirements.txt # You may want to create a Python virtual env before this if you haven't already
148
151
pre-commit install
149
152
```
@@ -156,10 +159,10 @@ Skip this section if you set up a Docker development environment.
2. Install Python 3.10 and setup Python virtual environment (Only required for Python devs)
165
+
2. Install Python 3.10 and setup Python virtual environment (Only required for Backend devs)
163
166
164
167
Run the following commands in the OBC-firmware directory:
165
168
@@ -174,6 +177,7 @@ pip install -e .
174
177
3. Setup pre-commit
175
178
176
179
```sh
180
+
curl -fsSL https://deno.land/install.sh | sh # Deno is required for pre-commit
177
181
pip install -r requirements.txt # You may want to create a Python virtual env before this if you haven't already
178
182
pre-commit install
179
183
```
@@ -280,6 +284,24 @@ Then, click `Start` to begin a session. Select the `OBC-firmware.out` executable
280
284
281
285
We use Code Composer Studio for debugging the firmware. **TODO**: Write a tutorial on how to use CCS.
282
286
287
+
### **Frontend Development**
288
+
289
+
To run the frontend, you will need Deno 2 installed which was installed in the pre-commit setup instructions above.
290
+
291
+
#### **Running the ARO Frontend**
292
+
293
+
```sh
294
+
cd gs/frontend/aro # Assuming you are in the top-level directory
295
+
deno task dev # This will start the frontend on localhost:5173
296
+
```
297
+
298
+
#### **Running the MCC Frontend**
299
+
300
+
```sh
301
+
cd gs/frontend/mcc # Assuming you are in the top-level directory
302
+
deno task dev # This will start the frontend on localhost:5173
303
+
```
304
+
283
305
## Contributing
284
306
285
307
1. Make sure you're added as a member to the UW Orbital organization on GitHub.
@@ -428,6 +450,7 @@ File comments are not required
428
450
classPointTwoDimension:
429
451
"""
430
452
@brief Class for storing a 2D point
453
+
431
454
@attribute x (int) - x coordinate of the point
432
455
@attribute y (int) - y coordinate of the point
433
456
"""
@@ -436,7 +459,7 @@ class PointTwoDimension:
436
459
self.x = x
437
460
self.y = y
438
461
439
-
@dataclasses.dataclass
462
+
@dataclass
440
463
classPointTwoDimension:
441
464
"""
442
465
@brief Class for storing a 2D point
@@ -449,10 +472,10 @@ class PointTwoDimension:
449
472
```
450
473
451
474
```python
452
-
import enum
475
+
from enumimport Enum
453
476
454
477
# No comments required
455
-
classErrorCode(enum.Enum):
478
+
classErrorCode(Enum):
456
479
"""
457
480
@brief Enum for the error codes
458
481
"""
@@ -472,9 +495,9 @@ class ErrorCode(enum.Enum):
472
495
473
496
```python
474
497
# For brevity, the class comments were removed but they should be in real code
475
-
import dataclasses
498
+
from dataclassesimport dataclass
476
499
477
-
@dataclasses.dataclass
500
+
@dataclass
478
501
classPointTwoDimension:
479
502
x: int
480
503
y: int
@@ -488,9 +511,9 @@ class ErrorCode(enum.Enum):
488
511
-`EnumName` in PascalCase
489
512
490
513
```python
491
-
import enum
514
+
from enumimport Enum
492
515
493
-
classErrorCode(enum.Enum):
516
+
classErrorCode(Enum):
494
517
SUCCESS=0
495
518
INVALID_ARG=1
496
519
@@ -508,21 +531,21 @@ Handled by pre-commit
508
531
#### Notes about imports
509
532
510
533
- Imports should only be used at the top of the file (no function or scoped imports)
511
-
-Only modules should be imported
534
+
-Modules should not be imported
512
535
513
536
```python
514
537
# module1 contains very_long_module_name and function foo and variable var.
515
538
# very_long_module_name contains bar
516
539
517
-
#Yes:
518
-
from module1 import very_long_module_name as module2# Casting to shorter name
540
+
#No:
541
+
from module1 import very_long_module_name as module2
519
542
import module1
520
543
521
544
module1.foo()
522
545
module1.var
523
546
module2.bar()
524
547
525
-
#No:
548
+
#Yes:
526
549
from module1.very_long_module_name import bar
527
550
from module1 import foo, var
528
551
@@ -547,6 +570,44 @@ bar()
547
570
548
571
**[Back to top](#table-of-contents)**
549
572
573
+
## Typescript/React Style Guide
574
+
575
+
### Comments
576
+
577
+
#### Single Line Comments
578
+
579
+
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.
580
+
581
+
#### Function Comments
582
+
583
+
Function comments should follow the format shown below:
584
+
```typescript
585
+
/**
586
+
* @brief Adds two numbers together
587
+
*
588
+
* @paramnum1 - The first number to add.
589
+
* @paramnum2 - The second number to add.
590
+
* @return Returns the sum of the two numbers.
591
+
*/
592
+
function addNumbers(num1:number, num2:number):number {
593
+
returnnum1+num2;
594
+
}
595
+
```
596
+
597
+
#### File Comments
598
+
599
+
- File comments are not required
600
+
601
+
### ****Naming and typing conventions****
602
+
603
+
-`variableNames` in camelCase
604
+
-`functionNames()` in camelCase
605
+
-`CONSTANT_NAME` in CAPITAL_SNAKE_CASE
606
+
-`file_names` in snake_case
607
+
-`ClassName` and `ComponentName` in PascalCase
608
+
609
+
**[Back to top](#table-of-contents)**
610
+
550
611
## Authors
551
612
552
613
This codebase was developed by the members of UW Orbital, the University of Waterloo's CubeSat design team.
0 commit comments