Skip to content

Commit 2aef4d3

Browse files
author
Sagar Chalise
committed
docusaurus v2 test and run
1 parent 73a8808 commit 2aef4d3

File tree

5 files changed

+18
-39
lines changed

5 files changed

+18
-39
lines changed

docs/python/classes.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ title: Classes
44
sidebar_label: Classes
55
---
66

7+
#### The following convention should be followed for `class` naming:
78

8-
#### Contents...
9-
9+
* Avoid inbuilt names.
1010
* Classes names should always be `PascalCase`. i.e. `MyClass`
11-
* Avoid inbuilt names for class.
1211
* Even if you are building datatypes based on inbuilt class use PascalCase. i.e. `MyDict(dict):`
1312
* Describe the class resposibility in name.

docs/python/files.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
---
22
id: files
3-
title: Files & Folders
4-
sidebar_label: Files & Folders
3+
title: Files, Folders & Modules
4+
sidebar_label: Files, Folders & Modules
55
---
66

7-
## Contents...
8-
9-
10-
####Naming Conventions
7+
#### The following convention should be followed for files, folders and package naming:
118

129
* Name in `snake_case` or descriptive single words all in **lowercase**. E.g. `helper.py` or `sftp_fetcher.py` or `tools`
1310
* Be explicit and descriptive of their functionality. Donot have short and ambigous file and folder names.
@@ -16,5 +13,5 @@ sidebar_label: Files & Folders
1613
* Donot Clash names with inbuilt and famous modules.
1714
- E.g. donot use `requests.py` or `list.py`
1815
* Be consistent when you are naming. Go with one form when choosing singular or plural names. i.e.
19-
- :ballot_box_with_check: `tools`, `utils` or `tool`, `util` :x: `tools`, `util`
16+
- `tools`, `utils` or `tool`, `util` but not `tools`, `util` combination.
2017
* When designing OOP styled files, go for `abstract.py`, `base.py` or `parent.py` like files/folders for abstract classes.

docs/python/functions.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
22
id: functions
3-
title: Function
3+
title: Functions and Methods
44
sidebar_label: Functions
55
---
66

7-
#### 1. Contents...
7+
#### The following convention should be followed for `def` naming:
88

9+
* Avoid inbuilt names.
910
* `snake_case` or descriptive single word in **lowercase** should be used.
1011
* function names should explain the functionality.
1112
* for bound methods `self` should be used for first argument.
12-
* for class methos `cls` should be used for first argument.
13+
* for class methods `cls` should be used for first argument.
1314
* `decorators` should be named in function convention.

docs/python/variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Variables
44
sidebar_label: Variables
55
---
66

7-
#### 1. Contents...
7+
#### The following convention should be followed for variable naming:
88

99
* `snake_case` or descriptive word all in **lowercase** for any type of variables except `CONSTANTS`.
1010
* `ALL_CAPS` for constants. `python` doesnot have the concept of constants so this is just a convention.

sidebars.js

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,13 @@ module.exports =
66
],
77
"Python": [
88
{
9-
"type": "subcategory",
10-
"label": "Files, Folders and Modules",
11-
"ids": [
12-
"python/files"
13-
]
14-
},
15-
{
16-
"type": "subcategory",
17-
"label": "Variables",
18-
"ids": [
19-
"python/variables"
20-
]
21-
},
22-
{
23-
"type": "subcategory",
24-
"label": "Functions and Methods",
25-
"ids": [
26-
"python/functions"
27-
]
28-
},
29-
{
30-
"type": "subcategory",
31-
"label": "Classes",
32-
"ids": [
33-
"python/classes"
9+
"type": "category",
10+
"label": "Naming Convention",
11+
"items": [
12+
"python/files",
13+
"python/variables",
14+
"python/functions",
15+
"python/classes",
3416
]
3517
}
3618
],

0 commit comments

Comments
 (0)