Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated ryp2 dependency #110

Merged
merged 6 commits into from
May 17, 2024
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
4 changes: 4 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v2
with:
r-version: release
- name: Setup Miniconda using Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
with:
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ 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.7] - 2024-05-14 16:30:00

### Added

- Updates the dependency `rpy2>=3.5.12` in `environment.yml` and `setup.py`.


## [0.1.6] - 2024-05-08 10:30:00

### Added
Expand Down Expand Up @@ -90,6 +97,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0



[0.1.7]: https://github.com/PSLmodels/OG-USA/compare/v0.1.6...v0.1.7
[0.1.6]: https://github.com/PSLmodels/OG-USA/compare/v0.1.5...v0.1.6
[0.1.5]: https://github.com/PSLmodels/OG-USA/compare/v0.1.4...v0.1.5
[0.1.4]: https://github.com/PSLmodels/OG-USA/compare/v0.1.3...v0.1.4
Expand Down
3 changes: 2 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dependencies:
- python>=3.7.7,<3.12
- numpy
- setuptools
- wheel
- numba>=0.54
- scipy>=1.7.1
- pandas>=1.2.5
Expand All @@ -26,10 +27,10 @@ dependencies:
- xlwt
- statsmodels
- linearmodels
- rpy2<=3.5.11
- black>=24.1.1
- pip
- pip:
- rpy2>=3.5.12
- openpyxl>=3.1.2
- cs-kit
- cs2tc
Expand Down
8 changes: 7 additions & 1 deletion ogusa/psid_data_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
import datetime
from linearmodels import PanelOLS
from rpy2.robjects import r
from rpy2.robjects import conversion
from rpy2.robjects import default_converter
from rpy2.robjects import pandas2ri
from rpy2.robjects.packages import importr
from ogusa.constants import PSID_NOMINAL_VARS, PSID_CONSTANT_VARS


pandas2ri.activate()
pd.options.mode.chained_assignment = "raise"

Expand All @@ -34,7 +38,9 @@ def prep_data(data="psid1968to2015.RData"):
"""
# Read data from R into pandas dataframe
r["load"](os.path.join(CURDIR, "..", "data", "PSID", data))
raw_df = r("psid_df")
raw_r_df = r("psid_df")
with (default_converter + pandas2ri.converter).context():
raw_df = conversion.get_conversion().rpy2py(raw_r_df)

# Create unique identifier for each household
# note that will define a new household if head or spouse changes
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="ogusa",
version="0.1.6",
version="0.1.7",
author="Jason DeBacker and Richard W. Evans",
license="CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
description="USA calibration for OG-Core",
Expand All @@ -32,7 +32,7 @@
"paramtools>=0.15.0",
"taxcalc>=3.0.0",
"requests",
"rpy2<=3.5.11",
"rpy2>=3.5.12",
"pandas-datareader",
"xlwt",
"openpyxl>=3.1.2",
Expand Down
Loading