Skip to content

gen-era/canvas

Repository files navigation

Canvas

Canvas Logo

Canvas is a Django-based web application for managing and analyzing chip samples, variants, and generating reports.

Features

  • Chip sample management and analysis
  • Report generation and management
  • Variant analysis and modal viewing
  • CNV (Copy Number Variation) tracking
  • Sample search functionality
  • Interactive sidebar navigation

Prerequisites

  • Docker
  • Docker Compose

Installation

  1. Clone the repository:
git clone [repository-url]
cd canvas
  1. Start the application using Docker Compose:
docker compose up -d

The application will be available at http://localhost:8000 (or your configured port).

To stop the application:

docker compose down

Testing and CI/CD

The project uses GitHub Actions for continuous integration and deployment. On each push to the release branch, the following checks are performed:

Code Quality

  • Black: Ensures consistent code formatting (excluding Django-generated files)
  • isort: Maintains properly sorted imports (excluding Django-generated files)

Django Tests

  • Runs the Django test suite using python manage.py test
  • Tests are executed in a clean environment with each CI run

Docker Build

After all tests pass:

  • Builds the Docker image
  • Pushes to GitHub Container Registry (ghcr.io)
  • Tags with both latest and the commit SHA

To run tests locally:

# Install test dependencies
pip install black isort

# Run formatting checks
black . --check --exclude "migrations/|manage.py|wsgi.py|asgi.py"
isort . --check-only --profile black --skip migrations --skip manage.py --skip wsgi.py --skip asgi.py

# Run Django tests
python manage.py test

Project Structure

  • admin.py - Django admin configurations
  • models.py - Database models
  • views.py - View controllers
  • urls.py - URL routing
  • templates/ - HTML templates
    • components/ - Reusable UI components
    • partials/ - Partial template fragments

Management Commands

The project includes custom management commands:

  • associate_files - For file association management

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •