modoboa / modoboa-dmarc

A set of tools to use DMARC through Modoboa.
MIT License
15 stars 11 forks source link

fix : previous/next buttons are shifted in time #37

Closed AmazingBeu closed 4 years ago

AmazingBeu commented 5 years ago

Description of the issue/feature this PR addresses: remove iso weeknum conversion and use the provided weeknum to define next/previous week number.

This is due to the "datetime.strptime" function that does not support the ISO weeknum conversion before python 3.6

Current behavior before PR: The previous and next buttons are shifted in time (#35)

Desired behavior after PR is merged: Make buttons work again :)

tonioo commented 5 years ago

@AmazingBeu Looks like your PR fails with Python 3.4...

AmazingBeu commented 5 years ago

Hum... I don't think the problem comes from my PR

The failure seems to come from the setup of the database but I havn't touched that, just the functions of previous/next week buttons of the webui

Can you try running a new build from your master branch to see if this is not due to python dependencies?

tonioo commented 5 years ago

@AmazingBeu Indeed, might be a mysqlclient library version issue. Can you modify the requirements.txt file as follows: https://github.com/modoboa/modoboa-imap-migration/blob/master/test-requirements.txt#L4?

codecov[bot] commented 5 years ago

Codecov Report

Merging #37 into master will increase coverage by 0.52%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #37      +/-   ##
==========================================
+ Coverage   85.12%   85.65%   +0.52%     
==========================================
  Files          19       19              
  Lines         437      474      +37     
==========================================
+ Hits          372      406      +34     
- Misses         65       68       +3     

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 1b1472f...4568c87. Read the comment docs.

AmazingBeu commented 5 years ago

Looks like it works

tonioo commented 5 years ago

@AmazingBeu Yes, but the coverage is not good. Could you please add some unit tests in order to maintain the coverage level?

tonioo commented 4 years ago

@AmazingBeu Would you have time to finish this?

tonioo commented 4 years ago

@AmazingBeu Thank you.