Skip to content

Commit

Permalink
Replace Just the Docs with MkDocs (#13)
Browse files Browse the repository at this point in the history
* Replace Just-the-Docs with MkDocs

* Document the library

* Use default system fonts instead of imposing Roboto

* Change styling of keywords, comments, docstrings

* Integrate notebooks in documentation

* Move examples and templates from Deepnote/ to docs/

* Make external links open in new tabs

* Add configuration rationale
  • Loading branch information
mwermelinger authored Feb 26, 2024
1 parent f355d79 commit 1393b35
Show file tree
Hide file tree
Showing 29 changed files with 491 additions and 774 deletions.
13 changes: 7 additions & 6 deletions Deepnote/algoesup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
def test(function: Callable, test_table: list) -> None:
"""Test the function with the test_table. Report failed tests.
Preconditions: each element of test_table is a list or tuple with
- a string (the test case name)
- one or more values (the inputs to the function)
- the expected output value
**Preconditions**: each element of test_table is a list or tuple with
- a string (the test case name)
- one or more values (the inputs to the function)
- the expected output value
"""
print(f"Testing {function.__name__}:")
for test_case in test_table:
Expand Down Expand Up @@ -234,7 +235,7 @@ def show_ruff_json(checker: str, output: str, filename: str) -> None:
msg = error["message"]
if error["fix"]:
msg += f". Suggested fix: {error['fix']['message']}"
md.append(f"- {line}: \[[{code}]({url})\] {msg}")
md.append(rf"- {line}: \[[{code}]({url})\] {msg}")
display_markdown("\n".join(md), raw=True)


Expand All @@ -249,7 +250,7 @@ def show_pytype_errors(checker: str, output: str, filename: str) -> None:
msg = m.group(2)
code = m.group(3)
md.append(
f"- {line}:{msg}\[[{code}](https://google.github.io/pytype/errors.html#{code})\]"
rf"- {line}:{msg}\[[{code}](https://google.github.io/pytype/errors.html#{code})\]"
)
if len(md) > 1:
display_markdown("\n".join(md), raw=True)
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,10 @@ python3.10 -m venv venv
pip install --upgrade pip
pip install -r requirements.txt
```
To preview locally the documentation that will be in GitHub Pages, follow
[this guidance](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll).
The Jekyll installation instructions include how to install Ruby.
Bundler is usually automatically installed during the Ruby installation.
To preview locally the documentation that will be in GitHub Pages, enter `mkdocs serve`.

GitHub recommends to regularly do `bundle update github-pages` to ensure that
the local site preview looks like on GitHub Pages.
The documentation must be written in strict Markdown:
blank line before a new list; break lines with two spaces; indent with 4 spaces.

After accepting a commit to folder `Deepnote/`, the owners will upload the
updated files to the Deepnote project linked above.
Expand Down
10 changes: 0 additions & 10 deletions docs/Gemfile

This file was deleted.

103 changes: 0 additions & 103 deletions docs/Gemfile.lock

This file was deleted.

39 changes: 0 additions & 39 deletions docs/_config.yml

This file was deleted.

98 changes: 0 additions & 98 deletions docs/_data/nav.yml

This file was deleted.

57 changes: 0 additions & 57 deletions docs/_includes/components/site_nav.html

This file was deleted.

Loading

0 comments on commit 1393b35

Please sign in to comment.