Skip to content

kangasta/photo-objects

Repository files navigation

Photo Objects

CI Release

Application for storing photos in S3 compatible object-storage. Key features:

  • Automatically scales photos according to different sizes defined in settings.
  • Provides simple grouping and access control for the photos with albums.

Developing

Build containers:

docker compose build

Start or update development environment:

docker compose up -d

Print initial admin password (username of the initial administrator account is admin):

docker compose exec api cat /var/photo_objects/initial_admin_password

Make database migrations (requires development environment to be running):

python3 back/manage.py makemigrations --pythonpath="$(pwd)"

Testing

Static analysis

Check and automatically fix formatting with:

pycodestyle --exclude back/api/settings.py,*/migrations/*.py back photo_objects
autopep8 -aaar --in-place --exclude back/api/settings.py,*/migrations/*.py back photo_objects

Run static analysis with:

pylint back/api photo_objects

Integration tests

Run integration tests (in the api directory) with:

python3 runtests.py

Get test coverage with:

coverage run --branch --source photo_objects runtests.py
coverage report -m

End-to-end tests

Run end-to-end tests with Docker Compose:

docker compose -f docker-compose.test.yaml up --exit-code-from test --build

Run end-to-end tests in interactive mode (in the tests directory):

# Install dependencies
npm ci

# Start test target
docker compose up -d

# Configure credentials
export USERNAME=admin
export PASSWORD=$(docker compose exec api cat /var/photo_objects/initial_admin_password)

# Start test UI
npx playwright test --ui

About

Application for storing photos in S3 compatible object-storage.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors