... | @@ -78,16 +78,19 @@ The module provides 2 sample example code in 2 coding languages (CPP & Python) |
... | @@ -78,16 +78,19 @@ The module provides 2 sample example code in 2 coding languages (CPP & Python) |
|
- For python
|
|
- For python
|
|
<details>
|
|
<details>
|
|
<summary> Click to see your steps! </summary>
|
|
<summary> Click to see your steps! </summary>
|
|
|
|
|
|
- Make sure that you are in the folder codestyle/python, Check by running command `pwd`
|
|
- Make sure that you are in the folder codestyle/python, Check by running command `pwd`
|
|
- Type `cd {your-chosen-example}` in VScode terminal. (for ex: `cd tennis`)
|
|
- Type `cd {your-chosen-example}` in VScode terminal. (for ex: `cd tennis`)
|
|
- Run command
|
|
- Run command
|
|
- For Tennis `pycodestyle tennis.py`
|
|
- For Tennis `pycodestyle tennis.py`
|
|
- For yhatzee-game `pycodestyle yahtzee.py`
|
|
- For yhatzee-game `pycodestyle yahtzee.py`
|
|
- After running the command you will get a big list of errors in the coding style.
|
|
- After running the command you will get a big list of errors in the coding style.
|
|
|
|
|
|
</details>
|
|
</details>
|
|
- For CPP
|
|
- For CPP
|
|
<details>
|
|
<details>
|
|
<summary> Click to see your steps! </summary>
|
|
<summary> Click to see your steps! </summary>
|
|
|
|
|
|
- Make sure that you are in the folder codestyle/cpp, Check by running command `pwd`
|
|
- Make sure that you are in the folder codestyle/cpp, Check by running command `pwd`
|
|
- Type `cd {your-chosen-example}` in VScode terminal. (for ex: `cd tennis`)
|
|
- Type `cd {your-chosen-example}` in VScode terminal. (for ex: `cd tennis`)
|
|
- Run commands
|
|
- Run commands
|
... | @@ -98,18 +101,22 @@ The module provides 2 sample example code in 2 coding languages (CPP & Python) |
... | @@ -98,18 +101,22 @@ The module provides 2 sample example code in 2 coding languages (CPP & Python) |
|
make codestyle
|
|
make codestyle
|
|
```
|
|
```
|
|
- After running the command you will get a big list of errors in the coding style.
|
|
- After running the command you will get a big list of errors in the coding style.
|
|
|
|
|
|
</details>
|
|
</details>
|
|
|
|
|
|
7. Make changes to the code
|
|
7. Make changes to the code
|
|
- For Python Example
|
|
- For Python Example
|
|
<details>
|
|
<details>
|
|
<summary> Click to see your steps! </summary>
|
|
<summary> Click to see your steps! </summary>
|
|
|
|
|
|
- Run command `pytest`
|
|
- Run command `pytest`
|
|
- You will see your refactored code get tested. If anything fails the test will report the failure.
|
|
- You will see your refactored code get tested. If anything fails the test will report the failure.
|
|
|
|
|
|
</details>
|
|
</details>
|
|
- For CPP Example
|
|
- For CPP Example
|
|
<details>
|
|
<details>
|
|
<summary> Click to see your steps! </summary>
|
|
<summary> Click to see your steps! </summary>
|
|
|
|
|
|
- For Tennis example, run commands
|
|
- For Tennis example, run commands
|
|
```sh
|
|
```sh
|
|
make
|
|
make
|
... | @@ -121,18 +128,22 @@ The module provides 2 sample example code in 2 coding languages (CPP & Python) |
... | @@ -121,18 +128,22 @@ The module provides 2 sample example code in 2 coding languages (CPP & Python) |
|
./yahtzee_tests
|
|
./yahtzee_tests
|
|
```
|
|
```
|
|
- You will see your refactored code get tested. If anything fails the test will report the failure.
|
|
- You will see your refactored code get tested. If anything fails the test will report the failure.
|
|
|
|
|
|
</details>
|
|
</details>
|
|
|
|
|
|
8. Test if your refactored code passes all the tests.
|
|
8. Test if your refactored code passes all the tests.
|
|
- For Python
|
|
- For Python
|
|
<details>
|
|
<details>
|
|
<summary> Click to see your steps! </summary>
|
|
<summary> Click to see your steps! </summary>
|
|
|
|
|
|
- Run command `pytest`
|
|
- Run command `pytest`
|
|
- You will see your refactored code get tested. If anything fails the test will report the failure.
|
|
- You will see your refactored code get tested. If anything fails the test will report the failure.
|
|
|
|
|
|
</details>
|
|
</details>
|
|
- For CPP
|
|
- For CPP
|
|
<details>
|
|
<details>
|
|
<summary> Click to see your steps! </summary>
|
|
<summary> Click to see your steps! </summary>
|
|
|
|
|
|
- For Tennis example, run commands
|
|
- For Tennis example, run commands
|
|
```sh
|
|
```sh
|
|
make
|
|
make
|
... | @@ -144,6 +155,7 @@ The module provides 2 sample example code in 2 coding languages (CPP & Python) |
... | @@ -144,6 +155,7 @@ The module provides 2 sample example code in 2 coding languages (CPP & Python) |
|
./yahtzee_tests
|
|
./yahtzee_tests
|
|
```
|
|
```
|
|
- You will see your refactored code get tested. If anything fails the test will report the failure.
|
|
- You will see your refactored code get tested. If anything fails the test will report the failure.
|
|
|
|
|
|
</details>
|
|
</details>
|
|
|
|
|
|
9. Repeat the steps 6, 7, 8 till all the code style errors are solved.
|
|
9. Repeat the steps 6, 7, 8 till all the code style errors are solved.
|
... | @@ -166,7 +178,7 @@ The module provides 2 sample example code in 2 coding languages (CPP & Python) |
... | @@ -166,7 +178,7 @@ The module provides 2 sample example code in 2 coding languages (CPP & Python) |
|
11. See your code Build, Test and Deploy via CI/CD.
|
|
11. See your code Build, Test and Deploy via CI/CD.
|
|
- Go to your repository (the one that you have forked), CI/CD --> Pipelines.
|
|
- Go to your repository (the one that you have forked), CI/CD --> Pipelines.
|
|
|
|
|
|
![pipleines](upload/Screenshot%20from%202020-11-03%2015-34-57.png)
|
|
![pipleines](upload/pipeline1.png)
|
|
|
|
|
|
- You can see Build, Test and Deploy devOps stages passing.
|
|
- You can see Build, Test and Deploy devOps stages passing.
|
|
|
|
|
... | | ... | |