Skip to content

Commit

Permalink
docs: Fix non-consecutive and incorrect header levels
Browse files Browse the repository at this point in the history
  • Loading branch information
matejmatuska committed Sep 9, 2024
1 parent ed9290a commit a93e250
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions docs/source/tutorials/debugging.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Debugging actors
# Debugging actors

### Snactor
## Snactor

The snactor tool is used to debug your actors. You can execute actors
and save their output, so that it can be consumed by other actors.
Expand All @@ -11,7 +11,7 @@ the --debug parameter which sets the environment variable to '1' when it is
used. In that case, it enables the debug logging, so that any actor that logs
to self.log.debug gets its output printed on the commandline.

### PyCharm / rpdb
## PyCharm / rpdb

You can configure PyCharm to debug by pointing it to the snactor path and passing the arguments on the command line.
The PyCharm debugger will also follow the child processes that are created by the snactor tool to execute the actor
Expand Down
6 changes: 3 additions & 3 deletions docs/source/tutorials/dialogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ As an example we will change [IpResolver](messaging.md#creating-a-message-consum
will decide which hostnames will be resolved.


### Creating the dialog
## Creating the dialog

Import Dialog and MultipleChoiceComponent from leapp.dialog and leapp.dialog.components respectively.
Create an instance of Dialog, specifying scope which is used to identify data in the answer file,
Expand Down Expand Up @@ -38,7 +38,7 @@ class IpResolver(Actor):
description='No description'),)),)
```

### Using the dialog and the answers
## Using the dialog and the answers

To pose a question that needs to be answered use get_answers method and pass the dialog containing the question.

Expand Down Expand Up @@ -70,7 +70,7 @@ def process(self):
self.produce(ResolvedHostname(name=hostname, ips=ips))
```

### Explaining the dialogs processing mechanism during the upgrade
## Explaining the dialogs processing mechanism during the upgrade

The upgrade itself, from the operator's point of view, consists of 3 distinct stages: preupgrade, remediate and upgrade.

Expand Down
12 changes: 6 additions & 6 deletions docs/source/tutorials/messaging.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## Using messaging to send data between actors
# Using messaging to send data between actors

The Leapp framework uses messages to send data to other actors that are executed afterward.
Messages are defined through the models declared [earlier](first-actor.md#creating-a-model). Actors can consume these messages and produce data based on their input.

As an example, the actors consume Hostname messages, resolve IPs for those
hostnames, and create the ResolvedHostname model to send a new type of message.

### Creating the ResolvedHostname model
## Creating the ResolvedHostname model

Create the ResolvedHostname model by using the snactor tool.

Expand Down Expand Up @@ -39,7 +39,7 @@ fields.Nullable(fields.String())
are required.


### Creating a message consuming actor
## Creating a message consuming actor

Create a new actor that resolves the IPs for the hostnames:

Expand Down Expand Up @@ -96,7 +96,7 @@ class IpResolver(Actor):
self.produce(ResolvedHostname(name=hostname.name, ips=ips))
```

### Storing messages in the repository data for reuse
## Storing messages in the repository data for reuse

The `snactor` framework tool saves the output of actors as locally stored messages,
so that they can be consumed by other actors that are being developed.
Expand All @@ -110,7 +110,7 @@ $ snactor run --save-output HostnameScanner
The output of the actor is stored in the local repository data file, and it can be used
by other actors. To flush all saved messages from the repository database, run `snactor messages clear`.

### Testing the new actor
## Testing the new actor

With the input messages available and stored, the actor can be tested.

Expand All @@ -136,6 +136,6 @@ $ snactor run --print-output IpResolver
]
```

#### Screencast
### Screencast

<asciinema-player src="_static/screencasts/messaging.json"></ascinema-player>

0 comments on commit a93e250

Please sign in to comment.