Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solving "summarize" issue #22

Open
alice-dub opened this issue Dec 11, 2017 · 5 comments
Open

Solving "summarize" issue #22

alice-dub opened this issue Dec 11, 2017 · 5 comments

Comments

@alice-dub
Copy link
Contributor

When I ran the main script with the "summarize" arguments two issues occured:

  • the script could not apply the pv function to external_cost because it was a float and not a serie (I changed the definition of the external cost, from self_emission and not self_emission[Total] (line 108)

  • line 145, total_production is a float and not a serie, I had to change the round method to a round function.

98479b9

@MinhHaDuong
Copy link
Owner

Thanks for opening the ticket. I am a bit confused by the title and by what "the main script" means, but that's normal. The first thing that someone does when reading a bug reports is to try to reproduce the bug. So please include the exact command in the bug report. Here are other tips:

https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines
http://www.softwaretestinghelp.com/how-to-write-good-bug-report/
https://musescore.org/en/developers-handbook/how-write-good-bug-report-step-step-instructions

@alice-dub
Copy link
Contributor Author

alice-dub commented Dec 11, 2017

Sorry for the imprecision:
I run the Run.py script with "summarize" argument (python Run.py "summarize")

The first error raised is :

  File "Run.py", line 56, in pv
    return present_value(variable, parameter.discount_rate).sum()	
AttributeError: 'float' object has no attribute 'sum'

The second error raised is:

  File "Run.py", line 145, in total
    d["Power produced"] = [(self.total_production * GWh / TWh).round(), "Twh"]
AttributeError: 'float' object has no attribute 'round'

@MinhHaDuong
Copy link
Owner

MinhHaDuong commented Dec 12, 2017

Je pense pas que les quotes autour de summarize sont nécessaires.

python3 Run.py summarize fonctionne chez moi.

Est-ce que l'erreur est capturée par make test ?

Il faut que toutes les bugs identifiés soient reproductibles et capturés par le test, afin de s'assurer qu'ils ne reviennent pas !

@alice-dub
Copy link
Contributor Author

Bonjour,

Quelles versions de librairies utilisez vous ?
Les bugs détaillés dans l'issue apparaissent lorsque j'utilise la dernière version du package Anaconda.
En installant les librairies directement avec pip, votre version marche, ce qui m'amène en penser que c'est un problème amené par une vieille version de librairie (pandas?) utilisée par Anaconda.

@MinhHaDuong
Copy link
Owner

Dispensez vous des formules de politesses.

Répondez à la question avant d'en poser une autre svp

Normalement c'est à celui qui ouvre le bug de lister ses versions.
Pandas 19.2.5
Numpy 1.12.1
SALib 1.1.2
statsmodels 0.8.0
pytest_regtest 0.15.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants