open-contracting / credere-backend

A tool that facilitates the participation of Micro, Small, and Medium businesses (MSMEs) in the Colombian public procurement market.
https://credere.readthedocs.io
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

feat: add event_log table and logic to replace logging skipped awards… #279

Closed yolile closed 4 months ago

yolile commented 4 months ago

… into sentry

closes #182 closes #188

coveralls commented 4 months ago

Pull Request Test Coverage Report for Build 8530014960

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
app/commands.py 3 4 75.0%
app/util.py 6 7 85.71%
app/db.py 1 3 33.33%
app/exceptions.py 1 5 20.0%
app/sources/colombia.py 2 6 33.33%
<!-- Total: 26 38 68.42% -->
Files with Coverage Reduction New Missed Lines %
app/db.py 2 83.33%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 8509635245: -0.3%
Covered Lines: 2023
Relevant Lines: 2334

💛 - Coveralls
yolile commented 4 months ago

@jpmckinney I made data nullable because there are cases where there is no data to record, for example when no awards were found.

jpmckinney commented 4 months ago

@jpmckinney I made data nullable because there are cases where there is no data to record, for example when no awards were found.

Better to make the default {} than to make the field have two types (dict and None), because then there are two values for "empty" – {} and None. https://ocp-software-handbook.readthedocs.io/en/latest/services/postgresql.html#define-tables

jpmckinney commented 4 months ago

I updated the table definition in line with https://ocp-software-handbook.readthedocs.io/en/latest/services/postgresql.html#define-tables

You'll need to regenerate the migration.

I added a commit that deletes log messages originally added in https://github.com/open-contracting/credere-backend/commit/9997c203f0b549f570d90740c56cf91c740d8ada#diff-8fef11f73f0f34d2dab457f635fcd5a9c5f224bc9f12009edf4dc68146815bf2R68-R75

jpmckinney commented 4 months ago

Approved assuming you'll regenerate the migration.