Skip to content

Commit

Permalink
Update code format in docs #24
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludee committed Dec 6, 2024
1 parent 454e61b commit a954a0a
Show file tree
Hide file tree
Showing 15 changed files with 104 additions and 86 deletions.
3 changes: 3 additions & 0 deletions docs/development/best-practice/code_style.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ Following good documentation practices ensures code is understandable to others.
Maintain a logical structure within files, grouping related functions and
classes. Consider the readability of your code and strive for modular,
well-organized files.

!!! note "Used Icons"
🐙 GitHub | 💠 git | 📝 File | 💻 Command Line
4 changes: 2 additions & 2 deletions docs/development/best-practice/continuous_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ for testing:
### Install

Install the required package in a python environment. <br>
💻 `pip install tox` install tox <br>
💻 `tox` run tox locally
💻 `pip install tox` Install tox <br>
💻 `tox` Run tox locally


## Adding and Managing Tests
Expand Down
3 changes: 3 additions & 0 deletions docs/development/best-practice/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ high standards in a collaborative scientific software environment:

Following these practices will streamline development, reduce bugs, and foster a
productive, collaborative coding environment.

!!! note "Used Icons"
🐙 GitHub | 💠 git | 📝 File | 💻 Command Line
4 changes: 2 additions & 2 deletions docs/development/best-practice/test_driven_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ of testing, such as edge cases and integration scenarios.
This example demonstrates the TDD approach within a Django app. <br>
You can run all tests in Django using the following command:

💻 `python manage.py test`
💻 `python manage.py test`

To run specific test cases, you can provide the app name and the test case:

💻 `python manage.py test app.MyModelViewTestCase`
💻 `python manage.py test app.MyModelViewTestCase`

This is a Step-by-Step Guide to TDD in Django:

Expand Down
9 changes: 6 additions & 3 deletions docs/development/collaboration/chat.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Chat

For direct communication, this repo uses a public [Element](https://element.io/) room. <br>
For direct communication, this repository uses a public [Element](https://element.io/) room. <br>
This messenger platform is based on the [[matrix]](https://en.wikipedia.org/wiki/Matrix_(protocol))
communication protocol <br>
and can be accessed without a mobile phone.

To engage with the developer and user community, <br>
login with an existing account (e.g. GitHub) or register a new account.
login with an existing account (for example GitHub) or register a new account.

The room name is:
[Super-Repo:matrix.org](https://app.element.io/#/room/#super-repo:matrix.org). <br>
[Super-Repository:matrix.org](https://app.element.io/#/room/#super-repository:matrix.org). <br>

!!! note "Used Icons"
🐙 GitHub | 💠 git | 📝 File | 💻 Command Line
7 changes: 5 additions & 2 deletions docs/development/collaboration/code_of_conduct.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Code of Conduct

This repository is following the [Contributor Covenant Code of Conduct](https://github.com/rl-institut/super-repo/blob/production/CODE_OF_CONDUCT.md). <br>
This repository is following the [Contributor Covenant Code of Conduct](https://github.com/rl-institut/super-repository/blob/production/CODE_OF_CONDUCT.md). <br>

Everyone is asked to be self-reflective and always maintain a good culture
of discussion and active participation.
This includes written communication in this repo and direct encounters in meetings and events.
This includes written communication in this repository and direct encounters in meetings and events.

!!! note "Used Icons"
🐙 GitHub | 💠 git | 📝 File | 💻 Command Line
18 changes: 9 additions & 9 deletions docs/development/collaboration/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ It includes all needed information to merge branches and release new versions.

GitHub Labels are used to organize Issues and PR. <br>
Colours and emoticons improve presentation, see: <br>
📝 [github-labels.json](https://github.com/rl-institut/super-repository/blob/develop/docs/development/git/github-labels.json)
📝 [github-labels.json](https://github.com/rl-institut/super-repository/blob/develop/docs/development/git/github-labels.json)

## GitHub Workflows (Actions)

Expand All @@ -62,8 +62,8 @@ It is used to improve auto-format code, do linting and run tests before every co
### Install

Install the required package in a python environment. <br>
💻 `pip install pre-commit` install pre-commit <br>
💻 `pre-commit install` install pre-commit
💻 `pip install pre-commit` Install pre-commit <br>
💻 `pre-commit install` Install pre-commit

### Setup

Expand All @@ -81,17 +81,17 @@ List of implemented hooks:

### Use

All commits will trigger the hooks automatically.<br>
💠 `git commit file -m "Commit message #IssueNr"` to commit
All commits will trigger the hooks automatically. <br>
💠 `git commit file -m "Commit message #IssueNr"` Commit with message

Commit without running the hooks.<br>
💠 `git commit --no-verify file` to commit without hooks
Commit without running the hooks. <br>
💠 `git commit --no-verify file` Commit without hooks

!!! note "Line endings"
There can be problems with file line endings on Windows, `CRLF` is used on Windows and `LF` is used on Linux.

To run the hooks on all files in your repository use:<br>
💻 `pre-commit run --all-files`
To run the hooks on all files in your repository use: <br>
💻 `pre-commit run --all-files` Run pre-commit hooks

!!! warning "Markdown files / Admonitions"
If the hook is applied to markdown files that include special formatting,
Expand Down
13 changes: 8 additions & 5 deletions docs/development/collaboration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ The repository has several elements to provide necessary functions.

To participate in the development you can do the following:

- Contribute to the [GitHub Discussions](https://github.com/rl-institut/super-repo/discussions)
- Contribute to the [GitHub Issues](https://github.com/rl-institut/super-repo/issues)
- Follow the [workflow for collaborative development](https://github.com/rl-institut/super-repo/blob/production/CONTRIBUTING.md)
- Get in touch with the community on the [Element Chat](https://rl-institut.github.io/super-repo/develop/development/collaboration/chat/)
- Meet the developers in one of the [regular meetings](https://rl-institut.github.io/super-repo/develop/development/collaboration/meeting/)
- Contribute to the [GitHub Discussions](https://github.com/rl-institut/super-repository/discussions)
- Contribute to the [GitHub Issues](https://github.com/rl-institut/super-repository/issues)
- Follow the [workflow for collaborative development](https://github.com/rl-institut/super-repository/blob/production/CONTRIBUTING.md)
- Get in touch with the community on the [Element Chat](https://rl-institut.github.io/super-repository/develop/development/collaboration/chat/)
- Meet the developers in one of the [regular meetings](https://rl-institut.github.io/super-repository/develop/development/collaboration/meeting/)

!!! note "Used Icons"
🐙 GitHub | 💠 git | 📝 File | 💻 Command Line
15 changes: 9 additions & 6 deletions docs/development/collaboration/license_and_citation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
This software is developed under an
[open-source license](https://en.wikipedia.org/wiki/Open-source_license). <br>
The selected license can be read in the
[LICENSE.txt](https://github.com/rl-institut/super-repo/blob/production/LICENSE.txt).
[LICENSE.txt](https://github.com/rl-institut/super-repository/blob/production/LICENSE.txt).

The users have permission to
[run and use, modify, distribute the program, and release the improvements](https://www.gnu.de/free-software/index.de.html)
Expand All @@ -14,7 +14,7 @@ include the license text.

Please attribute as:

**"Super-Repo" © Reiner Lemoine Institut | MIT License**
**"Super-Repository" © Reiner Lemoine Institut | MIT License**

### REUSE

Expand All @@ -23,8 +23,8 @@ specification.
All files are explicitly stating the corresponding license and copyright information.
It is implemented as GitHub workflow and pre-commit hook:

- GitHub workflow: [reuse.yml](https://github.com/rl-institut/super-repo/blob/feature-7-REUSE/.github/workflows/reuse.yml)
- [Pre-commit hook](https://github.com/rl-institut/super-repo/blob/feature-7-REUSE/.pre-commit-config.yaml#L66)
- GitHub workflow: [reuse.yml](https://github.com/rl-institut/super-repository/blob/feature-7-REUSE/.github/workflows/reuse.yml)
- [Pre-commit hook](https://github.com/rl-institut/super-repository/blob/feature-7-REUSE/.pre-commit-config.yaml#L66)

All copyright information should follow this example:

Expand All @@ -39,11 +39,14 @@ SPDX-License-Identifier: {$SPDX_license_name}

To [scientifically cite](https://en.wikipedia.org/wiki/Quotation) this
repository, see the **_Cite this repository_** function or the file
[CITATION.cff](https://github.com/rl-institut/super-repo/blob/production/CITATION.cff).
[CITATION.cff](https://github.com/rl-institut/super-repository/blob/production/CITATION.cff).

## Contributing

Since this software is under an open source license and can be downloaded,
run and modified, you are invited to comment, improve and develop the program as you wish. <br>
To contribute to the **collaborative development** follow the workflow described in
[CONTRIBUTING.md](https://github.com/rl-institut/super-repo/blob/production/CONTRIBUTING.md).
[CONTRIBUTING.md](https://github.com/rl-institut/super-repository/blob/production/CONTRIBUTING.md).

!!! note "Used Icons"
🐙 GitHub | 💠 git | 📝 File | 💻 Command Line
7 changes: 5 additions & 2 deletions docs/development/collaboration/meeting.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ In order to develop a program collaboratively, it is helpful to regularly
exchange information about the current status and to discuss open questions
and make decisions. <br>
If you want to join the meetings, please use the
[GitHub Discussions](https://github.com/rl-institut/super-repo/discussions).
[GitHub Discussions](https://github.com/rl-institut/super-repository/discussions).

## Developer Meetings

Expand All @@ -14,7 +14,7 @@ the general vision of software development.

The regular developer meeting takes place on <br>
**the first Wednesday of the month between 9 and 9:30 am**. <br>
The meeting room is: [meet.jit.si/super-repo-dev](https://meet.jit.si/super-repo-dev)
The meeting room is: [meet.jit.si/super-repository-dev](https://meet.jit.si/super-repository-dev)

## User Meetings

Expand All @@ -25,3 +25,6 @@ or give general feedback.
The regular user meeting takes place after the developer meeting in the same
room on the <br>
**first Wednesday of the month between 9:30 and 10 am**.

!!! note "Used Icons"
🐙 GitHub | 💠 git | 📝 File | 💻 Command Line
4 changes: 1 addition & 3 deletions docs/development/collaboration/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
Known user of this software can be added to
📝 [USERS.cff](https://github.com/rl-institut/super-repository/blob/production/USERS.cff)
for reference. <br>
Please use the 📝 `issue_template_user_kudos.md`.


Please use the issue template: 📝 `issue_template_user_kudos.md`

!!! note "Used Icons"
🐙 GitHub | 💠 git | 📝 File | 💻 Command Line
38 changes: 19 additions & 19 deletions docs/development/documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ additional features and an elegant design. <br>
### Install

Install the required packages in a python environment. <br>
💻 `pip install mkdocs` install MkDocs <br>
💻 `pip install mkdocs-material` install the material theme
💻 `pip install mkdocs` Install MkDocs <br>
💻 `pip install mkdocs-material` Install the material theme

### Build

Generate the documentation locally. <br>
💻 `mkdocs serve` start the local live version of the documentation <br>
💻 `mkdocs build` create a folder `site` with the documentation
💻 `mkdocs serve` Start the local live version of the documentation <br>
💻 `mkdocs build` Create a folder `site` with the documentation

### Publish

#### Manually

Publish documentation on **GitHub Pages**. <br>
💻 `mkdocs gh-deploy` manually deploys the documentation files
💻 `mkdocs gh-deploy` Manually deploys the documentation files

!!! warning "Manually deploy documentation"
This command overrides all manually deployed versions (mike). <br>
Expand All @@ -49,34 +49,34 @@ A commit on the `develop` branch starts the workflow.
#### Mike

The package [mike](https://github.com/jimporter/mike) is used to deploy [multiple versions](https://squidfunk.github.io/mkdocs-material/setup/setting-up-versioning/?h=versioning) of the documentation.<br>
💻 `pip install mike` install mike <br>
💻 `mike deploy --push --update-aliases 0.1 latest` deploys the latest version <br>
💻 `mike set-default --push latest` Set the default version to latest <br>
💻 `mike deploy develop --push` deploys the develop branch
💻 `pip install mike` Install mike <br>
💻 `mike deploy --push --update-aliases 0.1 latest` Deploys the latest version <br>
💻 `mike set-default --push latest` Set the default version to latest <br>
💻 `mike deploy develop --push` Deploys the develop branch

!!! note "Mike Versions"
It is recommended to use only the **Minor Versions** (for example 0.1) and exclude the **Patch Version** (for example 0.1.1)!

Other useful commands are: <br>
💻 `mike serve` test mike on [`http://localhost:8000`](http://localhost:8000) <br>
💻 `mike list` list all versions <br>
💻 `mike retitle 1.0.0 1.0.1 --push` rename a version <br>
💻 `mike delete 0.1 --push` deletes a specific versions <br>
💻 `mike delete --all --push` deletes all versions
💻 `mike serve` Test mike on [`http://localhost:8000`](http://localhost:8000) <br>
💻 `mike list` List all versions <br>
💻 `mike retitle 1.0.0 1.0.1 --push` Rename a version <br>
💻 `mike delete 0.1 --push` Deletes a specific versions <br>
💻 `mike delete --all --push` Deletes all versions

When adding older versions, load the `Git Tags` used for the releases: <br>
💠 `git checkout v0.1.1` <br>
💻 `mike deploy 0.1 --push` deploys the old version 0.1
💠 `git checkout v0.1.1` <br>
💻 `mike deploy 0.1 --push` Deploys the old version 0.1

When building mike locally, the branch `gh-pages` is modified locally. <br>
💻 `error: gh-pages is unrelated to origin/gh-pages` <br>
💠 `git branch -D gh-pages` delete the local documentation branch
💻 `error: gh-pages is unrelated to origin/gh-pages` <br>
💠 `git branch -D gh-pages` Delete the local documentation branch

## mkdocstrings

[mkdocstrings](https://mkdocstrings.github.io/) generates automatic
documentation (autodocs) from [Google style docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html). <br>
💻 `pip install mkdocstrings` install mkdocstrings
💻 `pip install mkdocstrings` Install mkdocstrings

!!! note "Used Icons"
🐙 GitHub | 💠 git | 📝 File | 💻 Command Line
25 changes: 13 additions & 12 deletions docs/development/release/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,27 @@ The software release has four main goals:
3. Update the documentation
4. Publish a new version of the package at PyPI

The [RELEASE_PROCEDURE.md](https://github.com/rl-institut/super-repository/blob/production/RELEASE_PROCEDURE.md)
The 📝 [RELEASE_PROCEDURE.md](https://github.com/rl-institut/super-repository/blob/production/RELEASE_PROCEDURE.md)
contain detailed instructions to do a release.

## Automated Versioning with Bumpversion

**Bumpversion** is a tool for automated version management in software projects. <br>
It ensures consistent version updates across files and documentation. <br>
By specifying a part to increment (major, minor, or patch), Bumpversion updates
the version number and creates a Git commit or tag automatically.
This streamlines release workflows, reduces human error, and keeps project versioning synchronized.
It ensures consistent version updates across files and documentation <br>
by specifying a part to increment (major, minor, or patch). <br>
This streamlines release workflows and keeps project versioning synchronized.

Install package:
💻 `pip install --upgrade bump-my-version`

For configuration, create a `.bumpversion.toml` file to specify versioning rules and affected files.
💻 `pip install --upgrade bump-my-version` <br>
📝 `.bumpversion.toml` Configuration file for versioning rules and affected files

Test bumpversion: <br>
💻 `bump-my-version show-bump` Preview next possible versions <br>
💻 `bump-my-version bump minor --dry-run -vv` Sandbox bump
💻 `bump-my-version show-bump` Preview next possible versions <br>
💻 `bump-my-version bump minor --dry-run -vv` Sandbox bump

Use bumpversion: <br>
💻 `bump-my-version --current-version 0.2.0 mino`
💠 `git commit file -am "Bumpversion #IssueNr"` to commit bump
💻 `bump-my-version --current-version 0.2.0 mino` <br> Run bumpversion
💠 `git commit file -am "Bumpversion #IssueNr"` Commit bumpversion changes

!!! note "Used Icons"
🐙 GitHub | 💠 git | 📝 File | 💻 Command Line
20 changes: 9 additions & 11 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ hide:
- toc
---

# Welcome to the Super-Repo Documentation
# Welcome to the Super-Repository Documentation

A template repo to test and document elements and features for research software. <br>
A template repository to test and document elements and features for research software. <br>
It implements the collection of repository elements and files. <br>
The goal is to simplify and standardise the creation of software in GitHub repositories.

Expand All @@ -20,17 +20,15 @@ The documentation is separated into two main sections:
Files and structures related to collaborative development, community processes,
and documentation.

- COLLABORATION
- GIT
- CODE-STYLE
- DOCUMENTATION
- RELEASE
- [Collaboration](https://rl-institut.github.io/super-repository/develop/development/collaboration/)
- [Best-Practices](https://rl-institut.github.io/super-repository/develop/development/best-practice/)
- [Documentation](https://rl-institut.github.io/super-repository/develop/development/documentation/)
- [Release](https://rl-institut.github.io/super-repository/develop/development/release/)

### Fields for code documentation

Methods and functions of the module.

- INSTALL
- FUNCTIONS
- TESTS
- LOGGING
- [Install](https://rl-institut.github.io/super-repository/develop/user_documentation/install/)
- [Functions](https://rl-institut.github.io/super-repository/develop/user_documentation/)
- [Code Example](https://rl-institut.github.io/super-repository/develop/user_documentation/code_example/)
Loading

0 comments on commit a954a0a

Please sign in to comment.