You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 91fd6bb
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/part1/linting.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,8 @@ exclude = docs,venv
26
26
max-line-length = 100
27
27
```
28
28
29
+
To ignore `flake8` formatting on certain lines, or ignore certain rules, see: [Ignoring Errors with Flake8](https://flake8.pycqa.org/en/3.1.1/user/ignoring-errors.html).
30
+
29
31
## Code consistency
30
32
Flake8 only checks the consistency of your code to a certain extent.
31
33
Modern Python allows for [type hints](https://peps.python.org/pep-0484/) which means that you can specify the input and output type for functions.
@@ -55,4 +57,6 @@ files = [
55
57
"tests"# Does not show errors when importing untyped libraries
56
58
]
57
59
```
58
-
where `ignore_missing_imports` is set to `True` to supress all errors coming from third-party libraries that are untyped.
60
+
where `ignore_missing_imports` is set to `True` to supress all errors coming from third-party libraries that are untyped.
61
+
62
+
To let `mypy` ignore single lines or whole files, see: [Locally silencing the checker](https://mypy.readthedocs.io/en/stable/common_issues.html#spurious-errors-and-locally-silencing-the-checker).
To make it simple to integrate the Jupyter-book with Github, we using Github Pages, as described in
4
+
[Publishing to Github Pages](publishing-to-pages).
5
+
6
+
## Official Github Actions
7
+
Follow the steps in [Publishing with a Github Custom Actions workflow](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow)
8
+
9
+
Follow the steps in [Creating a custom Github Actions](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#creating-a-custom-github-actions-workflow-to-publish-your-site),
10
+
11
+
For step 3, we would call `make doc` to generate the documentation at `docs/_build/html`, which in turn is the folder we upload as a Github page.
12
+
13
+
A Github action showing some of the steps can be found at [Actions/deploy-pages](https://github.com/actions/deploy-pages#usage).
14
+
15
+
16
+
## Using a Github branch for publishing
17
+
If one is using the `legacy` workflow from [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages#github-pages-action) one would publish the html files to a branch, usually `gh-pages`.
18
+
19
+
1. On Github navigate to your repository
20
+
2. Under your repository name, choose `Settings`
21
+
3. Press `Pages`.
22
+
4. Under `Build and deployment` choose `Source: Deploy from a branch` and set the `branch` to `gh-pages`.
0 commit comments