Documentation
This commit is contained in:
parent
97a04e6d82
commit
bcf13b5ff1
47
README.md
47
README.md
|
@ -4,53 +4,6 @@ Jeeves will take care of your boring tasks so you don't have to worry.
|
||||||
|
|
||||||
![Python 3.7+](https://img.shields.io/badge/python-3.7%2B-blue)
|
![Python 3.7+](https://img.shields.io/badge/python-3.7%2B-blue)
|
||||||
|
|
||||||
- [Jeeves](#jeeves)
|
|
||||||
- [Documentation](#documentation)
|
|
||||||
- [Running it](#running-it)
|
|
||||||
- [Using the cli](#using-the-cli)
|
|
||||||
- [Contributing](#contributing)
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
Documentation is accesible and readable in the [docs](./docs) folder.
|
Documentation is accesible and readable in the [docs](./docs) folder.
|
||||||
|
|
||||||
## Running it
|
|
||||||
|
|
||||||
### Using the cli
|
|
||||||
|
|
||||||
Jeeves provide a useful CLI to execute your flows in a very convenient way, for example. given a test flow:
|
|
||||||
|
|
||||||
``` javascript
|
|
||||||
// definition.json
|
|
||||||
{
|
|
||||||
"name": "Test flow",
|
|
||||||
"tasks": [
|
|
||||||
{
|
|
||||||
"name": "Say hello",
|
|
||||||
"type": "jeeves.core.tasks.shell:ShellTask",
|
|
||||||
"parameters": {
|
|
||||||
"script": "#!/bin/bash\necho HELLO WORLD!"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
You can run it using `jeeves execute definition.json`:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ jeeves execute --output definition.json
|
|
||||||
(i) Running flow from definition.json
|
|
||||||
=== Running flow: Test flow
|
|
||||||
ok! Running step [1/1]: Say hello
|
|
||||||
=== Full output:
|
|
||||||
HELLO WORLD
|
|
||||||
```
|
|
||||||
|
|
||||||
> You can also run the same command from stdin using:
|
|
||||||
> - `cat definition.json | jeeves execute --output -`
|
|
||||||
> - `jeeves execute --output - < definition.json`
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
TODO
|
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
Contributing
|
||||||
|
============
|
||||||
|
|
||||||
|
Initial setup
|
||||||
|
-------------
|
||||||
|
|
||||||
|
In order to contribute to the project you will need to download the
|
||||||
|
source code and be able to run it in your local machine.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
git clone git@gitlab.com:fmartingr/jeeves.git
|
||||||
|
|
||||||
|
|
||||||
|
In this project we use Poetry_ to manage
|
||||||
|
the python dependencies and virtual environments. Make sure you have it
|
||||||
|
installed before continuing.
|
||||||
|
|
||||||
|
In order to install all dependencies inside a virtual environment, just
|
||||||
|
run:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
poetry install
|
||||||
|
|
||||||
|
Accessing a shell within the virtutalenv
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
poetry shell
|
||||||
|
|
||||||
|
|
||||||
|
Running the test suite
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
poetry run pytest .
|
||||||
|
|
||||||
|
.. _Poetry: https://poetry.eustace.io
|
|
@ -12,12 +12,13 @@ Welcome to Jeeves's documentation!
|
||||||
|
|
||||||
installation.rst
|
installation.rst
|
||||||
usage.rst
|
usage.rst
|
||||||
|
contributing.rst
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:glob:
|
||||||
:caption: API Reference:
|
:caption: API Reference:
|
||||||
|
|
||||||
api/modules.rst
|
api/core.rst
|
||||||
|
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
|
|
|
@ -1,4 +1,15 @@
|
||||||
Installation
|
Installation
|
||||||
============
|
============
|
||||||
|
|
||||||
TODO
|
From git
|
||||||
|
--------
|
||||||
|
|
||||||
|
Right now the project is not published on PyPi, so to install it you
|
||||||
|
need to clone the repository or download a release manually.
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
git clone git@gitlab.com:fmartingr/jeeves.git
|
||||||
|
cd jeeves
|
||||||
|
poetry install
|
||||||
|
poetry run jeeves --help
|
||||||
|
|
Reference in New Issue