Skip to content

Commit

Permalink
🚨 lint files
Browse files Browse the repository at this point in the history
  • Loading branch information
brutus committed Aug 3, 2021
1 parent 2a2ceae commit 61d75b0
Show file tree
Hide file tree
Showing 31 changed files with 127 additions and 136 deletions.
14 changes: 7 additions & 7 deletions BROKEN_GUIDES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
Once we or someone else notices that a guide doesn't work anymore, do the following things:

1. Document that the guide is broken.
* create an issue stating that the guide is broken. If possible, add details on what exactly is broken.
* @-mention the original author, notifying them of the broken guide
* add a banner / warning box to the guide, saying that it might be broken. link the issue.
* we do not provide support for the broken guide after this point
- create an issue stating that the guide is broken. If possible, add details on what exactly is broken.
- @-mention the original author, notifying them of the broken guide
- add a banner / warning box to the guide, saying that it might be broken. link the issue.
- we do not provide support for the broken guide after this point
2. if nobody fixes the guide after 2 months
* delete the guide
* add the deleting commit to the issue
* close the issue
- delete the guide
- add the deleting commit to the issue
- close the issue

```rst
.. error::
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ You're very welcome to add your own guides to this repository. Also whenever you

Before you begin writing:

- To signify intent and prevent duplicate work, please create an issue **before** working on your pull request.
- Check out our [style guide](STYLE.md).
- To signify intent and prevent duplicate work, please create an issue **before** working on your pull request.
- Check out our [style guide](STYLE.md).

If you want to stay informed of changes to your guide or a guide in your interest you can subscribe to its commit feed.
If you want to stay informed of changes to your guide or a guide in your interest you can subscribe to its commit feed.
e.g. for Nextcloud it would be: https://github.com/Uberspace/lab/commits/main/source/guide_nextcloud.rst.atom

## Reward
Expand Down
1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -435,4 +435,3 @@ the avoidance of doubt, this paragraph does not form part of the
public licenses.

Creative Commons may be contacted at creativecommons.org.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ make spelling
All text and code in this repository is licensed under [CC-BY-NC-SA 4.0][].
All project logos are property of the respective project.

[CC-BY-NC-SA 4.0]: https://creativecommons.org/licenses/by-nc-sa/4.0/
[cc-by-nc-sa 4.0]: https://creativecommons.org/licenses/by-nc-sa/4.0/
[contributing guidelines]: CONTRIBUTING.md
[list of guides]: https://github.com/Uberspace/lab/issues?q=is%3Aopen+is%3Aissue+label%3Aguide
70 changes: 36 additions & 34 deletions STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,28 @@ You're welcome to add your own guides to this repository.

Please follow our rules to keep the guides maintainable and consistent.

* Guides have to be written in [reST](http://www.sphinx-doc.org/en/stable/rest.html).
* Use English language. You don't have to be a native speaker or a poet.
* Upload a logo to `_static/images/`, preferably SVG, a PNG file with transparent background is also fine.
* If possible use a download URL that points to the latest version (e.g. `latest.zip` on some platforms). If such an URL is not available, use the newest version instead.
* Always use the same username `isabell`.
* Always use the same hostname `stardust`. For bash snippets, use `[isabell@stardust ~]$`.
* Always use full paths in commands. Don't assume the home directory or the html folder.
* Don't mention additional document roots. *Keep it simple*. Don't use subfolders. Always use the standard document root `~/html`. Always assume the document root is empty.
* Use the templates in `source/includes/` where appropriate.
For example `.. include:: includes/web-domain-list.rst` generates the following snippet:
```
::
[isabell@stardust ~]$ uberspace web domain list
isabell.uber.space
[isabell@stardust ~]$
```
* Document all steps for setup. E.g. [create a database](https://github.com/Uberspace/lab/issues/39) when that's necessary. [Create directories](https://github.com/Uberspace/lab/issues/36) when needed.
* When there is a license needed for the software mention it.
* If there are interactive shell sessions, emphasize the lines that expect input from the user. For example:
- Guides have to be written in [reST](http://www.sphinx-doc.org/en/stable/rest.html).
- Use English language. You don't have to be a native speaker or a poet.
- Upload a logo to `_static/images/`, preferably SVG, a PNG file with transparent background is also fine.
- If possible use a download URL that points to the latest version (e.g. `latest.zip` on some platforms). If such an URL is not available, use the newest version instead.
- Always use the same username `isabell`.
- Always use the same hostname `stardust`. For bash snippets, use `[isabell@stardust ~]$`.
- Always use full paths in commands. Don't assume the home directory or the html folder.
- Don't mention additional document roots. _Keep it simple_. Don't use subfolders. Always use the standard document root `~/html`. Always assume the document root is empty.
- Use the templates in `source/includes/` where appropriate.
For example `.. include:: includes/web-domain-list.rst` generates the following snippet:

```
::
[isabell@stardust ~]$ uberspace web domain list
isabell.uber.space
[isabell@stardust ~]$
```

- Document all steps for setup. E.g. [create a database](https://github.com/Uberspace/lab/issues/39) when that's necessary. [Create directories](https://github.com/Uberspace/lab/issues/36) when needed.
- When there is a license needed for the software mention it.
- If there are interactive shell sessions, emphasize the lines that expect input from the user. For example:

```
.. code-block:: console
Expand Down Expand Up @@ -57,8 +59,8 @@ Please follow our rules to keep the guides maintainable and consistent.
[isabell@stardust ghost]$
```

* Always end your console code blocks with `[isabell@stardust ~]$`.
* If you use flags and their function cannot be determined by just reading their name, explain them. Don't use short flags, always use the long versions. We want everybody to be able to know what they're doing. Example:
- Always end your console code blocks with `[isabell@stardust ~]$`.
- If you use flags and their function cannot be determined by just reading their name, explain them. Don't use short flags, always use the long versions. We want everybody to be able to know what they're doing. Example:

```
Since the installer expects to be run with root privileges, we need to adjust some settings_:
Expand All @@ -70,9 +72,9 @@ Since the installer expects to be run with root privileges, we need to adjust so
* ``--no-setup-mysql``: Skips setup of MySQL_. You can't do that without root privileges.
```

* Try to find an RSS feed for updates and document it.
* If there are any standard passwords, tell the user to change them *immediately*.
* If there are files to edit, don't do stuff like `cat > ~/.npmrc <<__EOF__`, just tell the user to _edit_ the file. Don't mention an editor like `vi` or `nano`. Example:
- Try to find an RSS feed for updates and document it.
- If there are any standard passwords, tell the user to change them _immediately_.
- If there are files to edit, don't do stuff like `cat > ~/.npmrc <<__EOF__`, just tell the user to _edit_ the file. Don't mention an editor like `vi` or `nano`. Example:

```
Create ``~/etc/services.d/ghost.ini`` with the following content:
Expand All @@ -94,7 +96,7 @@ In our example this would be:
command=env NODE_ENV=production /bin/node current/index.js
```

* If you want to include links to https://manual.uberspace.de, please use the corresponding directives `manual` and `manual_anchor`. Use the `lab` and `lab_anchor` directives for linking other UberLab guides. Examples:
- If you want to include links to https://manual.uberspace.de, please use the corresponding directives `manual` and `manual_anchor`. Use the `lab` and `lab_anchor` directives for linking other UberLab guides. Examples:

```
This is a link to the Python manual: :manual:`Python <lang-python>`.
Expand All @@ -106,14 +108,14 @@ This is a link to another guide: :lab:`Django <guide_django>`.

Please use the following structure. Only document applicable steps, leave out headlines you don't need.

* Short description
* Prerequisites
* Installation
* Configuration
* Finishing installation
* Best practices
* Tuning
* Updates
- Short description
- Prerequisites
- Installation
- Configuration
- Finishing installation
- Best practices
- Tuning
- Updates

## Boilerplate

Expand Down
11 changes: 5 additions & 6 deletions authorship/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@

Stores a list of authors and tags for each document.

The data is stored in the environment under the key ``authors`` and ``tags``.
The data is stored in the environment under the key `authors` and `tags`.
It's a dictionary, where the keys are the names of the documents and the values
a list of author / tags.

## Authors

Use the ``.. author:: Author Name <email or url>`` directive to add an author to
a document. With ``.. author_list::`` you can add a paragraph, that list all
Use the `.. author:: Author Name <email or url>` directive to add an author to
a document. With `.. author_list::` you can add a paragraph, that list all
authors that are set for a document, like this::

Written by: author1 <[email protected]>, author2 <site.org>

### All Authors

The ``.. allauthors::`` directive generates an ordered list of all authors,
The `.. allauthors::` directive generates an ordered list of all authors,
sorted by the number of contributions in descending order.

## Tags

Use the ``.. tag:: sometag`` directive to add a tag to a document. With ``..
tag_list::`` you can add a paragraph, that list all tags that are set for a
Use the `.. tag:: sometag` directive to add a tag to a document. With `.. tag_list::` you can add a paragraph, that list all tags that are set for a
document, linking to the tag detail pages.
3 changes: 1 addition & 2 deletions authorship/authorship/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
of author names.
"""

import itertools
import os.path
import re

import sphinx.addnodes as addnodes
from docutils import nodes
from docutils.parsers.rst import directives
from sphinx.util.docutils import SphinxDirective
import sphinx.addnodes as addnodes


def comma_list(nodes_, separator):
Expand Down
17 changes: 8 additions & 9 deletions authorship/setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/usr/bin/env python

from setuptools import setup, find_packages
from setuptools import find_packages
from setuptools import setup

setup(
name = 'authorship',
version = '1.0.0',
author = 'uberspace.de',
author_email = '[email protected]',
packages = find_packages(),
install_requires = [
],
name="authorship",
version="1.0.0",
author="uberspace.de",
author_email="[email protected]",
packages=find_packages(),
install_requires=[],
)
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-e ./authorship
feedgen==0.9.0
pre-commit==2.13.*
sphinx==3.0.3
sphinx-rtd-theme==0.4.*
sphinx-autobuild==0.7.*
feedgen==0.9.0
sphinx-notfound-page==0.3
sphinx-rtd-theme==0.4.*
sphinxcontrib-spelling==7.1.0
-e ./authorship
pre-commit==2.13.*
5 changes: 2 additions & 3 deletions source/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,9 @@ footer {
/* make side navigation scrollable */

.wy-body-for-nav,
.wy-grid-for-nav
.wy-grid-for-nav,
.wy-nav-side,
.wy-side-scroll
{
.wy-side-scroll {
display: flex;
flex-direction: column;
min-height: 0;
Expand Down
6 changes: 4 additions & 2 deletions source/_static/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ $(function () {
}

function addTagListToToc() {
let toc_tags = $('<li class="toctree-l1"><a class="reference internal" href="/tags/">Tags</a></li>');
let toc_tags = $(
'<li class="toctree-l1"><a class="reference internal" href="/tags/">Tags</a></li>'
);
let toc_01 = $('[aria-label="main navigation"] > ul > li:eq(0)');
toc_01.after(toc_tags);
}
Expand All @@ -73,7 +75,7 @@ $(function () {
console.log("UberLab launched…");

// add a link to the teg list view to the side navigation
addTagListToToc()
addTagListToToc();

// fix spacing between border and text
checkLogoHeight();
Expand Down
2 changes: 0 additions & 2 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@
#
# All configuration values have a default; values that are commented out
# serve to show the default.

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import sphinx_rtd_theme

# -- General configuration ------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion source/guide_eqdkp-plus.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ It is focused on supporting guilds and clans playing online games, especially MM
License
=======

EQdkp-Plus_ is released under the `AGPLv3 License`_.
EQdkp-Plus_ is released under the `AGPLv3 License`_.

Prerequisites
=============
Expand Down
2 changes: 0 additions & 2 deletions source/guide_etesync-server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -319,5 +319,3 @@ Set up a cron job by using the ``crontab -e`` command and adding the line:
Tested with EteSync server 0.3.0 and Uberspace 7.7.1.2

.. author_list::


1 change: 0 additions & 1 deletion source/guide_ethercalc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,3 @@ It might take a few minutes before your EtherCalc comes back online because ``np
Tested with EtherCalc 0.20200306.0, Uberspace 7.5.0.0

.. author_list::

6 changes: 3 additions & 3 deletions source/guide_focalboard.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Focalboard

.. tag_list::

Focalboard_ is an open source, self-hosted alternative to Trello, Notion, and Asana.
Focalboard_ is an open source, self-hosted alternative to Trello, Notion, and Asana.

----

Expand Down Expand Up @@ -55,15 +55,15 @@ You need to modify ``~/focalboard-app/config.json``:
* Change ``"localOnly": true,`` to ``"localOnly": false,``
* Add ``"session_expire_time": 2592000,``
* Add ``"session_refresh_time": 18000,``

If PostgreSQL is used, the database configuration also needs to be adjusted. Edit the database config in the file ``~/focalboard-app/config.json``. These two values must be changed:
.. warning:: Replace ``<db_user>``, ``<db_password>`` and ``<db_name>`` with your values.

.. code-block:: json
"dbtype": "postgres",
"dbconfig": "postgres://<db_user>:<db_password>@localhost/<db_name>?sslmode=disable&connect_timeout=10",
For example:
.. code-block:: json
Expand Down
1 change: 0 additions & 1 deletion source/guide_hedgedoc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -381,4 +381,3 @@ You can run this script with:
Tested with HedgeDoc 1.7.1, Uberspace 7.8.1.0

.. author_list::

4 changes: 2 additions & 2 deletions source/guide_jekyll.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ You need to install a gem called Jekyll:
Successfully installed jekyll-4.2.0
27 gems installed
[isabell@stardust ~]$


You can ignore the warning regarding your PATH.

Expand All @@ -85,7 +85,7 @@ Just let Jekyll create a new folder containing your website by typing:
New jekyll site installed in /home/isabell/website.
[isabell@stardust ~]$

After Jekyll finished, navigate into your website folder.
After Jekyll finished, navigate into your website folder.

Set the local path for bundler, then install all needed gems for your website:
::
Expand Down
1 change: 0 additions & 1 deletion source/guide_limesurvey.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,3 @@ When a new version is released, copy the download link and download it as above,
Tested with LimeSurvey 3.14.11+180926, Uberspace 7.1.13.0

.. author_list::

1 change: 0 additions & 1 deletion source/guide_memcached.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,3 @@ To update memcached, repeat the Installation steps followed by a restart using `
Tested with memcached 1.5.20, Uberspace 7.3.10.0

.. author_list::

1 change: 0 additions & 1 deletion source/guide_mongodb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,3 @@ command to update your installation. Afterwards, restart your instance.
Tested with MongoDB 4.4.3, MongoDB Tools 100.2.0, Uberspace 7.8.1.0

.. author_list::

6 changes: 3 additions & 3 deletions source/guide_openslides.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Check if OpenSlides is installed by typing:
[isabell@stardust ~]$ openslides --version
3.3
[isabell@stardust ~]$

Create Database
---------------
For performance reasons, we will use a :manual:`MySQL <database-mysql>` database for storing the OpenSlides data. It is recommended to use an :manual_anchor:`additional database <database-mysql.html#additional-databases>` (e.g. ``isabell_openslides``) instead of the default database.
Expand Down Expand Up @@ -135,7 +135,7 @@ Then, we will populate the database by running the following command:
[2021-04-11 20:59:34 +0200] [21317] [INFO] openslides.core.apps [zxnj] Updated config variables
[isabell@stardust ~]$


Create web backend
------------------

Expand Down Expand Up @@ -252,7 +252,7 @@ Moreover, you can adjust the logging of OpenSlides. For example, you can log the
},
}

This will log everything to the file ``/home/isabell/logs/openslides.log`` instead being displayed in the console.
This will log everything to the file ``/home/isabell/logs/openslides.log`` instead being displayed in the console.


.. _OpenSlides: https://openslides.com/
Expand Down
Loading

0 comments on commit 61d75b0

Please sign in to comment.