Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

Core package for my personal website - still in progress

Notifications You must be signed in to change notification settings

HanaPoulpe/hanaburtinnetcore

Repository files navigation

Queenbees

python django python-tests js-tests CodeQL

Queenbees is a CMS with django backend and react front end. It's a personal project I want to use on multiple website projects, so it's definitely over-engineered. I use it also as an experimental project.

Install and run

Prepare your devdesk

Prerequisites

TODO: Update tests to use docker PostgreSQL container

  • PostgreSQL server installed
  • User with CREATEDB permission and access to PostgreSQL socket

Setup PostgreSQL role:

echo "CREATE USER $(whoami) WITH CREATEDB;" | psql -U postgres

Install dependencies

# Install poetry
pip install poetry

# Install NVM and Node
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash \
&& source $HOME/.nvm/nvm.sh \
&& nvm install 20.9.0

# Install dependencies
cd src
poetry install
poetry run install-frontend-dependencies --test

Activate virtual environment

poetry shell

Configure local environment

cp src/.env.example src/.env
  • Configure relevant API Keys

Run the server locally

Start the server with docker compose

poetry run docker-start

Stop docker compose

poetry run docker-stop

Run django migrations

poetry run docker-migrate

Full django build

poetry run docker-build

Create super user

poetry run createsuperuser

Useful commands

Linters

All backend linters:

poetry run python-linters

isort: Sort imports

poetry run python-linter-isort

black: Standard python linter

poetry run python-linter-black

import linter: Checks import contracts

poetry run python-import-linter

Typing

poetry run python-type-checker

Frontend linter and type checker:

npm run eslint

Tests

Python tests

Run tests for a specific target

DJANGO_CONFIGURATION=<config> poetry run python-tests <files>

Run all python tests

poetry run python-tests-all

Run unit tests

poetry run python-tests-unit

Run Interface agnostic tests

poetry run python-tests-interface-agnostic

Run backoffice tests

poetry run python-tests-backoffice

Javascript/Typescript tests

poetry run js-tests

About

Core package for my personal website - still in progress

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •