OSeMOSYS / osemosys2iamc

MIT License
3 stars 11 forks source link

Reporting of Operation Life #37

Closed HauHe closed 7 months ago

HauHe commented 8 months ago

This PR allows to report the IAMC variable Lifetime using the OSeMOSYS parameter OperationalLife. The Operational Life is reported for each year in the Modelling period.

The PR addresses #36

HauHe commented 8 months ago

@willu47 could you have a look at the checks below that are failing? The error messages are somewhat cryptic to me. Should I fix something before merging?

willu47 commented 7 months ago

Hi @HauHe - the checks are failing due to the "linting". Linting checks the formatting of the code is correct. You need to install the pre-commit checks to pass these checks. The easy way to do this is to use tox:

pip install tox
tox -e lint
HauHe commented 7 months ago

Hm, used lint and it changed some dashes from single to double. But there seems to be still some issue.

willu47 commented 7 months ago

The tests are failing because no YEAR.csv file is provided in the tests/fixtures/YEAR.csv path.

HauHe commented 7 months ago

Ok, interesting, so the check sees that I read in YEAR.csv and therefore expects that I have a test including YEAR.csv? Because I didn't write a test including YEAR.csv. Do I need to write a corresponding test?

HauHe commented 7 months ago

Seems I managed to fix it by adding a YEAR.csv file to tests/fixtures and tests/fixtures/trade

HauHe commented 7 months ago

Hi @willu47 , not sure if necessary, but would you like to have a look before merging?