Eawag-AppliedSystemAnalysis / Simstrat

Simstrat - 1D lake model
http://www.eawag.ch/en/department/surf/projects/simstrat/
GNU General Public License v3.0
17 stars 8 forks source link

test dev/progressbar branch #25

Closed d-vanzo closed 4 years ago

d-vanzo commented 5 years ago

for WINDOWS developers... can you build and test the dev/progressbar feature? The building should be smooth and easy using FoBiS as usual if you have Python 2.X, while it should not work with Python 3.X

I cannot test because I do not have a WIN building env... thanks!

f-baerenbold commented 5 years ago

I confirm that compilation does not work under windows with Python 3.6.1. Maybe someone who is working with Python 2 can confirm that it works?

f-baerenbold commented 5 years ago

The problem is linked to FoBiS (which is currently used as a build system) encoding issues under windows. I changed the encoding in FoBiS and I am now able to successfully compile forbear. However, I would like to wait with merging this branch into the master until the changes are officially integrated into FoBiS.

d-vanzo commented 5 years ago

I had a look to @Diftin pull request in FoBis repo... the problem is that your modifications are compatible with Python 3.X, but not back compatible with Python 2.X in the present form. (btw FoBiS is designed for Python 2.X)

f-baerenbold commented 5 years ago

Ok thanks. Do you have a suggestion to be compatible with python 2? Or should I just check for the version before specifying the encoding? Then progressbar would only work for python 3.

d-vanzo commented 5 years ago

there are several strategies, as example here.

Or maybe adding something like this in src/main/python/fobis/ParsedFile.py

import sys
def openFile(filename):
    if sys.version_info[0] < 3:   
        return open(filename, 'r')
   else:
        return open(filename, 'r', newline='', encoding='utf8')

and then using openFile in the file... this might work...

d-vanzo commented 4 years ago

@Diftin the fobis module has been updated to version 2.9.7... can you give a try if this solve the issue with Windows compiling? (you have to upgrade the module with pip (or pip3) install FoBiS.py --upgrade

f-baerenbold commented 4 years ago

The updated version does not solve the issue unfortunately.

d-vanzo commented 4 years ago

I just had a look and I'll push a new merge request soon... to zaghi repo

f-baerenbold commented 4 years ago

The merge request seems really similar to what we tried last time (but failed the unittest).

d-vanzo commented 4 years ago

yes, I think was a really stupid missing import sys in the wrong position... let's see if szaghi accepts soon

f-baerenbold commented 4 years ago

Ok true, this was the only change to the previous version that I could see.

From: Davide Vanzo notifications@github.com Sent: Dienstag, 19. November 2019 22:59 To: Eawag-AppliedSystemAnalysis/Simstrat Simstrat@noreply.github.com Cc: Bärenbold, Fabian Fabian.Baerenbold@eawag.ch; Mention mention@noreply.github.com Subject: Re: [Eawag-AppliedSystemAnalysis/Simstrat] test dev/progressbar branch (#25)

yes, I think was a really stupid missing import sys in the wrong position... let's see if szaghi accepts soon

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Eawag-AppliedSystemAnalysis/Simstrat/issues/25?email_source=notifications&email_token=AF55WXKMSX3W7QSVEJKAGFDQUROQPA5CNFSM4GQ7KBS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEP5O2Y#issuecomment-555734891, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AF55WXO4GBDSHGUV4XQOZRDQUROQPANCNFSM4GQ7KBSQ.

f-baerenbold commented 4 years ago

The new FoBiS release is out and the progressbar is now fully functional on the master branch.