Skip to content

Commit cf3152a

Browse files
authored
Add rumdl, reflow content, fix issues, update translations. (#9)
1 parent 9a05532 commit cf3152a

30 files changed

+13934
-13071
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ repos:
99
# PO files may not have a trailing EOL, as they are tool generated
1010
exclude: "locales"
1111
- id: trailing-whitespace
12+
- repo: https://github.com/rvben/rumdl-pre-commit
13+
rev: v0.0.143
14+
hooks:
15+
- id: rumdl
16+
args: [--force-exclude, --fix]

.rumdl.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[global]
2+
flavor = "mkdocs"
3+
include = ["**/*.md"]
4+
respect-gitignore = true
5+
6+
# Disable rules:
7+
# MD013: Enforces line length
8+
# MD014: Forces commands in codeblocks to show output
9+
disable = ["MD014",]
10+
11+
[MD033] # No inline HTML
12+
allowed_elements = ["nospell",] # pyspelling inline disable tag
13+
14+
[MD013] # Line length
15+
line_length = 999999
16+
reflow = true
17+
reflow_mode = "normalize"

README.md

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
<a href="https://beeware.org">
2-
<img src="https://beeware.org/static/images/brutus-270.png" alt="BeeWare Logo" height="72">
3-
</a>
1+
<a href="https://beeware.org"><img src="https://beeware.org/static/images/brutus-270.png" alt="BeeWare Logo" height="72"></a> <!-- rumdl-disable-line MD033 MD041 -->
42

53
# BeeWare Tutorial
64

7-
[![Python Versions](https://img.shields.io/pypi/pyversions/beeware.svg)](https://pypi.python.org/pypi/beeware)
8-
[![PyPI Version](https://img.shields.io/pypi/v/beeware.svg)](https://pypi.python.org/pypi/beeware)
9-
[![Maturity](https://img.shields.io/pypi/status/beeware.svg)](https://pypi.python.org/pypi/beeware)
10-
[![BSD License](https://img.shields.io/pypi/l/beeware.svg)](https://github.com/beeware/beeware/blob/main/LICENSE)
11-
[![Build Status](https://github.com/beeware/beeware/workflows/CI/badge.svg?branch=main)](https://github.com/beeware/beeware/actions)
12-
[![Discord server](https://img.shields.io/discord/836455665257021440?label=Discord%20Chat&logo=discord&style=plastic)](https://beeware.org/bee/chat/)
5+
[![Python Versions](https://img.shields.io/pypi/pyversions/beeware.svg)](https://pypi.python.org/pypi/beeware) [![PyPI Version](https://img.shields.io/pypi/v/beeware.svg)](https://pypi.python.org/pypi/beeware) [![Maturity](https://img.shields.io/pypi/status/beeware.svg)](https://pypi.python.org/pypi/beeware) [![BSD License](https://img.shields.io/pypi/l/beeware.svg)](https://github.com/beeware/beeware/blob/main/LICENSE) [![Build Status](https://github.com/beeware/beeware/workflows/CI/badge.svg?branch=main)](https://github.com/beeware/beeware/actions) [![Discord server](https://img.shields.io/discord/836455665257021440?label=Discord%20Chat&logo=discord&style=plastic)](https://beeware.org/bee/chat/)
136

14-
BeeWare is a collection of tools and libraries for building and
15-
distributing native applications in Python.
7+
BeeWare is a collection of tools and libraries for building and distributing native applications in Python.
168

179
You can view this tutorial [here](https://tutorial.beeware.org/).
1810

@@ -23,26 +15,18 @@ You can talk to the BeeWare community through:
2315
- [@beeware@fosstodon.org on Mastodon](https://fosstodon.org/@beeware)
2416
- [Discord](https://beeware.org/bee/chat/)
2517

26-
We foster a welcoming and respectful community as described in our [BeeWare
27-
Community Code of Conduct](http://beeware.org/community/behavior/).
18+
We foster a welcoming and respectful community as described in our [BeeWare Community Code of Conduct](http://beeware.org/community/behavior/).
2819

2920
## Contributing
3021

31-
If you experience problems with the BeeWare Tutorial, [log them on
32-
GitHub](https://github.com/beeware/beeware-tutorial/issues). If you want to contribute
33-
code, please [fork the code](https://github.com/beeware/beeware-tutorial) and [submit a
34-
pull request](https://github.com/beeware/beeware-tutorial/pulls).
22+
If you experience problems with the BeeWare Tutorial, [log them on GitHub](https://github.com/beeware/beeware-tutorial/issues). If you want to contribute code, please [fork the code](https://github.com/beeware/beeware-tutorial) and [submit a pull request](https://github.com/beeware/beeware-tutorial/pulls).
3523

3624
### Translations
3725

38-
<a href="https://hosted.weblate.org/engage/beeware/">
39-
<img src="https://hosted.weblate.org/widget/beeware/open-graph.png" alt="Translation Status" width="300">
40-
</a>
26+
<a href="https://hosted.weblate.org/engage/beeware/"><img src="https://hosted.weblate.org/widget/beeware/open-graph.png" alt="Translation Status" width="300"></a> <!-- rumdl-disable-line MD033 -->
4127

4228
We manage translations using [Weblate](https://weblate.org/).
4329

4430
[![Translation status](https://hosted.weblate.org/widget/beeware/horizontal-blue.svg)](https://hosted.weblate.org/engage/beeware/)
4531

46-
If you'd like to contribute to the translation effort, join the
47-
`#translations` channel on [Discord](https://beeware.org/bee/chat/) and
48-
introduce yourself!
32+
If you'd like to contribute to the translation effort, join the `#translations` channel on [Discord](https://beeware.org/bee/chat/) and introduce yourself!

docs/en/SUMMARY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!-- rumdl-disable-line MD041 -->
2+
3+
<!-- rumdl-disable MD007 -->
4+
15
- [Tutorial 0 - Let's get set up!](tutorial/tutorial-0.md)
26
- [Tutorial 1 - Your first app](tutorial/tutorial-1.md)
37
- [Tutorial 2 - Making it interesting](tutorial/tutorial-2.md)

docs/en/how-to/contribute.md

Lines changed: 30 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
# Contributing to this tutorial
22

3-
This tutorial is written using [MkDocs and Markdown](https://www.mkdocs.org/).
4-
This guide will help you contribute fixes or new content to this
5-
tutorial.
3+
This tutorial is written using [MkDocs and Markdown](https://www.mkdocs.org/). This guide will help you contribute fixes or new content to this tutorial.
64

7-
Translations of this tutorial are managed using
8-
[Weblate](https://hosted.weblate.org/engage/beeware/). If you'd like to
9-
contribute to the translation effort, join the `#translations` channel
10-
on [Discord](https://beeware.org/bee/chat/) and introduce yourself!
5+
Translations of this tutorial are managed using [Weblate](https://hosted.weblate.org/engage/beeware/). If you'd like to contribute to the translation effort, join the `#translations` channel on [Discord](https://beeware.org/bee/chat/) and introduce yourself!
116

127
## Set up your development environment
138

14-
To build the BeeWare tutorial you **must** have a Python 3.12
15-
interpreter installed and available on your path (i.e., `python3` must
16-
start a Python 3.12 interpreter).
9+
To build the BeeWare tutorial you **must** have a Python 3.12 interpreter installed and available on your path (i.e., `python3` must start a Python 3.12 interpreter).
1710

1811
/// tab | macOS
1912

@@ -44,9 +37,7 @@ C:\...>pip3 --version
4437

4538
### Create a virtual environment
4639

47-
The recommended way of setting up your development environment for
48-
BeeWare is to install a virtual environment, install the required
49-
dependencies and start coding. To set up a virtual environment, run:
40+
The recommended way of setting up your development environment for BeeWare is to install a virtual environment, install the required dependencies and start coding. To set up a virtual environment, run:
5041

5142
/// tab | macOS
5243

@@ -81,13 +72,7 @@ Your prompt should now have a `(.venv)` prefix in front of it.
8172

8273
For updates to BeeWare documentation:
8374

84-
Next, go to [the BeeWare Tutorial page on
85-
GitHub](https://github.com/beeware/beeware-tutorial), fork the repository into
86-
your own account, and then clone a copy of that repository onto your
87-
computer by clicking on "Clone or Download". If you have the GitHub
88-
desktop application installed on your computer, you can select "Open in
89-
Desktop"; otherwise, copy the URL provided, and use it to clone using
90-
the command line:
75+
Next, go to [the BeeWare Tutorial page on GitHub](https://github.com/beeware/beeware-tutorial), fork the repository into your own account, and then clone a copy of that repository onto your computer by clicking on "Clone or Download". If you have the GitHub desktop application installed on your computer, you can select "Open in Desktop"; otherwise, copy the URL provided, and use it to clone using the command line:
9176

9277
/// tab | macOS
9378

@@ -127,10 +112,7 @@ Fork the BeeWare Tutorial repository, and then:
127112

128113
### Install BeeWare tutorial docs dependencies
129114

130-
Now that you have the source code, you can install BeeWare docs
131-
requirements into your development environment. Since we're installing
132-
from source, we can't rely on pip to resolve the dependencies to source
133-
packages, so we have to manually install each package:
115+
Now that you have the source code, you can install BeeWare docs requirements into your development environment. Since we're installing from source, we can't rely on pip to resolve the dependencies to source packages, so we have to manually install each package:
134116

135117
/// tab | macOS
136118

@@ -161,10 +143,7 @@ packages, so we have to manually install each package:
161143

162144
### Install pre-commit
163145

164-
BeeWare uses a tool called [Pre-Commit](https://pre-commit.com) to
165-
identify simple issues and standardize code formatting. It does this by
166-
installing a git hook that automatically runs a series of code linters
167-
prior to finalizing any git commit. To enable pre-commit, run:
146+
BeeWare uses a tool called [Pre-Commit](https://pre-commit.com) to identify simple issues and standardize code formatting. It does this by installing a git hook that automatically runs a series of code linters prior to finalizing any git commit. To enable pre-commit, run:
168147

169148
/// tab | macOS
170149

@@ -193,10 +172,7 @@ pre-commit installed at .git/hooks/pre-commit
193172

194173
///
195174

196-
When you commit any change, pre-commit will run automatically. If there
197-
are any issues found with the commit, this will cause your commit to
198-
fail. Where possible, pre-commit will make the changes needed to correct
199-
the problems it has found:
175+
When you commit any change, pre-commit will run automatically. If there are any issues found with the commit, this will cause your commit to fail. Where possible, pre-commit will make the changes needed to correct the problems it has found:
200176

201177
/// tab | macOS
202178

@@ -258,8 +234,7 @@ trim trailing whitespace.................................................Passed
258234

259235
///
260236

261-
You can then re-add any files that were modified as a result of the
262-
pre-commit checks, and re-commit the change.
237+
You can then re-add any files that were modified as a result of the pre-commit checks, and re-commit the change.
263238

264239
/// tab | macOS
265240

@@ -339,13 +314,11 @@ Once your development environment is set up, run:
339314

340315
///
341316

342-
The output of the file should be in the `_build/html` folder. If
343-
there are any markup problems, they'll raise an error.
317+
The output of the file should be in the `_build/html` folder. If there are any markup problems, they'll raise an error.
344318

345319
### Live Tutorial preview
346320

347-
To support rapid editing of documentation, BeeWare also has a "live
348-
preview" mode:
321+
To support rapid editing of documentation, BeeWare also has a "live preview" mode:
349322

350323
/// tab | macOS
351324

@@ -371,16 +344,11 @@ preview" mode:
371344

372345
///
373346

374-
This will build the documentation, start a web server to serve the build
375-
documentation, and watch the file system for any changes to the
376-
documentation source. If a change is detected, the documentation will be
377-
rebuilt, and any browser viewing the modified page will be automatically
378-
refreshed.
347+
This will build the documentation, start a web server to serve the build documentation, and watch the file system for any changes to the documentation source. If a change is detected, the documentation will be rebuilt, and any browser viewing the modified page will be automatically refreshed.
379348

380349
### Tutorial linting
381350

382-
The build process will identify most Markdown problems, but BeeWare
383-
performs some additional "lint" checks. To run the lint checks:
351+
The build process will identify most Markdown problems, but BeeWare performs some additional "lint" checks. To run the lint checks:
384352

385353
/// tab | macOS
386354

@@ -411,28 +379,19 @@ This will validate the documentation does not contain:
411379
- dead hyperlinks
412380
- misspelled words
413381

414-
If a valid spelling of a word is identified as misspelled, then add the
415-
word to the list in `docs/spelling_wordlist`. This will add the word to
416-
the spellchecker's dictionary. When adding to this list, remember:
382+
If a valid spelling of a word is identified as misspelled, then add the word to the list in `docs/spelling_wordlist`. This will add the word to the spellchecker's dictionary. When adding to this list, remember:
417383

418-
- We prefer US spelling, with some liberties for programming-specific
419-
colloquialisms (e.g., "apps") and verbing of nouns (e.g., "scrollable")
420-
- Any reference to a product name should use the product's preferred
421-
capitalization. (e.g., "macOS", "GTK", "pytest", "Pygame",
422-
"PyScript").
423-
- If a term is being used "as code", then it should be quoted as inline
424-
code rather than being added to the dictionary.
384+
- We prefer US spelling, with some liberties for programming-specific colloquialisms (e.g., "apps") and verbing of nouns (e.g., "scrollable")
385+
- Any reference to a product name should use the product's preferred capitalization. (e.g., "macOS", "GTK", "pytest", "Pygame", "PyScript").
386+
- If a term is being used "as code", then it should be quoted as inline code rather than being added to the dictionary.
425387

426388
### Translations
427389

428-
The BeeWare tutorial is available in multiple languages, which you can
429-
build individually or all at the same time.
390+
The BeeWare tutorial is available in multiple languages, which you can build individually or all at the same time.
430391

431392
#### Updating translations
432393

433-
If you have made changes to the English content, the first step to
434-
building the translations is to update the translation files. To
435-
update the translations:
394+
If you have made changes to the English content, the first step to building the translations is to update the translation files. To update the translations:
436395

437396
/// tab | macOS
438397

@@ -462,9 +421,7 @@ This will update the
462421

463422
#### Building translations
464423

465-
To build a single translation, you run the `docs` command with the
466-
language code for the translation you wish to build. For example,
467-
to build French:
424+
To build a single translation, you run the `docs` command with the language code for the translation you wish to build. For example, to build French:
468425

469426
/// tab | macOS
470427

@@ -490,12 +447,9 @@ to build French:
490447

491448
///
492449

493-
The French translation should be built in the `_build/html`
494-
folder. If there are any markup problems, they'll raise an error.
450+
The French translation should be built in the `_build/html` folder. If there are any markup problems, they'll raise an error.
495451

496-
An error is also raised if you enter a language code for an
497-
unavailable language. If this happens, verify that you are using
498-
the proper language code.
452+
An error is also raised if you enter a language code for an unavailable language. If this happens, verify that you are using the proper language code.
499453

500454
To build all the translations at the same time:
501455

@@ -523,43 +477,25 @@ To build all the translations at the same time:
523477

524478
///
525479

526-
This will build all available translations in the `_build/html`
527-
directory, inside a language-specific subdirectory. For example, the
528-
French translation would be available in `_build/html/fr`.
480+
This will build all available translations in the `_build/html` directory, inside a language-specific subdirectory. For example, the French translation would be available in `_build/html/fr`.
529481

530482
## What to work on?
531483

532-
If you're looking for specific areas to improve, there are [tickets tagged
533-
"documentation"](https://github.com/beeware/BeeWare/issues?q=is%3Aopen+is%3Aissue+label%3Adocumentation)
534-
in BeeWare's issue tracker.
484+
If you're looking for specific areas to improve, there are [tickets tagged "documentation"](https://github.com/beeware/BeeWare/issues?q=is%3Aopen+is%3Aissue+label%3Adocumentation) in BeeWare's issue tracker.
535485

536-
However, you don't need to be constrained by these tickets. If you can
537-
identify an error in the tutorial, or an improvement that can be made,
538-
start writing! Anything that improves the experience of the end user is
539-
a welcome change.
486+
However, you don't need to be constrained by these tickets. If you can identify an error in the tutorial, or an improvement that can be made, start writing! Anything that improves the experience of the end user is a welcome change.
540487

541488
## Submitting a pull request
542489

543-
Before you submit a pull request, there's a few bits of housekeeping to
544-
do.
490+
Before you submit a pull request, there's a few bits of housekeeping to do.
545491

546492
### Submit from a feature branch, not your `main` branch
547493

548-
Before you start working on your change, make sure you've created a
549-
branch. By default, when you clone your repository fork, you'll be
550-
checked out on your `main` branch. This is a direct copy of BeeWare's
551-
`main` branch. To contribute to BeeWare itself, not the docs, please
552-
review the repo README.
494+
Before you start working on your change, make sure you've created a branch. By default, when you clone your repository fork, you'll be checked out on your `main` branch. This is a direct copy of BeeWare's `main` branch. To contribute to BeeWare itself, not the docs, please review the repo README.
553495

554-
While you *can* submit a pull request from your `main` branch, it's
555-
preferable if you *don't* do this. If you submit a pull request that is
556-
*almost* right, the core team member who reviews your pull request may
557-
be able to make the necessary changes, rather than giving feedback
558-
asking for a minor change. However, if you submit your pull request from
559-
your `main` branch, reviewers are prevented from making modifications.
496+
While you *can* submit a pull request from your `main` branch, it's preferable if you *don't* do this. If you submit a pull request that is *almost* right, the core team member who reviews your pull request may be able to make the necessary changes, rather than giving feedback asking for a minor change. However, if you submit your pull request from your `main` branch, reviewers are prevented from making modifications.
560497

561-
Instead, you should make your changes on a *feature branch*. A feature
562-
branch has a simple name to identify the change that you've made.
498+
Instead, you should make your changes on a *feature branch*. A feature branch has a simple name to identify the change that you've made.
563499

564500
To create a feature branch, run:
565501

@@ -587,5 +523,4 @@ To create a feature branch, run:
587523

588524
///
589525

590-
Commit your changes to this branch, then push to GitHub and create a
591-
pull request.
526+
Commit your changes to this branch, then push to GitHub and create a pull request.

docs/en/how-to/style-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-8<- "style_guide.md"
1+
-8<- "style_guide.md" <!-- rumdl-disable-line MD041 -->

0 commit comments

Comments
 (0)