Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
D docker-containers
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Public
  • docker-containers
  • Wiki
  • code refactoring

code refactoring · Changes

Page history
added the refactoring code authored Nov 04, 2020 by Yogesh Hegde's avatar Yogesh Hegde
Show whitespace changes
Inline Side-by-side
Showing with 15 additions and 3 deletions
+15 -3
  • code-refactoring.md code-refactoring.md +15 -3
  • No files found.
code-refactoring.md
View page @ d0436745
......@@ -78,16 +78,19 @@ The module provides 2 sample example code in 2 coding languages (CPP & Python)
- For python
<details>
<summary> Click to see your steps! </summary>
- 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`)
- Run command
- For Tennis `pycodestyle tennis.py`
- For yhatzee-game `pycodestyle yahtzee.py`
- After running the command you will get a big list of errors in the coding style.
</details>
- For CPP
<details>
<summary> Click to see your steps! </summary>
- 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`)
- Run commands
......@@ -98,18 +101,22 @@ The module provides 2 sample example code in 2 coding languages (CPP & Python)
make codestyle
```
- After running the command you will get a big list of errors in the coding style.
</details>
7. Make changes to the code
- For Python Example
<details>
<summary> Click to see your steps! </summary>
- Run command `pytest`
- You will see your refactored code get tested. If anything fails the test will report the failure.
</details>
- For CPP Example
<details>
<summary> Click to see your steps! </summary>
- For Tennis example, run commands
```sh
make
......@@ -121,18 +128,22 @@ The module provides 2 sample example code in 2 coding languages (CPP & Python)
./yahtzee_tests
```
- You will see your refactored code get tested. If anything fails the test will report the failure.
</details>
8. Test if your refactored code passes all the tests.
- For Python
<details>
<summary> Click to see your steps! </summary>
- Run command `pytest`
- You will see your refactored code get tested. If anything fails the test will report the failure.
</details>
- For CPP
<details>
<summary> Click to see your steps! </summary>
- For Tennis example, run commands
```sh
make
......@@ -144,6 +155,7 @@ The module provides 2 sample example code in 2 coding languages (CPP & Python)
./yahtzee_tests
```
- You will see your refactored code get tested. If anything fails the test will report the failure.
</details>
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)
11. See your code Build, Test and Deploy via CI/CD.
- 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.
......
Clone repository
  • Installing tools
  • Readme doc format
  • code refactoring
  • code style container
  • day0
  • devops practical
  • docusaurus
  • Home
  • install on mac
  • install tools ubuntu 16.04
  • install tools windows