Skip to content

Commit

Permalink
feat: Update documentation (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
lfvdavid authored Apr 5, 2024
1 parent 6483521 commit 4205b04
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,43 +11,43 @@

This provides a generic plugin for Poetry that runs during the build process.

What the plugin does is collect decorated code, formatting it and writing it to a yaml file saved to the `dist` folder, utilizing the `reqstool-decorators` package for the processing.
The plugin collects decorated code, formatting it and writing it to a annotations.yml file saved to the `build/reqstool/` folder, utilizing the `reqstool-python-decorators` package for the processing.



## Installation

### Plugin

The package name is `reqstool-poetry-plugin`.
The package name is `reqstool-python-poetry-plugin`.

* Using poetry:

```
$poetry add reqstool-poetry-plugin
$poetry add reqstool-python-poetry-plugin
```

* pip install (unsure if working as intended):

```
$pip install reqstool-poetry-plugin
$pip install reqstool-python-poetry-plugin
```

### Dependencies

#### reqstool-decorators

The plugin reads decorators available in the `reqstool-decorators` package.
The plugin reads decorators available in the `reqstool-python-decorators` package.

```
$pip install reqstool-decorators
$pip install reqstool-python-decorators
```

pyproject.toml

```
[tool.poetry.dependencies]
reqstool-decorators = "^0.1.5"
reqstool-python-decorators = "<version>"
```

## Usage
Expand All @@ -62,15 +62,15 @@ The plugin gets the paths where it will look for decorated code from ("." is fil
pythonpath = [".", "src", "tests"]
```

So in this example all files in "src" and "tests", including subfolders, will be processed.
In this example all files in "src" and "tests", including subfolders, will be processed.

#### Poetry

This will be added when running `poetry add reqstool-poetry-plugin`
This will be added when running `poetry add reqstool-python-poetry-plugin`

```
[tool.poetry.dependencies]
reqstool-poetry-plugin = "<version>"
reqstool-python-poetry-plugin = "<version>"
```

### Decorators
Expand All @@ -80,24 +80,24 @@ Used to decorate your code as seen in the examples below, the decorator processi
Import decorators:

```
from reqstool-decorators.decorators.decorators import Requirements, SVCs
from reqstool-python-decorators.decorators.decorators import Requirements, SVCs
```

Example usage of the decorators:

```
@Requirements(REQ_111, REQ_222)
@Requirements("REQ_111", "REQ_222")
def somefunction():
```

```
@SVCs(SVC_111, SVC_222)
@SVCs("SVC_111", "SVC_222")
def test_somefunction():
```

### Poetry build

When running `$poetry build` or `$poetry install` the plugin will run the `activate` function located inside `DecoratorsPlugin`, calling functions from the `reqstool-decorators` package and generate a yaml file in the `dist` folder containing formatted data on all decorated code found.
When running `$poetry build` or `$poetry install` the plugin will run the `activate` function located inside `DecoratorsPlugin` class, calling functions from the `reqstool-python-decorators` package and generate a annotations.yml file in the `build/reqstool/` folder containing formatted data on all decorated code found.



Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/description.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

This provides a generic plugin for Poetry that runs during the build process.

What the plugin does is collect decorated code, formatting it and writing it to a yaml file saved to the `build` folder, utilizing the `reqstool-python-decorators` package for the processing.
The plugin collects decorated code, formatting it and writing it to a annotations.yml file saved to the `build/reqstool/` folder, utilizing the `reqstool-python-decorators` package for the processing.
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/installation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ pyproject.toml

```
[tool.poetry.dependencies]
reqstool-python-decorators = "<installed version>"
reqstool-python-decorators = "<version>"
```
8 changes: 4 additions & 4 deletions docs/modules/ROOT/pages/usage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The plugin gets the paths where it will look for decorated code from ("." is fil
pythonpath = [".", "src", "tests"]
```

So in this example all files in "src" and "tests", including subfolders, will be processed.
In this example all files in "src" and "tests", including subfolders, will be processed.

==== Poetry

Expand All @@ -35,15 +35,15 @@ from reqstool_python_decorators.decorators.decorators import Requirements, SVCs
Example usage of the decorators:

```
@Requirements(REQ_111, REQ_222)
@Requirements("REQ_111", "REQ_222")
def somefunction():
```

```
@SVCs(SVC_111, SVC_222)
@SVCs("SVC_111", "SVC_222")
def test_somefunction():
```

=== Poetry build

When running `$poetry build` or `$poetry install` the plugin will run the `activate` function located inside `DecoratorsPlugin`, calling functions from the `reqstool-python-decorators` package and generate a yaml file in the `build` folder containing formatted data on all decorated code found.
When running `$poetry build` or `$poetry install` the plugin will run the `activate` function located inside `DecoratorsPlugin` class, calling functions from the `reqstool-python-decorators` package and generate a annotations.yml file in the `build/reqstool/` folder containing formatted data on all decorated code found.

0 comments on commit 4205b04

Please sign in to comment.