GitXplorerGitXplorer
f

donors_registry

public
5 stars
6 forks
6 issues

Commits

List of commits on branch master.
Unverified
072b69d13cfd1d5faa6a3919fea8f0a4c61ff4e1

Deps update

ffrenzymadness committed 5 months ago
Unverified
ee17e358fd05ddea8cc0ad6df5ae17154ea6b414

Add command for importing e-mails from CVS to notes

ffrenzymadness committed 5 months ago
Unverified
a5ce953fd2b013395bda7bcec36ce61ef71dbd80

If note contains e-mail, show it as a link in details

ffrenzymadness committed 5 months ago
Unverified
e7b3334915983f717085c875db048b757c283f80

Update dependencies

ffrenzymadness committed 8 months ago
Unverified
29d1a68b5c17bf5005f406ff9b25cd940fb9df46

Migration renaming some donation centers

ffrenzymadness committed a year ago
Unverified
ae54a8ed72376a0a15dc35cbd722f964ca5c9ad7

Update name of the file exported by Datatables

ffrenzymadness committed a year ago

README

The README file for this repository.

donors_registry

Registry of blood donors for Czech Red Cross in Frýdek-Místek.

Instalation

  1. Create and activate a new virtual environment
  2. Install all development dependencies via pip install -r requirements/dev.txt
  3. Prepare a new database and apply all existing migrations via flask db upgrade
  4. Add a user account via flask create-user <email> <password>
  5. You can install anonymized test data via flask install-test-data (needs empty database and with all migrations applied)
  6. run the app with FLASK_DEBUG=1 flask run or on Windows with set FLASK_DEBUG=1 and then flask run

Database

SQLite database we are currently using has very limited support for ALTER TABLE… SQL queries so we need to modify the historical migrations from time to time. If you have any issue with the database, try removing the .sqlite file first and then repeat the last four steps from above.

Our plan is to switch to a more robust database system when switching to production use.

Testing

Tests use pytest and are configured via tox. To run all of them, simply install and execute tox.

If you want to prevent tests failing because of linter issues, you can use pre-commit which automatically runs linters before every commit (this doesn't work on Windows)

  1. To activate it install pre-commit using pip install pre-commit or you can install all extra requirements via pip install -r requirements/extra.txt.
  2. Then run pre-commit install
  3. After that linters should run before every commit.

Code coverage is measured by coverage Python package. It's automatically measured for the last tox environment with a report at the very end of the output. If you want to run it manually, use coverage run -m pytest and then coverage report to see the results in the command line or coverage html which produces folder htmlcov with more interactive results.