-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheatsheet.txt
56 lines (37 loc) · 1.38 KB
/
cheatsheet.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
NETWORKX
weird errors? Are you in the right virtual env?
$ source networkx-dev/bin/activate
Test specific file
$ PYTHONPATH=. pytest networkx/generators/tests/test_line.py
cov report
$ PYTHONPATH=. pytest --cov=networkx/generators --cov-report term-missing --runslow --doctest-modules --durations=20 --pyargs networkx/generators
$ PYTHONPATH=. pytest --cov=networkx networkx
Doctest
$ PYTHONPATH=. pytest --doctest-modules networkx
documentation
$ make html
sync main
$ git fetch upstream main
$ git merge upstream/main
link issue to pr
Closes #issue_number
NX-GUIDES
virtual env
$ source nx-guides-dev/bin/activate
nx-guides workflow
https://github.com/networkx/nx-guides/blob/main/.github/workflows/notebooks.yml (workflow)
pre-commit (use bash script)
# The following commands finds ALL the .md files in the repository
$ find content/ -name "*.md" -exec jupytext --to notebook {} \;
# Run pre-commit on all files
$ pre-commit run --all-files --show-diff-on-failure --color always
# Convert all the new "cleaned" ipynb files to myst
$ find content/ -name "*.ipynb" -exec jupytext --to md:myst {} \;
# Remove the .ipynb files
$ find content/ -name "*.ipynb" -exec rm {} \;
Jupytext
https://jupytext.readthedocs.io/en/latest/install.html
From jupyter notebook to myst
jupytext --to md:myst file.ipynb
Myst format
https://myst-nb.readthedocs.io/en/latest/authoring/text-notebooks.html