From bcf13b5ff1d2d158a21ab5b7c0ac104a8f500b15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Mart=C3=ADn?= Date: Thu, 3 Oct 2019 17:02:12 +0000 Subject: [PATCH] Documentation --- README.md | 47 ------------------------------------------- docs/contributing.rst | 41 +++++++++++++++++++++++++++++++++++++ docs/index.rst | 5 +++-- docs/installation.rst | 13 +++++++++++- 4 files changed, 56 insertions(+), 50 deletions(-) create mode 100644 docs/contributing.rst diff --git a/README.md b/README.md index 2f316b9..c395318 100644 --- a/README.md +++ b/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) -- [Jeeves](#jeeves) - - [Documentation](#documentation) - - [Running it](#running-it) - - [Using the cli](#using-the-cli) - - [Contributing](#contributing) - ## Documentation 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 diff --git a/docs/contributing.rst b/docs/contributing.rst new file mode 100644 index 0000000..bc7e9a7 --- /dev/null +++ b/docs/contributing.rst @@ -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 diff --git a/docs/index.rst b/docs/index.rst index 4168c65..a97bcea 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,12 +12,13 @@ Welcome to Jeeves's documentation! installation.rst usage.rst + contributing.rst .. toctree:: - :maxdepth: 2 + :glob: :caption: API Reference: - api/modules.rst + api/core.rst Indices and tables diff --git a/docs/installation.rst b/docs/installation.rst index 59a38de..e762e0a 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -1,4 +1,15 @@ 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