Scan-o-Matic / scanomatic

Scanomatic
GNU General Public License v3.0
10 stars 4 forks source link

Database set-up #299

Closed gdetrez closed 6 years ago

gdetrez commented 6 years ago

This is a partial implementation of a persistence layer using PostgreSQL. The idea is to discuss the approach before I set-up all the tables and change the corresponding code. What's included:

Some notes:

codecov-io commented 6 years ago

Codecov Report

Merging #299 into master will increase coverage by 0.28%. The diff coverage is 91.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #299      +/-   ##
==========================================
+ Coverage   37.39%   37.67%   +0.28%     
==========================================
  Files         159      165       +6     
  Lines       16215    16311      +96     
  Branches     2902     2905       +3     
==========================================
+ Hits         6063     6145      +82     
- Misses       9732     9744      +12     
- Partials      420      422       +2
Impacted Files Coverage Δ
scanomatic/ui_server/scanners_api.py 98.52% <100%> (+0.19%) :arrow_up:
scanomatic/data/tables.py 100% <100%> (ø)
scanomatic/io/scanning_store.py 95.77% <100%> (-1.6%) :arrow_down:
scanomatic/ui_server/scan_jobs_api.py 92.59% <100%> (+0.28%) :arrow_up:
scanomatic/ui_server/database.py 100% <100%> (ø)
scanomatic/scanning/update_scanner_status.py 95% <100%> (-5%) :arrow_down:
scanomatic/data/scannerstore.py 100% <100%> (ø)
scanomatic/ui_server/ui_server.py 35.53% <50%> (+0.49%) :arrow_up:
scanomatic/data/migrations/env.py 71.42% <71.42%> (ø)
scanomatic/data/util.py 75% <75%> (ø)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0d7601e...5010739. Read the comment docs.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.2%) to 43.006% when pulling 5010739fd48b214c199994e06bf07f5599959d76 on gdetrez:database into 0d7601e08b1876358aed8addc70bb500c5cc7792 on Scan-o-Matic:master.

gdetrez commented 6 years ago

@local-minimum @dindinoh : I made a slight change to the way the database is configured: using multiple environment variable (PGHOST, PGUSER...) instead of one and allowing us to store the database password in /etc/scanomatic/pgpass.