carlesmu / apc-lemmy-bot

Post supabase database events to a Lemmy instance

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

apc-lemmy-bot

Post supabase database events to a Lemmy instance.

License

GNU Affero General Public License 3.

Development

Main dependencies

Development dependencies

Initial clone

Note: depending of the OS, you should use or a Script or a bin directory.

  1. Clone the rep as stated

  2. 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
    
  3. We will use that venv for development and update the dependencies and the build system:

    .venv/bin/poetry install --no-root
    
  4. We have definied 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 mantain 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
  5. Install the precommit hooks:

    .venv/bin/poetry run pre-commit install
    .venv/bin/poetry run pre-commit install-hooks
    

Development cycle

  1. Create a new branch for the development:
    git branch dev
    git switch dev
    
  2. Optimize/modify/test chanches.
  3. Add changes and commit them
    git add [files]
    .venv/bin/poetry run cz commit
    
  4. If you want to add this change to the changelog, generate it:
    .venv/bin/poetry run cz changelog
    
  5. Merge the branch in main and, later, delete the development branch.

Release a new version

It will generate the changelog and create the tag.

  1. Test this order and modify options ( remember to remove --dry-run when it's ok):
    .venv/bin/poetry run cz bump -cc --dry-run
    
  2. 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
    
  3. Create the release and tag it, e.g.:v0.1.0. You can use call it from CLI using:
    gh release create v0.1.0 -F CHANGELOG.md --target main
    

About

Post supabase database events to a Lemmy instance

License:GNU Affero General Public License v3.0


Languages

Language:Python 100.0%