Skip to content

Commit eb567c2

Browse files
authored
Support pip/uv requirements (#120)
1 parent 7018ff8 commit eb567c2

File tree

4 files changed

+47
-19
lines changed

4 files changed

+47
-19
lines changed

docs/dev-guide/contributing.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,12 @@ Pull Request Checklist
101101
When you create a pull request, please ensure that the following is done:
102102

103103
1. Ensure that you have forked the repository and created a branch from ``main`` with the correct naming conventions as mentioned :ref:`above <Branch Naming Convention>`.
104-
2. Make sure that you have noted the changes in the ``changelog.md`` file.
105-
3. Your code is properly formatted and linted (and all workflows are passing).
104+
2. Your code is properly formatted and linted (and all workflows are passing).
106105

107106
Git Commit Guidelines
108107
---------------------
109108

110109
1. Use present tense and imperative mood when writing commit messages. For example, ``Add new feature`` instead of ``Added new feature``.
111110
2. Reference issues or pull requests outside of the first line.
112111
a. Please use the shorthand ``#123`` and not the full URL.
113-
3. Commits that need to skip the CI workflows must be prefixed with ``[skip ci]``.
112+
3. Commits that need to skip the CI workflows must be prefixed with ``[skip ci]``.

docs/dev-guide/intro.rst

+31-15
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ Before you get started, please ensure you have the following installed:
1111

1212
- `Git <https://git-scm.com>`_
1313
- `Python 3 <https://python.org>`_
14-
- `Poetry <https://python-poetry.org>`_
1514
- `Docker <https://docker.com>`_
16-
- Discord Account + App
15+
- Discord Account + `App <https://discordpy.readthedocs.io/en/stable/discord.html>`_
1716

1817
If you are using Linux, the following dependencies will need to be installed:
1918

@@ -41,35 +40,52 @@ Setup
4140
**Rodhaj only supports Python 3.9 or higher**
4241

4342
.. important::
44-
Ensure that you are in the root of the repo throughout this process
45-
and have the database running
43+
- Ensure that you are in the root of the repo throughout this process and have the database running
44+
45+
- Rodhaj also supports Poetry, but for simplicity, virtualenvs are demonstrated here instead
4646

4747
1. Fork and clone the repo
4848

49-
2. Install dependencies and set up pre-commits
49+
2. Create an virtualenv
50+
51+
.. code-block:: bash
52+
53+
python3 -m venv rodhaj
54+
55+
3. Activate the virtualenv
56+
57+
.. code-block:: bash
58+
59+
# Linux/MacOS
60+
$ source rodhaj/bin/activate
61+
62+
# Windows
63+
$ rodhaj/Scripts/activate.bat
64+
65+
4. Install dependencies and set up pre-commit hooks
5066

5167
.. code-block:: bash
5268
53-
poetry install \
54-
&& poetry run pre-commit install
69+
pip install -r requirements-dev.txt \
70+
&& pre-commit install
5571
56-
3. Copy over the ``config-example.yml`` template over to the ``bot`` directory. Modify the values as appropriate.
72+
5. Copy over the ``config-example.yml`` template over to the ``bot`` directory. Modify the values as appropriate.
5773

5874
.. code-block:: bash
5975
6076
cp config-example.yml bot/config.yml
6177
62-
4. Run the SQL migrations
78+
6. Run the SQL migrations
6379

6480
.. code-block:: bash
6581
66-
poetry run python bot/migrations.py init
82+
python3 bot/migrations.py init
6783
68-
5. In order to demonstrate, you can run the bot to test everything out
84+
7. In order to demonstrate, you can run the bot to test everything out
6985

7086
.. code-block:: bash
7187
72-
poetry run python bot/launcher.py
88+
python3 bot/launcher.py
7389
7490
Database
7591
--------
@@ -93,11 +109,11 @@ Using Docker
93109
If you decide to use Docker to run the local PostgreSQL server, then a
94110
pre-built Docker Compose file is provided. Setup instructions are as follows:
95111

96-
1. Copy ``envs/docker.env`` to ``docker-compose.env`` within the root of the repo. Modify as appropriate.
112+
1. Copy ``envs/docker.env`` to ``.env`` within the root of the repo. Modify as appropriate.
97113

98114
.. code-block:: bash
99115
100-
cp envs/docker.env docker-compose.env
116+
cp envs/docker.env .env
101117
102118
2. Run the following command to start the PostgreSQL server
103119

@@ -124,4 +140,4 @@ valuable insight. This exporter can be enabled by setting the
124140
Prometheus client libraries are listed within the
125141
``requirements.txt`` file. By default, these libraries
126142
should be installed, but disabling the exporter will not
127-
affect the usage of these libraries.
143+
affect the usage of these libraries.

docs/user-guide/features.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ production environments.
6565
.. note::
6666

6767
Disabling this extension will have no effect
68-
on the bot itself.
68+
on the bot itself.

requirements-dev.txt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-r requirements.txt
2+
3+
# Develoment
4+
pre-commit>=3.7.1,<4
5+
pyright>=1.1.363,<2
6+
ruff>=0.4.4,<1
7+
tox>=4.15.0,<5
8+
9+
# Docs
10+
sphinx>=7.3.7,<8
11+
sphinx-autobuild>=2024.4.16,<2025
12+
sphinx-copybutton>=0.5.2,<1
13+
furo>=2024.5.6,<2025

0 commit comments

Comments
 (0)