Skip to content

Commit

Permalink
Merge pull request #69 from jdebacker/read_tax_func
Browse files Browse the repository at this point in the history
Merging
  • Loading branch information
rickecon authored Apr 11, 2023
2 parents 5ca67d1 + 8cae181 commit 955ae31
Show file tree
Hide file tree
Showing 20 changed files with 128,930 additions and 128,958 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and test [Python 3.7, 3.8, 3.9]
name: Build and test [Python 3.8, 3.9]

on: [push, pull_request]

Expand All @@ -7,25 +7,25 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.8, 3.9]

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Setup Miniconda using Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
- name: Setup Python
uses: actions/setup-python@v4
with:
activate-environment: ogusa-dev
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false

- name: Build
shell: bash -l {0}
run: |
conda init bash
conda env create
conda activate ogusa-dev
pip install -e .
pip install pytest-cov
pip install pytest-pycodestyle
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
activate-environment: ogusa-dev
environment-file: environment.yml
python-version: 3.7
Expand All @@ -25,8 +26,9 @@ jobs:
shell: bash -l {0}
run: |
pip install jupyter-book
pip install sphinxcontrib-bibtex==1.0.0
pip install sphinxcontrib-bibtex
pip install -e .
python -m ipykernel install --user --name=ogusa-dev
cd docs
jb build ./book
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/docs_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
activate-environment: ogusa-dev
environment-file: environment.yml
python-version: 3.7
Expand All @@ -22,7 +23,8 @@ jobs:
shell: bash -l {0}
run: |
pip install jupyter-book
pip install sphinxcontrib-bibtex==1.0.0
pip install sphinxcontrib-bibtex
pip install -e .
python -m ipykernel install --user --name=ogusa-dev
cd docs
jb build ./book
4 changes: 2 additions & 2 deletions docs/book/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ logo : '..//OG-USA_logo.png'
####################################################
# Execution settings
execute:
execute_notebooks : cache
execute_notebooks : force

####################################################
# HTML-specific settings
Expand Down Expand Up @@ -41,7 +41,7 @@ launch_buttons:
# Information about where the book exists on the web
repository:
url : https://github.com/PSLmodels/OG-USA
path_to_book : 'book'
path_to_book : 'docs/book'

#######################################################################################
# Advanced and power-user settings
Expand Down
8 changes: 3 additions & 5 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ name: ogusa-dev
channels:
- conda-forge
dependencies:
- python>=3.7.7, <=3.9.12 # This restriction can be removed as soon as these packages support Python 3.10
- mkl>=2020.2
- numpy<=1.21.2 # This restriction can be removed as soon as Numba supports NumPy 1.22
- python>=3.7.7
- numpy
- psutil
- scipy>=1.5.0
- pandas>=1.2.5
- matplotlib
- dask>=2.30.0
- dask-core>=2.30.0
- distributed>=2.30.1
- paramtools>=0.15.0
- taxcalc>=3.0.0
Expand All @@ -25,13 +23,13 @@ dependencies:
- coverage
- requests
- xlwt
- openpyxl
- statsmodels
- linearmodels
- rpy2
- black
- pip:
- jupyter-book>=0.9.1
- openpyxl>=3.1.2
- cs-kit
- cs2tc
- pandas-datareader
Expand Down
6 changes: 5 additions & 1 deletion examples/run_og_usa.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ def main():
)
)
)

p.age_specific = False
p.tax_func_type = "GS"
c1 = Calibration(
p, iit_reform={}, estimate_tax_functions=True, client=client
)
# Run model
start_time = time.time()
runner(p, time_path=True, client=client)
Expand Down
2 changes: 1 addition & 1 deletion ogusa/bequest_transmission.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def MVKDE(S, J, proportion_matrix, filename=None, plot=False, bandwidth=0.25):
estimator_scaled = estimator / float(np.sum(estimator))
if plot:
fig = plt.figure()
ax = fig.gca(projection="3d")
ax = fig.add_subplot(projection="3d")
ax.plot_surface(agei, incomei, estimator_scaled, rstride=5)
ax.set_xlabel("Age")
ax.set_ylabel("Ability Types")
Expand Down
Loading

0 comments on commit 955ae31

Please sign in to comment.