Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
miniconda-version: "latest"
activate-environment: ogcore-dev
environment-file: environment.yml
python-version: "3.12"
python-version: "3.13"
auto-activate-base: false

- name: Build # Build Jupyter Book
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
miniconda-version: "latest"
activate-environment: ogcore-dev
environment-file: environment.yml
python-version: "3.12"
python-version: "3.13"
auto-activate-base: false

- name: Build # Build Jupyter Book
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
- name: Build package
run: make pip-package
- name: Publish a Python distribution to PyPI
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.14.6] - 2025-08-15 14:00:00

### Added

- Removes `initial_guess_w_SS` in `default_parameters.json`
- Updates environment and testing to cover Python 3.13

## [0.14.5] - 2025-07-08 22:00:00

### Added
Expand Down Expand Up @@ -396,6 +403,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Any earlier versions of OG-USA can be found in the [`OG-Core`](https://github.com/PSLmodels/OG-Core) repository [release history](https://github.com/PSLmodels/OG-Core/releases) from [v.0.6.4](https://github.com/PSLmodels/OG-Core/releases/tag/v0.6.4) (Jul. 20, 2021) or earlier.


[0.14.6]: https://github.com/PSLmodels/OG-Core/compare/v0.14.5...v0.14.6
[0.14.5]: https://github.com/PSLmodels/OG-Core/compare/v0.14.4...v0.14.5
[0.14.4]: https://github.com/PSLmodels/OG-Core/compare/v0.14.3...v0.14.4
[0.14.3]: https://github.com/PSLmodels/OG-Core/compare/v0.14.2...v0.14.3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
| | |
| --- | --- |
| Org | [![PSL cataloged](https://img.shields.io/badge/PSL-cataloged-a0a0a0.svg)](https://www.PSLmodels.org) [![OS License: CCO-1.0](https://img.shields.io/badge/OS%20License-CCO%201.0-yellow)](https://github.com/PSLmodels/OG-Core/blob/master/LICENSE) [![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://pslmodels.github.io/OG-Core/) |
| 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/ogcore.svg)](https://pypi.org/project/ogcore/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ogcore.svg?label=PyPI%20downloads)](https://pypi.org/project/ogcore/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) |
| 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/ogcore.svg)](https://pypi.org/project/ogcore/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ogcore.svg?label=PyPI%20downloads)](https://pypi.org/project/ogcore/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) |
| Testing | ![example event parameter](https://github.com/PSLmodels/OG-Core/actions/workflows/build_and_test.yml/badge.svg?branch=master) ![example event parameter](https://github.com/PSLmodels/OG-Core/actions/workflows/deploy_docs.yml/badge.svg?branch=master) ![example event parameter](https://github.com/PSLmodels/OG-Core/actions/workflows/check_black.yml/badge.svg?branch=master) [![Codecov](https://codecov.io/gh/PSLmodels/OG-Core/branch/master/graph/badge.svg)](https://codecov.io/gh/PSLmodels/OG-Core) |


Expand Down
2 changes: 1 addition & 1 deletion docs/book/content/intro/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
| | |
| --- | --- |
| Org | [![PSL cataloged](https://img.shields.io/badge/PSL-cataloged-a0a0a0.svg)](https://www.PSLmodels.org) [![OS License: CCO-1.0](https://img.shields.io/badge/OS%20License-CCO%201.0-yellow)](https://github.com/PSLmodels/OG-Core/blob/master/LICENSE) [![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://pslmodels.github.io/OG-Core/) |
| 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/ogcore.svg)](https://pypi.org/project/ogcore/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ogcore.svg?label=PyPI%20downloads)](https://pypi.org/project/ogcore/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) |
| 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/ogcore.svg)](https://pypi.org/project/ogcore/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ogcore.svg?label=PyPI%20downloads)](https://pypi.org/project/ogcore/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) |
| Testing | ![example event parameter](https://github.com/PSLmodels/OG-Core/actions/workflows/build_and_test.yml/badge.svg?branch=master) ![example event parameter](https://github.com/PSLmodels/OG-Core/actions/workflows/deploy_docs.yml/badge.svg?branch=master) ![example event parameter](https://github.com/PSLmodels/OG-Core/actions/workflows/check_black.yml/badge.svg?branch=master) [![Codecov](https://codecov.io/gh/PSLmodels/OG-Core/branch/master/graph/badge.svg)](https://codecov.io/gh/PSLmodels/OG-Core) |

`OG-Core` is the core logic for a country-agnostic overlapping-generations (OG) model of an economy that allows for dynamic general equilibrium analysis of fiscal policy. The source code is openly available for download or collaboration at the GitHub repository [www.github.com/PSLmodels/OG-Core](https://github.com/PSLmodels/OG-Core), or you can click on the GitHub icon at the top right of this page.
Expand Down
7 changes: 0 additions & 7 deletions docs/book/content/intro/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -851,13 +851,6 @@ _Valid Range:_ min = 0.01 and max = 0.25
_Out-of-Range Action:_ error


#### `initial_guess_w_SS`
_Description:_ Initial guess of w for the SS solution.
_Value Type:_ float
_Valid Range:_ min = 0.01 and max = 5.15
_Out-of-Range Action:_ error


#### `initial_guess_TR_SS`
_Description:_ Initial guess of TR for the SS solution.
_Value Type:_ float
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: ogcore-dev
channels:
- conda-forge
dependencies:
- python>=3.7.7, <3.13
- python>3.11, <3.14
- numpy
- ipython
- setuptools
Expand Down
2 changes: 1 addition & 1 deletion ogcore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
from ogcore.txfunc import *
from ogcore.utils import *

__version__ = "0.14.5"
__version__ = "0.14.6"
18 changes: 0 additions & 18 deletions ogcore/default_parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -4415,24 +4415,6 @@
}
}
},
"initial_guess_w_SS": {
"title": "Initial guess of w for the SS solution",
"description": "Initial guess of w for the SS solution.",
"section_1": "Model Solution Parameters",
"notes": "",
"type": "float",
"value": [
{
"value": 1.1617041226785383
}
],
"validators": {
"range": {
"min": 0.01,
"max": 5.15
}
}
},
"initial_guess_TR_SS": {
"title": "Initial guess of TR for the SS solution",
"description": "Initial guess of TR for the SS solution. This value is in model units and can therefore be any large positive number. We may have to adjust the maximum for this parameter from time to time.",
Expand Down
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="ogcore",
version="0.14.5",
version="0.14.6",
author="Jason DeBacker and Richard W. Evans",
license="CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
description="A general equilibrium overlapping generations model for fiscal policy analysis",
Expand All @@ -25,7 +25,7 @@
]
},
include_packages=True,
python_requires=">=3.7.7, <3.13",
python_requires=">=3.11, <3.14",
install_requires=[
"numpy",
"scipy>=1.7.1",
Expand All @@ -34,7 +34,7 @@
"matplotlib",
"dask>=2.30.0",
"distributed>=2.30.1",
"paramtools>=0.15.0",
"paramtools>=0.20.0",
"requests",
"pip",
"pygam",
Expand All @@ -47,8 +47,9 @@
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
],
tests_require=["pytest"],
Expand Down
1 change: 0 additions & 1 deletion tests/test_SS.py
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,6 @@ def test_euler_equation_solver(input_tuple, ubi_j, p, expected):
"initial_guess_TR_SS": 0.04,
# "initial_guess_r_SS": 0.033092316727737416,
# "initial_guess_TR_SS": 0.06323878350496814,
# "initial_guess_w_SS": 1.3320748594894016,
"initial_guess_factor_SS": 111267.90426318572,
}
filename4 = "run_SS_baseline_small_open_use_zeta.pkl"
Expand Down
Binary file modified tests/test_io_data/model_params_baseline.pkl
Binary file not shown.
Binary file modified tests/test_io_data/model_params_baseline_v312.pkl
Binary file not shown.
Binary file modified tests/test_io_data/model_params_reform.pkl
Binary file not shown.
Binary file added tests/test_io_data/model_params_reform_v312.pkl
Binary file not shown.
32 changes: 18 additions & 14 deletions tests/test_output_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,42 +19,46 @@
base_tpi = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "TPI_vars_baseline.pkl")
)
if sys.version_info[1] < 11:
base_params = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "model_params_baseline.pkl")
)
elif sys.version_info[1] == 11:
if sys.version_info[1] == 11:
base_params = utils.safe_read_pickle(
os.path.join(
CUR_PATH, "test_io_data", "model_params_baseline_v311.pkl"
)
)
else:
elif sys.version_info[1] == 12:
base_params = utils.safe_read_pickle(
os.path.join(
CUR_PATH, "test_io_data", "model_params_baseline_v312.pkl"
)
)
elif sys.version_info[1] == 13:
base_params = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "model_params_baseline.pkl")
)
else:
# Raise assertion error
assert False, "Unsupported Python version"
reform_ss = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "SS_vars_reform.pkl")
)
reform_tpi = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "TPI_vars_reform.pkl")
)
if sys.version_info[1] < 11:
if sys.version_info[1] == 11:
reform_params = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "model_params_reform.pkl")
os.path.join(CUR_PATH, "test_io_data", "model_params_reform_v311.pkl")
)
elif sys.version_info[1] == 11:
elif sys.version_info[1] == 12:
reform_params = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "model_params_reform_v311.pkl")
os.path.join(CUR_PATH, "test_io_data", "model_params_reform_v312.pkl")
)
else:
elif sys.version_info[1] == 13:
reform_params = utils.safe_read_pickle(
os.path.join(
CUR_PATH, "test_io_data", "model_params_baseline_v312.pkl"
)
os.path.join(CUR_PATH, "test_io_data", "model_params_reform.pkl")
)
else:
# Raise assertion error
assert False, "Unsupported Python version"
reform_taxfunctions = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "TxFuncEst_reform.pkl")
)
Expand Down
32 changes: 18 additions & 14 deletions tests/test_output_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,46 @@
base_tpi = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "TPI_vars_baseline.pkl")
)
if sys.version_info[1] < 11:
base_params = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "model_params_baseline.pkl")
)
elif sys.version_info[1] == 11:
if sys.version_info[1] == 11:
base_params = utils.safe_read_pickle(
os.path.join(
CUR_PATH, "test_io_data", "model_params_baseline_v311.pkl"
)
)
else:
elif sys.version_info[1] == 12:
base_params = utils.safe_read_pickle(
os.path.join(
CUR_PATH, "test_io_data", "model_params_baseline_v312.pkl"
)
)
elif sys.version_info[1] == 13:
base_params = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "model_params_baseline.pkl")
)
else:
# Raise assertion error
assert False, "Unsupported Python version"
reform_ss = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "SS_vars_reform.pkl")
)
reform_tpi = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "TPI_vars_reform.pkl")
)
if sys.version_info[1] < 11:
if sys.version_info[1] == 11:
reform_params = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "model_params_reform.pkl")
os.path.join(CUR_PATH, "test_io_data", "model_params_reform_v311.pkl")
)
elif sys.version_info[1] == 11:
elif sys.version_info[1] == 12:
reform_params = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "model_params_reform_v311.pkl")
os.path.join(CUR_PATH, "test_io_data", "model_params_reform_v312.pkl")
)
else:
elif sys.version_info[1] == 13:
reform_params = utils.safe_read_pickle(
os.path.join(
CUR_PATH, "test_io_data", "model_params_baseline_v312.pkl"
)
os.path.join(CUR_PATH, "test_io_data", "model_params_reform.pkl")
)
else:
# Raise assertion error
assert False, "Unsupported Python version"
# add investment tax credit parameter that not in cached parameters
base_params.inv_tax_credit = np.zeros(
(base_params.T + base_params.S, base_params.M)
Expand Down
16 changes: 10 additions & 6 deletions tests/test_parameter_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,26 @@

# Load in test results and parameters
CUR_PATH = os.path.abspath(os.path.dirname(__file__))
if sys.version_info[1] < 11:
base_params = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "model_params_baseline.pkl")
)
elif sys.version_info[1] == 11:
if sys.version_info[1] == 11:
base_params = utils.safe_read_pickle(
os.path.join(
CUR_PATH, "test_io_data", "model_params_baseline_v311.pkl"
)
)
else:
elif sys.version_info[1] == 12:
base_params = utils.safe_read_pickle(
os.path.join(
CUR_PATH, "test_io_data", "model_params_baseline_v312.pkl"
)
)
elif sys.version_info[1] == 13:
base_params = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "model_params_baseline.pkl")
)
else:
# Raise assertion error
assert False, "Unsupported Python version"

base_taxfunctions = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "TxFuncEst_baseline.pkl")
)
Expand Down
15 changes: 9 additions & 6 deletions tests/test_parameter_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,25 @@
# Load in test results and parameters
CUR_PATH = os.path.abspath(os.path.dirname(__file__))

if sys.version_info[1] < 11:
base_params = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "model_params_baseline.pkl")
)
elif sys.version_info[1] == 11:
if sys.version_info[1] == 11:
base_params = utils.safe_read_pickle(
os.path.join(
CUR_PATH, "test_io_data", "model_params_baseline_v311.pkl"
)
)
else:
elif sys.version_info[1] == 12:
base_params = utils.safe_read_pickle(
os.path.join(
CUR_PATH, "test_io_data", "model_params_baseline_v312.pkl"
)
)
elif sys.version_info[1] == 13:
base_params = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "model_params_baseline.pkl")
)
else:
# Raise assertion error
assert False, "Unsupported Python version"
base_taxfunctions = utils.safe_read_pickle(
os.path.join(CUR_PATH, "test_io_data", "TxFuncEst_baseline.pkl")
)
Expand Down
Loading