Skip to content

Commit

Permalink
Update the documentation according to the changes #84
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Druez <tdruez@nexb.com>
  • Loading branch information
tdruez committed Feb 12, 2021
1 parent 51ce0c4 commit 25c1be6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/docker-image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ required for the creation of the Docker image.
Clone the git `ScanCode.io repo <https://github.com/nexB/scancode.io>`_,
create an environment file, and build the Docker image::

git clone git@github.com:nexB/scancode.io.git && cd scancode.io
git clone https://github.com/nexB/scancode.io.git && cd scancode.io
make envfile
docker-compose build

Expand Down
10 changes: 3 additions & 7 deletions docs/scanpipe-command-line.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ copy ``~/docker/alpine-base.tar`` to the foo project :guilabel:`input/` director
`$ scanpipe add-pipeline --project PROJECT <pipeline ...>`
----------------------------------------------------------

Add the ``<pipeline>`` found at this location to the project named ``PROJECT``.
Add the ``<pipeline>`` to the provided ``PROJECT``.
You can use more than one ``<pipeline>`` to add multiple pipelines at once.

.. warning::
Expand All @@ -85,17 +85,13 @@ You can use more than one ``<pipeline>`` to add multiple pipelines at once.
For example, assuming you have created beforehand a project named "foo", this will
add the docker pipeline to your project::

$ scanpipe add-pipeline --project foo scanpipe/pipelines/docker.py
$ scanpipe add-pipeline --project foo docker


`$ scanpipe run --project PROJECT`
----------------------------------

Run all the pipelines of the project named ``PROJECT``.

Optional arguments:

- ``--resume`` Resume the latest failed pipeline execution.
Run the next pipeline of the project named ``PROJECT`` queue.


`$ scanpipe show-pipeline --project PROJECT`
Expand Down
7 changes: 2 additions & 5 deletions docs/scanpipe-concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,11 @@ Analysis results and reports are eventually posted at the end of a pipeline run.

All pipelines are located in the ``scanpipe.pipelines`` module.
Each pipeline consist of a Python script including one subclass of the ``Pipeline`` class.
Each step is a method of the ``Pipeline`` class decorated with a ``@step`` decorator.
At its end, a step states which is the next step to execute.
Each step is a method of the ``Pipeline`` class.
The execution order of the steps is declared through the ``steps`` class attribute.

.. note::
One or more pipelines can be assigned to a project as a sequence.
If one pipeline of a sequence completes successfully, the next pipeline in
the queue for this project is launched automatically and this until all
the scheduled pipelines have executed.


Codebase Resources
Expand Down
10 changes: 5 additions & 5 deletions docs/scanpipe-tutorial-1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Step-by-step

- Add the docker pipeline to your project::

$ scanpipe add-pipeline --project staticbox scanpipe/pipelines/docker.py
$ scanpipe add-pipeline --project docker

- Check that the docker pipeline was added to your project::

Expand All @@ -59,13 +59,13 @@ Step-by-step
pipeline run::

$ scanpipe show-pipeline --project staticbox
"[SUCCESS] scanpipe/pipelines/docker.py"
"[SUCCESS] docker"

- Get the results of the pipeline run as a JSON file using the ``output`` command::

$ scanpipe output --project staticbox results.json
$ scanpipe output --project staticbox --format json

- Open the ``results.json`` in your preferred viewer.
- Open the ``output/results-<timestamp>.json`` in your preferred viewer.

----

Expand All @@ -80,5 +80,5 @@ Step-by-step

$ scanpipe create-project staticbox2 \
--input ~/30-alpine-nickolashkraus-staticbox-latest.tar \
--pipeline scanpipe/pipelines/docker.py \
--pipeline docker \
--run
2 changes: 1 addition & 1 deletion docs/scanpipe-tutorial-2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Step-by-step

$ scanpipe create-project asgiref \
--input ~/asgiref-3.3.0-py3-none-any.whl \
--pipeline scanpipe/pipelines/scan_codebase.py \
--pipeline scan_codebase \
--run

.. note::
Expand Down

0 comments on commit 25c1be6

Please sign in to comment.