diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index f391fa176..7cd1613f8 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -1,5 +1,13 @@ -Next release -============ +.. Next release +.. ============ + +.. All changes +.. ----------- + +.. _v3.5.0: + +v3.5.0 (2022-05-06) +=================== Migration notes --------------- @@ -7,6 +15,12 @@ Migration notes The format of input data files for MACRO calibration has been changed in :pull:`327`. Files compatible with v3.4.0 and earlier will not work with this version and should be updated; see details of the current data file format in the :doc:`documentation `. +:pull:`561` corrected the model internal logic for handling zero values in the :ref:`capacity_factor ` parameter. +Before this change, the GAMS code inserted a ``capacity_factor`` value of 1.0 where such zero values appeared; now, zeros are preserved, so the technologies may be created (``CAP``) but none of their capacity will be usable at the +:math:`(n, t, y^V, y, h)` where zero values appear. +This is consistent with the general concept of a “capacity factor”: for instance, a solar photovoltaic technology for electricity generation may have a non-zero *capacity* with a *capacity factor* of 0 at :math:`h=\text{night}`. +This may cause changes in model output for scenarios where such zero values appear; see :issue:`591` for discussion, including methods to check for and adjust/remove such values. + All changes ----------- diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..fde24a7d1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,115 @@ +[build-system] +requires = ["setuptools", "setuptools-scm"] + +# Replacement for setup.cfg +# +# Support for this section is experimental in setuptools 61–62.1.0. This should +# not be enabled until that support is stable. +# +# [project] +# name = "message_ix" +# description = "the MESSAGEix integrated assessment model" +# authors = [ +# { email = "message_ix@iiasa.ac.at" }, +# { name = "IIASA Energy, Climate, and Environment (ECE) Program" } +# ] +# license = { text = "Apache" } +# readme = { file = "README.md", content-type = "text/markdown" } +# classifiers = [ +# "Development Status :: 5 - Production/Stable", +# "Intended Audience :: Developers", +# "Intended Audience :: Science/Research", +# "License :: OSI Approved :: Apache Software License", +# "Natural Language :: English", +# "Operating System :: OS Independent", +# "Programming Language :: Python", +# "Programming Language :: Python :: 3", +# "Programming Language :: Python :: 3.7", +# "Programming Language :: Python :: 3.8", +# "Programming Language :: Python :: 3.9", +# "Programming Language :: Python :: 3.10", +# "Programming Language :: R", +# "Topic :: Scientific/Engineering", +# "Topic :: Scientific/Engineering :: Information Analysis" +# ] +# dependencies = [ +# "click", +# "ixmp >= 3.5.0", +# "numpy", +# "pandas >= 1.2", +# "PyYAML", +# ] +# dynamic = ["version"] +# +# [project.urls] +# documentation = "https://docs.messageix.org/" +# repository = "http://github.com/iiasa/message_ix" +# +# [tool.setuptools] +# zip-safe = true +# +# [project.optional-dependencies] +# report = ["ixmp[report]"] +# docs = [ +# # Duplicated from above; see pypa/setuptools#3221 +# "ixmp[report]", +# "numpydoc", +# "sphinx >= 4.0", +# "sphinx_rtd_theme", +# "sphinxcontrib-bibtex", +# ] +# tutorial = [ +# "ixmp[report]", +# "jupyter", +# "matplotlib" +# ] +# test = [ +# "ixmp[report]", +# "numpydoc", +# "sphinx >= 4.0", +# "sphinx_rtd_theme", +# "sphinxcontrib-bibtex", +# "jupyter", +# "matplotlib" +# "asyncssh" +# "pint" +# "pyam-iamc >= 0.6" +# "pytest >= 5" +# "pytest-cov" +# "requests" +# ] +# +# [project.scripts] +# ixmp = "message-ix = message_ix.cli:main" + +[tool.isort] +profile = "black" + +[[tool.mypy.overrides]] +# Packages/modules for which no type hints are available. +module = [ + "asyncssh", + "matplotlib.*", + "pandas.*", + "pyam", + "pytest", + "setuptools", + # Indirectly via ixmp; this should be a subset of the list in ixmp's setup.cfg + "dask", + "jpype", + "nbclient", + "nbformat", + "memory_profiler", +] +ignore_missing_imports = true + +[tool.pytest.ini_options] +# Disable faulthandler plugin on Windows to prevent spurious console noise +addopts = """ + --cov=message_ix --cov-report= + -m "not nightly and not rmessageix" + -p no:faulthandler""" +markers = [ + "nightly: Slow-running nightly tests of particular scenarios.", + "rmessageix: test of the message_ix R interface.", +] \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index ce8bf08ab..c9e67f176 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,14 +26,13 @@ classifiers = Topic :: Scientific/Engineering Topic :: Scientific/Engineering :: Information Analysis - [options] packages = message_ix zip_safe = True include_package_data = True install_requires = click - ixmp >= 3.4.0 + ixmp >= 3.5.0 numpy pandas >= 1.2 PyYAML @@ -65,72 +64,15 @@ tests = pytest-cov requests - [options.entry_points] console_scripts = message-ix = message_ix.cli:main -[tool:pytest] -# Disable faulthandler plugin on Windows to prevent spurious console noise -addopts = --cov=message_ix --cov-report= - -m "not nightly and not rmessageix" - -p no:faulthandler -markers = - nightly: Slow-running nightly tests of particular scenarios. - rmessageix: test of the message_ix R interface. - [codecov.run] omit = message_ix/model/* message_ix/tests/test_nightly.py message_ix/testing/nightly.py -[aliases] -test = pytest - -[isort] -force_grid_wrap = 0 -include_trailing_comma = True -line_length = 88 -multi_line_output = 3 -use_parentheses = True - [flake8] max-line-length = 88 - -[mypy] -# Empty section required as of mypy 0.800; -# see https://github.com/python/mypy/issues/9940 - -[mypy-asyncssh.*] -ignore_missing_imports = True -[mypy-matplotlib.*] -ignore_missing_imports = True -[mypy-numpy.*] -ignore_missing_imports = True -[mypy-pandas.*] -ignore_missing_imports = True -[mypy-pint.*] -ignore_missing_imports = True -[mypy-pyam.*] -ignore_missing_imports = True -[mypy-pytest.*] -ignore_missing_imports = True -[mypy-setuptools.*] -ignore_missing_imports = True -[mypy-xarray.*] -ignore_missing_imports = True - -# Indirectly via ixmp; this should be a subset of the list in ixmp's setup.cfg -[mypy-dask.*] -ignore_missing_imports = True -[mypy-jpype.*] -ignore_missing_imports = True -[mypy-nbclient.*] -ignore_missing_imports = True -[mypy-nbformat.*] -ignore_missing_imports = True -[mypy-memory_profiler.*] -ignore_missing_imports = True -[mypy-sparse.*] -ignore_missing_imports = True