From 13701841b296b17f77b232b24d986b4b6a64e8ce Mon Sep 17 00:00:00 2001 From: Jason DeBacker Date: Sun, 3 Aug 2025 11:47:57 -0400 Subject: [PATCH 1/3] remove initial_guess_wSS from default params --- ogzaf/ogzaf_default_parameters.json | 1 - ogzaf/ogzaf_default_parameters_multisector.json | 1 - 2 files changed, 2 deletions(-) diff --git a/ogzaf/ogzaf_default_parameters.json b/ogzaf/ogzaf_default_parameters.json index 3bc98e7..214dbb4 100644 --- a/ogzaf/ogzaf_default_parameters.json +++ b/ogzaf/ogzaf_default_parameters.json @@ -2440,7 +2440,6 @@ "RC_TPI": 0.001, "reform_use_baseline_solution": true, "initial_guess_r_SS": 0.04, - "initial_guess_w_SS": 1.1617041226785383, "initial_guess_TR_SS": 0.042, "initial_guess_factor_SS": 6766.0, "omega": [ diff --git a/ogzaf/ogzaf_default_parameters_multisector.json b/ogzaf/ogzaf_default_parameters_multisector.json index 431515a..da03d49 100644 --- a/ogzaf/ogzaf_default_parameters_multisector.json +++ b/ogzaf/ogzaf_default_parameters_multisector.json @@ -2490,7 +2490,6 @@ "RC_TPI": 0.001, "reform_use_baseline_solution": true, "initial_guess_r_SS": 0.04, - "initial_guess_w_SS": 1.1617041226785383, "initial_guess_TR_SS": 0.042, "initial_guess_factor_SS": 6766.0, "omega": [ From 0c1b51896b4b0b3ca152a8fbbc13e0c88461bafe Mon Sep 17 00:00:00 2001 From: Jason DeBacker Date: Fri, 15 Aug 2025 21:01:12 -0400 Subject: [PATCH 2/3] updates for python 313 --- .github/workflows/build_and_test.yml | 2 +- .github/workflows/deploy_docs.yml | 2 +- .github/workflows/docs_check.yml | 2 +- .github/workflows/publish_to_pypi.yml | 2 +- CHANGELOG.md | 8 ++++++++ README.md | 4 ++-- docs/book/content/intro/intro.md | 2 +- environment.yml | 5 ++--- ogzaf/__init__.py | 2 +- pyproject.toml | 2 +- setup.py | 9 ++++----- 11 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 6586c0e..007b567 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.11", "3.12"] + python-version: ["3.12", "3.13"] steps: - name: Checkout diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 36bad8e..1fe4a98 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -28,7 +28,7 @@ jobs: miniconda-version: "latest" activate-environment: ogzaf-dev environment-file: environment.yml - python-version: "3.12" + python-version: "3.13" auto-activate-base: false - name: Build # Build Jupyter Book diff --git a/.github/workflows/docs_check.yml b/.github/workflows/docs_check.yml index 1def0df..a91fc99 100644 --- a/.github/workflows/docs_check.yml +++ b/.github/workflows/docs_check.yml @@ -26,7 +26,7 @@ jobs: miniconda-version: "latest" activate-environment: ogzaf-dev environment-file: environment.yml - python-version: "3.12" + python-version: "3.13" auto-activate-base: false - name: Build # Build Jupyter Book diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml index f070f89..ae20b05 100644 --- a/.github/workflows/publish_to_pypi.yml +++ b/.github/workflows/publish_to_pypi.yml @@ -16,7 +16,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: "3.12" + python-version: "3.13" - name: Build package shell: bash -l {0} run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 1da85fd..648a451 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.0.9] - 2025-08-15 21:00:00 + +### Added + +- Updates for Python 3.13 compatibility +- Removes the deprecated `initial_guess_w_SS` parameter from the default parameters file + ## [0.0.8] - 2025-04-28 12:00:00 ### Added @@ -81,6 +88,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - This version is a pre-release alpha. The example run script OG-ZAF/examples/run_og_zaf.py runs, but the model is not currently calibrated to represent the South African economy and population. +[0.0.9]: https://github.com/EAPD-DRB/OG-ZAF/compare/v0.0.8...v0.0.9 [0.0.8]: https://github.com/EAPD-DRB/OG-ZAF/compare/v0.0.7...v0.0.8 [0.0.7]: https://github.com/EAPD-DRB/OG-ZAF/compare/v0.0.6...v0.0.7 [0.0.6]: https://github.com/EAPD-DRB/OG-ZAF/compare/v0.0.5...v0.0.6 diff --git a/README.md b/README.md index 4971ba8..c5db21a 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ | | | | --- | --- | -| Org | [![United Nations DESA](https://img.shields.io/badge/United%20Nations%20DESA-blue)](https://www.un.org/en/desa) [![PSL cataloged](https://img.shields.io/badge/PSL-cataloged-a0a0a0.svg)](https://www.PSLmodels.org) [![OS License: CC0-1.0](https://img.shields.io/badge/OS%20License-CC0%201.0-yellow)](https://github.com/EAPD-DRB/OG-ZAF/blob/main/LICENSE) | -| Package | [![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3116/) [![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3129/) [![PyPI Latest Release](https://img.shields.io/pypi/v/ogzaf.svg)](https://pypi.org/project/ogzaf/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ogzaf.svg?label=PyPI%20downloads)](https://pypi.org/project/ogzaf/) | +| Org | [![United Nations DESA](https://img.shields.io/badge/United%20Nations%20DESA-blue)](https://www.un.org/en/desa) [![PSL cataloged](https://img.shields.io/badge/PSL-cataloged-a0a0a0.svg)](https://www.PSLmodels.org) [![OS License: C[![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3129/)C0-1.0](https://img.shields.io/badge/OS%20License-CC0%201.0-yellow)](https://github.com/EAPD-DRB/OG-ZAF/blob/main/LICENSE) | +| Package | [![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3129/) [![Python 3.13](https://img.shields.io/badge/python-3.13-blue.svg)](https://www.python.org/downloads/release/python-3137/) [![PyPI Latest Release](https://img.shields.io/pypi/v/ogzaf.svg)](https://pypi.org/project/ogzaf/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ogzaf.svg?label=PyPI%20downloads)](https://pypi.org/project/ogzaf/) | | Testing | ![example event parameter](https://github.com/EAPD-DRB/OG-ZAF/actions/workflows/build_and_test.yml/badge.svg?branch=main) ![example event parameter](https://github.com/EAPD-DRB/OG-ZAF/actions/workflows/deploy_docs.yml/badge.svg?branch=main) ![example event parameter](https://github.com/EAPD-DRB/OG-ZAF/actions/workflows/check_format.yml/badge.svg?branch=main) [![Codecov](https://codecov.io/gh/EAPD-DRB/OG-ZAF/branch/main/graph/badge.svg)](https://codecov.io/gh/EAPD-DRB/OG-ZAF) | OG-ZAF is an overlapping-generations (OG) model that allows for dynamic general equilibrium analysis of fiscal policy for South Africa. OG-ZAF is built on the OG-Core framework. The model output includes changes in macroeconomic aggregates (GDP, investment, consumption), wages, interest rates, and the stream of tax revenues over time. Regularly updated documentation of the model theory--its output, and solution method--and the Python API is available at https://pslmodels.github.io/OG-Core and documentation of the specific South African calibration of the model is available at https://eapd-drb.github.io/OG-ZAF. diff --git a/docs/book/content/intro/intro.md b/docs/book/content/intro/intro.md index 68bb614..94e30ba 100644 --- a/docs/book/content/intro/intro.md +++ b/docs/book/content/intro/intro.md @@ -4,7 +4,7 @@ | | | | --- | --- | | Org | [![United Nations DESA](https://img.shields.io/badge/United%20Nations%20DESA-blue)](https://www.un.org/en/desa) [![PSL cataloged](https://img.shields.io/badge/PSL-cataloged-a0a0a0.svg)](https://www.PSLmodels.org) [![OS License: CC0-1.0](https://img.shields.io/badge/OS%20License-CC0%201.0-yellow)](https://github.com/EAPD-DRB/OG-ZAF/blob/main/LICENSE) | -| Package | [![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-31111/) [![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3129/) [![PyPI Latest Release](https://img.shields.io/pypi/v/ogzaf.svg)](https://pypi.org/project/ogzaf/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ogzaf.svg?label=PyPI%20downloads)](https://pypi.org/project/ogzaf/) | +| Package | [![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3129/) [![Python 3.13](https://img.shields.io/badge/python-3.13-blue.svg)](https://www.python.org/downloads/release/python-3137/) [![PyPI Latest Release](https://img.shields.io/pypi/v/ogzaf.svg)](https://pypi.org/project/ogzaf/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ogzaf.svg?label=PyPI%20downloads)](https://pypi.org/project/ogzaf/) | | Testing | ![example event parameter](https://github.com/EAPD-DRB/OG-ZAF/actions/workflows/build_and_test.yml/badge.svg?branch=main) ![example event parameter](https://github.com/EAPD-DRB/OG-ZAF/actions/workflows/deploy_docs.yml/badge.svg?branch=main) ![example event parameter](https://github.com/EAPD-DRB/OG-ZAF/actions/workflows/check_format.yml/badge.svg?branch=main) [![Codecov](https://codecov.io/gh/EAPD-DRB/OG-ZAF/branch/main/graph/badge.svg)](https://codecov.io/gh/EAPD-DRB/OG-ZAF) | [`OG-ZAF`](https://github.com/EAPD-DRB/OG-ZAF) is a package that provides code and data to calibrate an overlapping-generations (OG) model to the economy of South Africa (ZAF), the code of which is hosted on GitHub at https://github.com/EAPD-DRB/OG-ZAF. `OG-ZAF` uses as a dependency the [`OG-Core`](https://pslmodels.github.io/OG-Core/) package, which contains the core theory and logic of a general OG model. The `OG-ZAF` calibration package and the `OG-Core` theory and logic make the model that allows for dynamic general equilibrium analysis of federal fiscal policy in South Africa. The model output focuses on changes in macroeconomic aggregates (GDP, investment, consumption), wages, interest rates, and the stream of tax revenues over time. This documentation of the `OG-ZAF` package contains the following major sections, which are regularly updated. diff --git a/environment.yml b/environment.yml index cd90428..dcf12c4 100644 --- a/environment.yml +++ b/environment.yml @@ -2,7 +2,7 @@ name: ogzaf-dev channels: - conda-forge dependencies: -- python>=3.7.7, <3.13 +- python>3.11, <3.14 - numpy - setuptools - wheel @@ -13,8 +13,7 @@ dependencies: - dask>=2.30.0 - dask-core>=2.30.0 - distributed>=2.30.1 -- marshmallow<4.0.0 -- paramtools>=0.15.0 +- paramtools>=0.20.0 - sphinx>=3.5.4 - sphinx-book-theme>=0.1.3 - sphinx-argparse diff --git a/ogzaf/__init__.py b/ogzaf/__init__.py index 694f116..3c1b6a3 100644 --- a/ogzaf/__init__.py +++ b/ogzaf/__init__.py @@ -8,4 +8,4 @@ from ogzaf.macro_params import * from ogzaf.utils import * -__version__ = "0.0.8" +__version__ = "0.0.9" diff --git a/pyproject.toml b/pyproject.toml index e033eb0..bd1d328 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,5 +11,5 @@ build-backend = "setuptools.build_meta" [tool.black] line-length = 79 -target-version = ["py311", "py312"] +target-version = ["py312", "py313"] include = '\.pyi?$' diff --git a/setup.py b/setup.py index 168a565..a868bad 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="ogzaf", - version="0.0.8", + version="0.0.9", author="Marcelo LaFleur, Richard W. Evans, and Jason DeBacker", license="CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", description="South Africa Calibration for OG-Core", @@ -26,7 +26,7 @@ ] }, include_packages=True, - python_requires=">=3.7.7, <3.13", + python_requires=">3.11, <3.14", install_requires=[ "numpy", "psutil", @@ -35,8 +35,7 @@ "matplotlib", "dask>=2.30.0", "distributed>=2.30.1", - "marshmallow<4.0.0", - "paramtools>=0.15.0", + "paramtools>=0.20.0", "requests", "pandas-datareader", "xlwt", @@ -55,8 +54,8 @@ "License :: OSI Approved :: Common Public License", "Operating System :: POSIX", "Programming Language :: Python", - "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Software Development :: Libraries :: Python Modules", ], From 32bd17bc9b8f3d2919f76537424f6c04101752bd Mon Sep 17 00:00:00 2001 From: Jason DeBacker Date: Mon, 8 Sep 2025 15:11:40 -0400 Subject: [PATCH 3/3] remove replacement_rate_adjust that conflicts with OG-Core --- ogzaf/ogzaf_default_parameters.json | 3 --- ogzaf/ogzaf_default_parameters_multisector.json | 3 --- 2 files changed, 6 deletions(-) diff --git a/ogzaf/ogzaf_default_parameters.json b/ogzaf/ogzaf_default_parameters.json index 214dbb4..497db95 100644 --- a/ogzaf/ogzaf_default_parameters.json +++ b/ogzaf/ogzaf_default_parameters.json @@ -2401,9 +2401,6 @@ "PIA_rate_bkt_3": 0.0, "PIA_maxpayment": 0.0, "PIA_minpayment": 0.0, - "replacement_rate_adjust": [ - 1.0 - ], "budget_balance": false, "baseline_spending": false, "start_year": 2025, diff --git a/ogzaf/ogzaf_default_parameters_multisector.json b/ogzaf/ogzaf_default_parameters_multisector.json index da03d49..fdb09f0 100644 --- a/ogzaf/ogzaf_default_parameters_multisector.json +++ b/ogzaf/ogzaf_default_parameters_multisector.json @@ -2451,9 +2451,6 @@ "PIA_rate_bkt_3": 0.0, "PIA_maxpayment": 0.0, "PIA_minpayment": 0.0, - "replacement_rate_adjust": [ - 1.0 - ], "budget_balance": false, "baseline_spending": false, "start_year": 2025,