Post supabase database events to a Lemmy instance.
GNU Affero General Public License 3.
- python3: source code.
- supabase: source code.
- pythorhead: source code.
- typing-extension: source code.
- sqlalchemy: source code.
- sqlalchemy-utils: source code
- commitizen: source code.
- mypy: source code.
- poetry: source code
- pre-commit: source code.
- pydocstyle: source code.
- pylint: source code.
- ruff source code
- taskipy: source code.
Note: depending of the OS, you should use or a Script or a bin directory.
-
Clone the rep as stated
-
Create a virtual environment environment and install poetry in it with pip:
cd apc-lemmy-bot python -m venv .venv .venv/bin/pip install poetry -
We will use that
venvfor development and update the dependencies and the build system:.venv/bin/poetry install --no-root -
We have defined in our pyproject 3 groups:
- The main dependencies, needed to run
apc-lemmy-bot, and installed in step 3. - The dev dependencies, useful utilities to build and maintain the package, and installed in step 3.
- an optional IDE dependencies for
spyder. SOme times they are not autoupload with poetry, ig you are stuck with this problem, you can use:.venv/bin/pip install spyder
- The main dependencies, needed to run
-
Install the precommit hooks:
.venv/bin/poetry run pre-commit install .venv/bin/poetry run pre-commit install-hooks
- Create a new branch for the development:
git branch dev git switch dev - Optimize/modify/test changes.
- Add changes and commit them
git add [files] .venv/bin/poetry run cz commit - If you want to add this change to the changelog, generate it:
.venv/bin/poetry run cz changelog - Merge the branch in main and, later, delete the development branch (see points 2 and 3 of the next section).
It will generate the changelog and create the tag.
- Test this order and modify options ( remember to remove
--dry-runwhen it's ok):.venv/bin/poetry run cz bump -cc --dry-run - Create a pull request and get it merged with main.
You can use the CLI to do it, if you are working in the branch
dev, you can do:git switch main git merge dev git push - Build the distribution:
Note: Use
.venv/bin/poetry run task buildbuild-allto build also the html pages. - Create the release and tag it. The order will add the dist files and the
changelog to the gitlab distribution:
.venv/bin/poetry run task release