Skip to content

Commit d314a04

Browse files
committed
Create readthedocs documentation
1 parent 08886ad commit d314a04

23 files changed

+833
-24
lines changed

.readthedocs.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Add compatibility for MAC
88
- Move `ci` and `release` Docker images from hub.docker.com to GitHub package repository
99
- Add documentation in README.md
10+
- [BC Break] Fix `BootstrapProcess` class name, it was `BoostrapProcess` before
1011

1112
### [1.0.1](../../compare/1.0.0...1.0.1) - 2024-12-02
1213

docs/.readthedocs.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
version: 2
5+
6+
build:
7+
os: ubuntu-24.04
8+
tools:
9+
python: "3.13"
10+
jobs:
11+
pre_install:
12+
- pip install mkdocs-material
13+
14+
mkdocs:
15+
configuration: docs/mkdocs.yml

docs/assets/css/theme.css

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
body {
2+
cursor: default;
3+
}
4+
5+
h1 {
6+
margin-bottom: 0.5em !important;
7+
color: #4051B5 !important;
8+
font-weight: 500 !important;
9+
}
10+
11+
h2 {
12+
margin-top: 0.5em !important;
13+
margin-bottom: 0.5em !important;
14+
color: #4051B5 !important;
15+
font-size: 1.3em;
16+
}
17+
18+
div.md-main__inner {
19+
margin-top: 0;
20+
}
21+
22+
:root {
23+
--md-typeset-a-color: #30a2a9;
24+
}
25+
26+
.icon-green {
27+
color: #069006;
28+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
document.addEventListener("DOMContentLoaded", function(event) {
2+
document.querySelector(".md-search__input").addEventListener("focus", (e) => {
3+
const event = new CustomEvent("readthedocs-search-show");
4+
document.dispatchEvent(event);
5+
});
6+
});

docs/contributing/tips-for-devs.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
hide:
3+
- toc
4+
---
5+
6+
# Work on the code
7+
8+
You can add a volume from your project in `/composer/vendor/steevanb/php-parallel-processes` to work on the code:
9+
10+
```bash hl_lines="6"
11+
docker \
12+
run \
13+
--rm \
14+
-it \
15+
-v "$(pwd)":/app \
16+
-v "$(pwd)":/composer/vendor/steevanb/php-parallel-processes \
17+
steevanb/php-parallel-processes:1.1.0-alpine \
18+
php /app/parallel-processes.php
19+
```
20+
21+
# Work on the documentation
22+
23+
We use [readthedocs](https://about.readthedocs.com/),
24+
[mkdocs](https://docs.readthedocs.com/platform/stable/intro/mkdocs.html)
25+
and [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/code-blocks/).
26+
27+
Documentation is written in Markdown in [docs/](https://github.com/steevanb/php-parallel-processes/tree/readthedocs/docs).
28+
29+
See [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/code-blocks/) for Markdown syntaxes and examples.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
hide:
3+
- toc
4+
---
5+
6+
# Compatibility
7+
8+
`parallel-processes` is compatible with almost every development and production environment.
9+
10+
# Installed as a Composer dependency
11+
12+
<div class="grid cards" markdown>
13+
14+
- :material-language-php: __PHP__ ^8.2
15+
- :material-penguin: __OS__ Linux and macOS
16+
- :material-symfony: __[symfony/console](https://symfony.com/doc/current/components/console.html)__ ^7.0
17+
- :material-symfony: __[symfony/process](https://symfony.com/doc/current/components/process.html)__ ^7.0
18+
19+
</div>
20+
21+
See [Installation with Composer](../installation/composer-dependency.md).
22+
23+
# Used with the Docker image
24+
25+
<div class="grid cards" markdown>
26+
27+
- :material-docker: __Docker__ You should already have a compatible version
28+
- :material-penguin: __OS__ Linux, Windows and macOS
29+
30+
</div>
31+
32+
See [use it with Docker](../installation/docker-image.md).

docs/getting-started/license.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
hide:
3+
- toc
4+
---
5+
6+
# License
7+
8+
`parallel-processes` is under [Apache 2.0 license](https://github.com/steevanb/php-parallel-processes/blob/master/LICENSE).
9+
10+
The Apache 2.0 license allows you to freely use, modify, and distribute software, including for commercial purposes,
11+
as long as you keep the copyright and license notices and indicate any changes made.

docs/index.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
hide:
3+
- toc
4+
---
5+
6+
# Parallel processes
7+
8+
`parallel-processes` is an open source tool to execute processes in parallel, with these key features:
9+
10+
<div class="grid cards" markdown>
11+
12+
- :material-docker:{ .lg .middle } __Install it or use Docker images__
13+
14+
---
15+
16+
Install it as a Composer dependency or use the Docker images to avoid installing anything.
17+
18+
[:octicons-arrow-right-24: Installation](installation/composer-dependency.md)
19+
20+
- :material-file-tree:{ .lg .middle } __Process start rules__
21+
22+
---
23+
24+
Configure when your process should start: immediately, wait for another process, bootstrap or tear down.
25+
26+
[:octicons-arrow-right-24: Bootstrap or tear down](usage/bootstrap-tear-down.md)
27+
28+
- :material-cog-outline:{ .lg .middle } __Process configuration__
29+
30+
---
31+
32+
Configure each process: name, command, max execution time, output verbosity, etc.
33+
34+
[:octicons-arrow-right-24: Configure process](usage/process-configuration.md)
35+
36+
- :material-cog-outline:{ .lg .middle } __Processes execution configuration__
37+
38+
---
39+
40+
Configure your processes in PHP.
41+
42+
[:octicons-arrow-right-24: Minimal configuration](usage/minimal-configuration.md)
43+
44+
- :material-message-bulleted:{ .lg .middle } __Verbosity__
45+
46+
---
47+
48+
Use verbosity to define if you want to show processes output, execution time, only error outputs or all outputs.
49+
50+
[:octicons-arrow-right-24: Output verbosity](usage/output-verbosity.md)
51+
52+
- :material-compare:{ .lg .middle } __Theme__
53+
54+
---
55+
56+
Choose your theme between Default and Summary, or create your own.
57+
58+
[:octicons-arrow-right-24: Theme configuration](theme/configuration.md)
59+
60+
</div>
61+
62+
# License
63+
64+
`parallel-processes` is under [Apache 2.0 license](getting-started/license.md).
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
hide:
3+
- toc
4+
---
5+
6+
# Composer dependency
7+
8+
If you want to install `parallel-processses` in your project, with Composer:
9+
10+
```bash
11+
composer require steevanb/php-parallel-processes:^1.0
12+
```
13+
14+
# Available versions
15+
16+
See [releases](https://github.com/steevanb/php-parallel-processes/releases).
17+
18+
See [changelog](https://github.com/steevanb/php-parallel-processes/blob/master/changelog.md).

0 commit comments

Comments
 (0)