Commit 9db00d70 authored by Phyks (Lucas Verney)'s avatar Phyks (Lucas Verney) Committed by Florent Fourcot

Rewrite Weboob doc guides according to latest changes in CI and modules.

parent b78131f2
......@@ -4,52 +4,42 @@ How to contribute
Write a patch
-------------
Help yourself with the [documentation](http://dev.weboob.org).
Help yourself with the `documentation <http://docs.weboob.org/>`_.
Find an [opened issue on gitlab](https://git.weboob.org/weboob/devel/issues),
or write you own bugfix or feature. Then, once it is necessary, commit with:
Find an opened issue on `this website <https://git.weboob.org/weboob/devel/issues>`_, or write your own bugfix or feature.
Then, once it is necessary, commit with::
```
$ git commit -a
```
$ git commit -a
Do not forget to write a helpful commit message.
Check your patch
----------------
You can run these scripts to be sure your patch doesn’t break anything:
```
$ tools/pyflakes.sh
$ tools/run_tests.sh yourmodulename # or without yourmodulename to test everything
```
You can run these scripts to be sure your patch doesn't break anything::
Perhaps you should also write or fix tests.
$ tools/pyflakes.sh
$ tools/weboob_lint.sh
$ tools/run_tests.sh yourmodulename # or without yourmodulename to test everything
Send a patch
------------
Perhaps you should also write or fix tests. These tests are automatically run by
`Gitlab CI <https://git.weboob.org/weboob/devel/pipelines>`_ at each commit and merge requests.
```
$ git format-patch -n -s origin
```
Create a merge request or send a patch
--------------------------------------
Then, send them with this command:
The easiest way to send your patch is to create a fork on `the Weboob Gitlab <https://git.weboob.org>`_ and create a merge
request from there. This way, the code review process is easier and continuous integration is run automatically (see
previous section).
```
$ git send-email --to=weboob@weboob.org *.patch
```
If you prefer good old email patches, just use
You can also send the files by yourself if you haven’t any configured MTA on
your system.
::
Create a fork on git.weboob.org
-------------------------------
$ git format-patch -n -s origin
If you think you’ll contribute to Weboob regularly, you can create a repository
on [git.weboob.org](git.weboob.org). To do so,
[signup](https://git.weboob.org/users/sign_in) and click on _Fork_ on the weboob
repository's page.
Then, send them with this command::
Then, you can push your commits, and ask for merge requests.
$ git send-email --to=weboob@weboob.org *.patch
All git branch are listed here: https://git.weboob.org/explore/projects
\ No newline at end of file
You can also send the files by yourself if you haven't any configured MTA on your system.
......@@ -9,7 +9,8 @@ Write a patch
Help yourself with the `documentation <http://docs.weboob.org/>`_.
Find an opened issue on this website, or write you own bugfix or feature. Then, once it is necessary, commit with::
Find an opened issue on `this website <https://git.weboob.org/weboob/devel/issues>`_, or write your own bugfix or feature.
Then, once it is necessary, commit with::
$ git commit -a
......@@ -21,12 +22,20 @@ Check your patch
You can run these scripts to be sure your patch doesn't break anything::
$ tools/pyflakes.sh
$ tools/weboob_lint.sh
$ tools/run_tests.sh yourmodulename # or without yourmodulename to test everything
Perhaps you should also write or fix tests.
Perhaps you should also write or fix tests. These tests are automatically run by
`Gitlab CI <https://git.weboob.org/weboob/devel/pipelines>`_ at each commit and merge requests.
Send a patch
------------
Create a merge request or send a patch
--------------------------------------
The easiest way to send your patch is to create a fork on `the Weboob Gitlab <https://git.weboob.org>`_ and create a merge
request from there. This way, the code review process is easier and continuous integration is run automatically (see
previous section).
If you prefer good old email patches, just use
::
......@@ -38,62 +47,17 @@ Then, send them with this command::
You can also send the files by yourself if you haven't any configured MTA on your system.
Ask for a public repository on git.symlink.me
---------------------------------------------
If you think you'll contribute to Weboob regularly, you can ask for a public repository. You'll also be able to push your commits in, and they'll be merged into the main repository easily.
All git branch are listed here: http://git.symlink.me/
By hosting a buildbot slave
***************************
To be sure weboob works fine on lot of architectures, OS and configurations, but also that websites haven't changed and backends still support them, it's important to have enough buildbot slaves.
If you are interested by hosting a buildbot slave, follow these instructions:
Create a slave
--------------
Firstly, you have to install ``pyflakes``, ``nose`` and `buildbot <http://buildbot.net>`_.
Run::
$ buildslave create-slave <dirname> buildbot.weboob.org:9080 <name> <password>
.. note::
if you use an old version of buildbot, run ``buildbot`` instead of ``buildslave``.
Parameters are:
* **dirname** — the path where you want to setup your slave on your host.
* **name** — the name of your slave. It would be for example your name, your nickname, your hostname. Check on http://buildbot.weboob.org the name you want to use isn't already taken.
* **password** — choose a password to login on the master.
For example::
$ buildslave create-slave /home/me/buildbot buildbot.weboob.org:9080 me secret123
Then, edit files in ``/home/me/buildbot/info/`` and run the slave::
$ buildslave start /home/me/buildbot
Contact us
----------
To connect your slave to our master, you can send us an email on admin@weboob.org with the following information:
* The name of your slave;
* The IP address of the host;
* The password of your slave;
* Indicate if you want to run tests for every merges (three times a day) or only do a nightly build.
When your slave will be accepted, you will see it on http://buildbot.weboob.org/waterfall.
By hosting a Gitlab CI runner
*****************************
How it works
------------
To be sure weboob works fine on lot of architectures, OS and configurations, but also that websites haven't changed and
backends still support them, it's important to have enough runners with different configurations, especially since
running some tests requires a working backend.
When a build is requested by master, your slave updates its local git repository, and run ``tools/run_tests.sh``.
If you are interested by hosting a Gitlab-CI runner, follow these instructions:
To work correctly, we suggest you to add as many as possible backends with the user of the slave. No private information will be sent to master, and it's better to have tests on backends which need authentication, because not every developers have accounts on them.
You can `install a Gitlab runner <https://docs.gitlab.com/runner/install/>`_ and make it use a specific backend file (be
it either by creating a dedicated Docker image with your credentials or running it in ``shell`` mode and making the
backend file available to it).
Then, you should contact us at admin@weboob.org so that we could help you register your runner with our Gitlab.
This diff is collapsed.
......@@ -19,6 +19,10 @@ It looks for every files named ``test.py``, and find classes derivated from ``Te
Then, it run every method which name starts with ``test_``.
.. note::
Some environment variables are available, to use specific backend file or send the test results. Refer to `the
comments in the script <https://git.weboob.org/weboob/devel/blob/master/tools/run_tests.sh#L4-8>`_ for more infos on this.
Write a test case
*****************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment