@@ -2,54 +2,54 @@ How to get started
22------------------
33
441. Install *Pipenv * at a system level
5-
5+
66 If you are not using it for your projects, you should. *Pipenv * is a mix between *pip * and *virtualenv * (it uses
77 both of them below) and basically manages everything. You can probably find *Pipenv * packaged, check their webpage
88 for installation steps.
99
10102. Install dependencies
11-
11+
1212 In a command line, navigate to the current project directory and install the dependencies by running one of the
1313 commands below.
1414
15- * To use the bot: `pipenv install `
15+ * To use the bot: `` pipenv install ` `
1616
17- * To develop: `pipenv install -d `
17+ * To develop: `` pipenv install -d ` `
1818
1919 If these steps don't work, please report it so that I can update these instructions with relevant steps.
2020
21213. Install *mostbot * as a package
22-
23- Run the command `python setup.py develop `. You can also do `python setup.py install `, but it's better to keep the
24- installation linked to this directory instead of having `setuptools ` package and install the bot separately. If you
22+
23+ Run the command `` python setup.py develop `` . You can also do `` python setup.py install ` `, but it's better to keep the
24+ installation linked to this directory instead of having `` setuptools ` ` package and install the bot separately. If you
2525 have doubts on what I just said, https://stackoverflow.com/questions/19048732/python-setup-py-develop-vs-install
2626
27274. Install a database
28-
28+
2929 Apart from the bot code, you also need a database to link the bot to. You can link it to whatever *PostgreSQL *
3030 database you want, but I would recommend you to run a local instance.
31-
31+
3232 Using *Docker * and *Docker Compose * is a really good way to run packaged software. There are complete guides on the
3333 internet about how to run them, but for the basics:
3434
3535 1. Install *Docker * either using your package manager or as suggested in *Docker *'s official webpage. By the way,
3636 the official website method is just a Python script, so you can also install it with *pip * (I would
3737 discourage this option).
38-
38+
3939 2. Install *Docker Compose *. Same thing as *Docker *: user either package manager or the official webpage script.
40-
40+
4141 3. Open another terminal in this folder. This new terminal will be used all the time to maintain up the database
4242 while your bot is running. There are other ways to run the database in the background, but I recommend this
4343 one.
44-
45- 4. In the new terminal, run `docker-compose up ` to download and run the packaged software (the *PostgreSQL *
44+
45+ 4. In the new terminal, run `` docker-compose up ` ` to download and run the packaged software (the *PostgreSQL *
4646 database in this case).
47-
48- 5. Run `alembic upgrade head ` to create the database structure by setting up all the database tables, etc.
47+
48+ 5. Run `` alembic upgrade head ` ` to create the database structure by setting up all the database tables, etc.
4949
50505. Launch *mosbot *
51-
52- Go back to the first terminal, and run `bot ` to launch. The output of the command should be self explanatory.
51+
52+ Go back to the first terminal, and run `` bot ` ` to launch. The output of the command should be self explanatory.
5353
5454
5555
@@ -59,20 +59,20 @@ Project structure
5959This is a brief outline to cover the basics of the project structure:
6060
6161* The more inner layer and the thing that most defines the bot is the Data Model. This are the Entities that we
62- manage, and they are in `mosbot/db.py `.
62+ manage, and they are in `` mosbot/db.py ` `.
6363
6464* From there, because we have no ORM at the moment (asyncio doesn't have an async ORM yet), we have all the functions
65- and queries that operate on the data in `mosbot/query.py `.
65+ and queries that operate on the data in `` mosbot/query.py ` `.
6666
6767* Now you should be able to gather/write data and make some operations. There are some operations that are not as
6868 "simple" as the queries, and these are the "usecases" where you have a whole flow of queries and data transformation.
69- The place where these are stored is in `mosbot/usecase.py `
69+ The place where these are stored is in `` mosbot/usecase.py ` `
7070
7171* Finally, in the most outer layer, you have the two main "interfaces", this is where we receive the data from the
72- `abot ` library and we have the handlers and commands. The files are, `mosbot/handler.py ` for event handlers and
73- `mosbot/command.py ` for the commands.
72+ `` abot `` library and we have the handlers and commands. The files are, `` mosbot/handler.py ` ` for event handlers and
73+ `` mosbot/command.py ` ` for the commands.
7474
75- * There are two other files, that are "transversal" that are the `mosbot/utils.py ` and `mosbot/config.py `.
75+ * There are two other files, that are "transversal" that are the `` mosbot/utils.py `` and `` mosbot/config.py ` `.
7676
7777
7878You should think of this architecture (file structure/function dependencies) as an onion. The idea is that the most
@@ -91,6 +91,16 @@ Further recommendations
9191 rest of alternatives. Of course, you are free to choose whichever editor you want.
9292
9393
94+ Using the Helm chart
95+ --------------------
96+
97+ 1. Install dependencies:
98+
99+ .. code-block :: bash
100+
101+ cd ./helm
102+ helm dependency update
103+
94104
95105 Contributions
96106-------------
0 commit comments