OpenEnergyPlatform / oeplatform

Repository for the code of the Open Energy Platform (OEP) website. The OEP provides an interface to the Open Energy Family
http://openenergyplatform.org/
GNU Affero General Public License v3.0
61 stars 19 forks source link

fix open() with encoding, plus pre-commit code quality #1612

Closed wingechr closed 3 months ago

wingechr commented 3 months ago

Some environments do not have utf-8 as default character encoding. Therefore, all open("r") statements need to specify utf-8 as encoding, otherwise an error occurs (just happened on a test server)

I also had to add more changes because of the pre-commit code quality requirements, otherwise I could not commit. @adelmemariani , @jh-RLI please use local pre-commit hooks so that changed filesalways follow the code guidelines.

Cheers, C

jh-RLI commented 3 months ago

Good catch!

I agree. We have started using it but it seems that not everyone has found it easy to use. I will demand it from now on. Could also introduce another ci action

wingechr commented 3 months ago

Nice! Two minor comments for future development:

1. we once agreed on branch names without / only - should be used
   (My bad the contributing.md is not up to date, will update it now)

2. Please always add a entry to the changelog `versions/changelogs/`

yep, sorry. will try to do better :-)