Skip to content

Commit 8723aa7

Browse files
committed
Added the Markdown commands to the README.md
1 parent 1cde4ff commit 8723aa7

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,5 @@ dmypy.json
137137
src/demo/examples/*/
138138

139139
# Bump My Version
140-
.bumpversion.cfg
140+
.bumpversion.cfg
141+

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,24 @@ jupyter nbrefactor <notebook_path> <output_path> [OPTIONS]
125125
- `<output_path>`: Directory where the refactored Python modules will be saved.
126126

127127

128+
## Markdown Commands
129+
130+
The following table lists the currently implemented Markdown commands and their functions.
131+
132+
| Command | Description |
133+
|---------------------------------|-----------------------------------------------------------------------------------------------------------|
134+
| `$ignore-package` | Ignores all modules/packages until a header with a depth less than or equal to the current one is reached. |
135+
| `$ignore-module` | Ignores a single module (may consist of multiple code cells). |
136+
| `$ignore-cell` | Ignores the next code cell regardless of type. |
137+
| `$ignore-markdown` | Ignores the current Markdown cell (e.g., when used for instructions only). |
138+
| `$package=<name>` | Renames the current package and asserts the node type as 'package'. |
139+
| `$module=<name>` | Renames the current module and asserts the node type as 'module'. |
140+
| `$node=<name>` | Renames the current node generically, regardless of type. |
141+
| `$declare-package=<name>` | Declares a new node and asserts its type as 'package'. |
142+
| `$declare-module=<name>` | Declares a new node and asserts its type as 'module'. |
143+
| `$declare-node=<name>` | Declares a new node with no type (type will be inferred). |
144+
145+
128146
## Demo
129147

130148
There are several example notebooks provided to showcase **nbrefactor**'s capabilities.
@@ -162,4 +180,3 @@ In addition to following the [contribution guidelines](CONTRIBUTING.md), please
162180
**nbrefactor** is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.
163181

164182
---
165-

docs/source/about.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ The core of **nbrefactor**'s functionality lies in the Code Dependency Analyzer
3333
4. **Global Definition Tracking**: track all encountered definitions (declared functions and classes) globally. This inherently handles identifier shadowing.
3434
5. **Dependency Analysis**: analyze identifier usages in a given code block.
3535
6. **Dynamic Relative Import Resolution**: resolve local import statements dynamically depending on the current and target modules' positions in the tree.
36-
7. **Dependency Generation and Resolution**: generate the respective import statements (given the definitions' analysis in step 5 & 6) to be injected during the file-writing phase.
36+
7. **Dependency Generation and Resolution**: generate the respective import statements (given the definitions' analysis in step 5 & 6) to be injected during the file-writing phase.
37+

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@
4444
'Bug Reports': 'https://github.com/ThunderStruct/nbrefactor/issues',
4545
'Source': 'https://github.com/ThunderStruct/nbrefactor',
4646
}
47-
)
47+
)
48+

0 commit comments

Comments
 (0)