From 686bc9b67a1f9ed1f46adc2d2975eb99df23bd39 Mon Sep 17 00:00:00 2001 From: Richard Evans Date: Mon, 12 Feb 2024 10:47:38 -0700 Subject: [PATCH 01/10] Update Q refs to QE --- ogusa/macro_params.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ogusa/macro_params.py b/ogusa/macro_params.py index 6ee1b4d7..ada35a76 100644 --- a/ogusa/macro_params.py +++ b/ogusa/macro_params.py @@ -61,7 +61,7 @@ def get_macro_params(): "GDP Per Capita", ] ] - .resample("Q") + .resample("QE") .mean() ) fred_data_a = fred_data[["Labor share"]] @@ -107,7 +107,7 @@ def get_macro_params(): # find g_y macro_parameters["g_y"] = ( - fred_data_q["GDP Per Capita"].pct_change(periods=4, freq="Q").mean() + fred_data_q["GDP Per Capita"].pct_change(periods=4, freq="QE").mean() ) # # estimate r_gov_shift and r_gov_scale From 3905c58a8be02ea6209d71a7438272ced0847bf4 Mon Sep 17 00:00:00 2001 From: Richard Evans Date: Mon, 12 Feb 2024 10:50:38 -0700 Subject: [PATCH 02/10] Updated copyright year --- docs/book/_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/book/_config.yml b/docs/book/_config.yml index b3a7de4d..bd3c840a 100644 --- a/docs/book/_config.yml +++ b/docs/book/_config.yml @@ -2,7 +2,7 @@ # Book settings title : OG-USA author : Jason DeBacker and Richard W. Evans -copyright : '2022' +copyright : '2024' logo : '..//OG-USA_logo.png' #################################################### From 97e1ee9e5f40df957b82c354e2ca12607ab37b07 Mon Sep 17 00:00:00 2001 From: Richard Evans Date: Mon, 12 Feb 2024 10:54:29 -0700 Subject: [PATCH 03/10] Updated version and restricted python<3.12 --- environment.yml | 2 +- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/environment.yml b/environment.yml index 004feaee..2aa520c7 100644 --- a/environment.yml +++ b/environment.yml @@ -2,7 +2,7 @@ name: ogusa-dev channels: - conda-forge dependencies: -- python>=3.7.7 +- python>=3.7.7,<3.12 - numpy - numba>=0.54 - scipy>=1.5.0 diff --git a/setup.py b/setup.py index c575886d..74d40184 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="ogusa", - version="0.1.2", + version="0.1.3", author="Jason DeBacker and Richard W. Evans", license="CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", description="USA calibration for OG-Core", @@ -35,7 +35,7 @@ packages=["ogusa"], package_data={"ogusa": ["ogusa_default_parameters.json", "data/PSID/*"]}, include_packages=True, - python_requires=">=3.7.7", + python_requires=">=3.7.7, <3.12", install_requires=[ "numpy", "psutil", From 6313c37cda23b6b08f47e0cf95923d7112fae99d Mon Sep 17 00:00:00 2001 From: Richard Evans Date: Mon, 12 Feb 2024 11:03:54 -0700 Subject: [PATCH 04/10] Added tags to README.md and intro.md --- CHANGELOG.md | 10 ++++++++++ README.md | 4 ++-- docs/book/content/intro/intro.md | 6 ++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8acdda0..c8a94247 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file. 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.1.3] - 2024-02-12 15:00:00 + +### Added + +- Restricted Python version in `environment.yml` and `setup.py` to be <3.12 +- Updated the Jupyter Book copyright to 2024 in `_config.yml` +- Updated the pandas_datareader quarterly calls in `macro_params.py` to be "QE" instead of just "Q" +- Added Jupyter Book and Black tags to `README.md` and `intro.md` + ## [0.1.2] - 2023-10-26 15:00:00 ### Added @@ -47,5 +56,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +[0.1.3]: https://github.com/PSLmodels/OG-USA/compare/v0.1.2...v0.1.3 [0.1.2]: https://github.com/PSLmodels/OG-USA/compare/v0.1.1...v0.1.2 [0.1.1]: https://github.com/PSLmodels/OG-USA/compare/v0.1.0...v0.1.1 diff --git a/README.md b/README.md index 10a73766..efc23181 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ | | | | --- | --- | -| Org | [![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/PSLmodels/OG-USA/blob/master/LICENSE) | -| Package | [![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-3917/) [![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-31013/) [![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3116/) [![PyPI Latest Release](https://img.shields.io/pypi/v/ogusa.svg)](https://pypi.org/project/ogusa/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ogusa.svg?label=PyPI%20downloads)](https://pypi.org/project/fiscalsim-us/) | +| Org | [![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/PSLmodels/OG-USA/blob/master/LICENSE) [![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://pslmodels.github.io/OG-Core/) | +| Package | [![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-3917/) [![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-31013/) [![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3116/) [![PyPI Latest Release](https://img.shields.io/pypi/v/ogusa.svg)](https://pypi.org/project/ogusa/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ogusa.svg?label=PyPI%20downloads)](https://pypi.org/project/fiscalsim-us/) [![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-USA/actions/workflows/build_and_test.yml/badge.svg?branch=master) ![example event parameter](https://github.com/PSLmodels/OG-USA/actions/workflows/deploy_docs.yml/badge.svg?branch=master) ![example event parameter](https://github.com/PSLmodels/OG-USA/actions/workflows/check_format.yml/badge.svg?branch=master) [![Codecov](https://codecov.io/gh/PSLmodels/OG-USA/branch/master/graph/badge.svg)](https://codecov.io/gh/PSLmodels/OG-USA) | OG-USA is an overlapping-generations (OG) model that allows for dynamic general equilibrium analysis of fiscal policy for the United States. OG-USA is built on the [OG-Core](https://github.com/PSLmodels/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](https://pslmodels.github.io/OG-Core) and documentation of the specific United States calibration of the model is available at [https://pslmodels.github.io/OG-USA](https://pslmodels.github.io/OG-USA). diff --git a/docs/book/content/intro/intro.md b/docs/book/content/intro/intro.md index dfc0d6b1..354745ea 100644 --- a/docs/book/content/intro/intro.md +++ b/docs/book/content/intro/intro.md @@ -1,6 +1,12 @@ (Chap_Intro)= # OG-USA +| | | +| --- | --- | +| Org | [![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/PSLmodels/OG-USA/blob/master/LICENSE) [![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://pslmodels.github.io/OG-Core/) | +| Package | [![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-3917/) [![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-31013/) [![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3116/) [![PyPI Latest Release](https://img.shields.io/pypi/v/ogusa.svg)](https://pypi.org/project/ogusa/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ogusa.svg?label=PyPI%20downloads)](https://pypi.org/project/fiscalsim-us/) [![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-USA/actions/workflows/build_and_test.yml/badge.svg?branch=master) ![example event parameter](https://github.com/PSLmodels/OG-USA/actions/workflows/deploy_docs.yml/badge.svg?branch=master) ![example event parameter](https://github.com/PSLmodels/OG-USA/actions/workflows/check_format.yml/badge.svg?branch=master) [![Codecov](https://codecov.io/gh/PSLmodels/OG-USA/branch/master/graph/badge.svg)](https://codecov.io/gh/PSLmodels/OG-USA) | + `OG-USA` is a package that provides code and data to calibrate an overlapping-generations (OG) model to the economy of the United States (USA). `OG-USA` 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-USA` calibration package and the `OG-Core` theory and logic make the model that allows for dynamic general equilibrium analysis of federal fiscal policy in the United States. 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-USA` package contains the following major sections, which are regularly updated. * Contributing to `OG-USA` From 7c32d810b9f63da63b9e7512e1288561e32d1119 Mon Sep 17 00:00:00 2001 From: Richard Evans Date: Mon, 12 Feb 2024 11:14:09 -0700 Subject: [PATCH 05/10] Removed OG-USA demographics references --- docs/book/content/api/demographics.rst | 13 ------------- docs/book/content/api/public_api.rst | 1 - 2 files changed, 14 deletions(-) delete mode 100644 docs/book/content/api/demographics.rst diff --git a/docs/book/content/api/demographics.rst b/docs/book/content/api/demographics.rst deleted file mode 100644 index 6daa40bb..00000000 --- a/docs/book/content/api/demographics.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. _demographics: - -Demographics Functions -======================== - -**demographics.py modules** - -ogusa.demographics ------------------------------------------- - -.. automodule:: ogusa.demographics - :members: get_fert, get_mort, pop_rebin, get_imm_resid, immsolve, - get_pop_objs diff --git a/docs/book/content/api/public_api.rst b/docs/book/content/api/public_api.rst index bf7023e2..47593621 100644 --- a/docs/book/content/api/public_api.rst +++ b/docs/book/content/api/public_api.rst @@ -13,7 +13,6 @@ There is also a link to the source code for each documented member. bequest_transmission calibrate - demographics deterministic_profiles estimate_beta_j get_micro_data From cd6b6182d69b81ef646020fe85bc37216e194218 Mon Sep 17 00:00:00 2001 From: Richard Evans Date: Mon, 12 Feb 2024 12:15:49 -0700 Subject: [PATCH 06/10] Added back windows tests to build_and_test.yml --- .github/workflows/build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 890b04ab..569c9f3b 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] python-version: ["3.9", "3.10"] steps: From e04bc35914fbf99ddea8c0e63b667ec1b6d69aed Mon Sep 17 00:00:00 2001 From: Richard Evans Date: Mon, 12 Feb 2024 12:20:49 -0700 Subject: [PATCH 07/10] Updated CHANGELOG.md --- CHANGELOG.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8a94247..d9122bdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,10 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Restricted Python version in `environment.yml` and `setup.py` to be <3.12 -- Updated the Jupyter Book copyright to 2024 in `_config.yml` -- Updated the pandas_datareader quarterly calls in `macro_params.py` to be "QE" instead of just "Q" -- Added Jupyter Book and Black tags to `README.md` and `intro.md` +- Restricts Python version in `environment.yml` and `setup.py` to be <3.12 +- Updates the Jupyter Book copyright to 2024 in `_config.yml` +- Updates the pandas_datareader quarterly calls in `macro_params.py` to be "QE" instead of just "Q" +- Adds Jupyter Book and Black tags to `README.md` and `intro.md` +- Adds back Windows tests to `build_and_test.yml` ## [0.1.2] - 2023-10-26 15:00:00 From 9b27c2d37391b147a17c63732c62bd7eb6414dd1 Mon Sep 17 00:00:00 2001 From: Richard Evans Date: Mon, 12 Feb 2024 12:23:39 -0700 Subject: [PATCH 08/10] Updated CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9122bdb..359bf0df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updates the pandas_datareader quarterly calls in `macro_params.py` to be "QE" instead of just "Q" - Adds Jupyter Book and Black tags to `README.md` and `intro.md` - Adds back Windows tests to `build_and_test.yml` +- PR #84 fixed some formatting +- PR #85 updated the way the dask client is set in `run_og_usa.py` script +- PR #86 moved `demographics.py` out of OG-USA and into OG-Core ## [0.1.2] - 2023-10-26 15:00:00 From 6d319c592552e5959b84aa61ef29c0ca53f5427f Mon Sep 17 00:00:00 2001 From: Richard Evans Date: Mon, 12 Feb 2024 15:14:04 -0700 Subject: [PATCH 09/10] Remove Windows GH Action tests in build_and_test.yml --- .github/workflows/build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 569c9f3b..890b04ab 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] python-version: ["3.9", "3.10"] steps: From cef2e94dd4f836223dc6317d5b66c85388a083e5 Mon Sep 17 00:00:00 2001 From: Richard Evans Date: Mon, 12 Feb 2024 15:15:46 -0700 Subject: [PATCH 10/10] Added black requirement >=24.1.1 to environment.yml --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 2aa520c7..e22052f1 100644 --- a/environment.yml +++ b/environment.yml @@ -26,7 +26,7 @@ dependencies: - statsmodels - linearmodels - rpy2<=3.5.11 -- black +- black>=24.1.1 - pip: - jupyter-book>=0.9.1 - openpyxl>=3.1.2