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
@@ -22,7 +23,7 @@ This section will explain how to set up the repo, and how to build, flash, and d
22
23
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.
23
24
2. To clone this project, run the following command in whatever directory you want to store the repository in:
curl -fsSL https://deno.land/install.sh | sh # Deno is required for pre-commit
67
69
pre-commit install
68
70
```
69
71
@@ -83,9 +85,9 @@ Skip this section if you set up a Docker development environment.
83
85
2. In WSL2, run the following:
84
86
```sh
85
87
sudo apt-get update
86
-
sudo apt-get install build-essential
88
+
sudo apt-get install build-essential curl
87
89
```
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)
89
91
A. If using WSL, follow the instructions under the `Linux` section 2.
90
92
91
93
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.
101
103
4. Setup pre-commit.
102
104
In the WSL, under the OBC-firmware directory, run the following commands:
103
105
```sh
106
+
curl -fsSL https://deno.land/install.sh | sh # Deno is required for pre-commit
104
107
pip install -r requirements.txt # You may want to create a Python virtual env before this if you haven't already
105
108
pre-commit install
106
109
```
@@ -121,7 +124,7 @@ brew install make
121
124
brew install gcc
122
125
```
123
126
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)
125
128
126
129
Run the following commands in the OBC-firmware directory:
127
130
```sh
@@ -134,6 +137,7 @@ pip install -e .
134
137
135
138
3. Setup pre-commit
136
139
```sh
140
+
curl -fsSL https://deno.land/install.sh | sh # Deno is required for pre-commit
137
141
pip install -r requirements.txt # You may want to create a Python virtual env before this if you haven't already
138
142
pre-commit install
139
143
```
@@ -144,10 +148,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)
154
+
2. Install Python 3.10 and setup Python virtual environment (Only required for Backend devs)
151
155
152
156
Run the following commands in the OBC-firmware directory:
153
157
```sh
@@ -160,6 +164,7 @@ pip install -e .
160
164
161
165
3. Setup pre-commit
162
166
```sh
167
+
curl -fsSL https://deno.land/install.sh | sh # Deno is required for pre-commit
163
168
pip install -r requirements.txt # You may want to create a Python virtual env before this if you haven't already
164
169
pre-commit install
165
170
```
@@ -431,21 +436,21 @@ Handled by pre-commit
431
436
#### Notes about imports
432
437
433
438
- Imports should only be used at the top of the file (no function or scoped imports)
434
-
-Only modules should be imported
439
+
-Modules shouldnot be imported
435
440
436
441
```python
437
442
# module1 contains very_long_module_name and function foo and variable var.
438
443
# very_long_module_name contains bar
439
444
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
442
447
import module1
443
448
444
449
module1.foo()
445
450
module1.var
446
451
module2.bar()
447
452
448
-
#No:
453
+
#Yes:
449
454
from module1.very_long_module_name import bar
450
455
from module1 import foo, var
451
456
@@ -470,6 +475,44 @@ bar()
470
475
471
476
**[Back to top](#table-of-contents)**
472
477
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
+
* @paramnum1 - The first number to add.
494
+
* @paramnum2 - The second number to add.
495
+
* @return Returns the sum of the two numbers.
496
+
*/
497
+
function addNumbers(num1:number, num2:number):number {
498
+
returnnum1+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
+
473
516
## Authors
474
517
This codebase was developed by the members of UW Orbital, the University of Waterloo's CubeSat design team.
0 commit comments