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

Refactor: statistics #333

Closed jpmckinney closed 4 weeks ago

jpmckinney commented 1 month ago

fixes #331 e41c54e fixes #334 91063d8 fixes #335 c4239a0 fixes #336 3128206 fixes #337 e1f9ed8 fixes #338 437e8c3 fixes #339 1cc4542

Values changed in output:

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 10376652889

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
app/utils/statistics.py 37 44 84.09%
<!-- Total: 37 44 84.09% -->
Files with Coverage Reduction New Missed Lines %
app/utils/statistics.py 1 86.67%
app/commands.py 3 93.89%
<!-- Total: 4 -->
Totals Coverage Status
Change from base Build 10374713403: -0.5%
Covered Lines: 1871
Relevant Lines: 2177

💛 - Coveralls
yolile commented 4 weeks ago

I think we should also change https://github.com/open-contracting/credere-backend/blob/main/app/routers/statistics.py to not check the database and calculate and return the statistics instead

And then we could delete the update_statistics commands and Statistics table...

jpmckinney commented 4 weeks ago

I think we should also change https://github.com/open-contracting/credere-backend/blob/main/app/routers/statistics.py to not check the database and calculate and return the statistics instead

And then we could delete the update_statistics commands and Statistics table...

Sure, but let's do that in another PR, this one is a big changeset already.

jpmckinney commented 4 weeks ago

delete the ... Statistics table

The table does keep a history of statistics as of each date – not sure if this was a requirement.

jpmckinney commented 4 weeks ago

Okay to merge on my end.