PSLmodels / Tax-Calculator

USA Federal Individual Income and Payroll Tax Microsimulation Model
https://taxcalc.pslmodels.org
Other
254 stars 153 forks source link

update environment files #2759

Closed bodiyang closed 2 months ago

bodiyang commented 2 months ago

This PR is to update the environment.yml file by adding version requirement of fsspec package.

Some issues appear, when update the taxcalc-dev environment locally (by runningconda env update command). ~ pandas package has constraints with specific version offsspec package.

It is necessary to clarify the version requirement of fsspec package to get it work.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.42%. Comparing base (b75b24f) to head (ee50c46).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2759/graphs/tree.svg?width=650&height=150&src=pr&token=KqtTvRSNjQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels)](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2759?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) ```diff @@ Coverage Diff @@ ## master #2759 +/- ## ======================================= Coverage 99.42% 99.42% ======================================= Files 13 13 Lines 2607 2607 ======================================= Hits 2592 2592 Misses 15 15 ``` | [Flag](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2759/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2759/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | `99.42% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#carryforward-flags-in-the-pull-request-comment) to find out more.
jdebacker commented 2 months ago

@bodiyang Is this necessary?

I just removed my existing taxcalc-dev environment and then rebuilt it from the master branch with conda env create. After doing that, I ran pytest and received no errors.

bodiyang commented 2 months ago

@jdebacker Not sure, may be it's a universal issue might be not.

On my local machine, I had attempts of (1) remove taxcalc-dev and then rebuilt; also (2) update conda env. ~ Both of them show errors. After make the change in environment.yaml file, things work.

If other users have not experienced similar issues, can put it on a hold.

jdebacker commented 2 months ago

@martinholmer -- have you noticed any issues with the taxcalc-dev environment of late?

martinholmer commented 2 months ago

@jdebacker asked me in PR #2759:

have you noticed any issues with the taxcalc-dev environment of late?

No, none whatsoever. What is the issue motivating this PR?

bodiyang commented 2 months ago

@jdebacker @martinholmer

If this conda environment update is not a universal issue, we can close this PR / hold it.

Reason why I opened this PR ~ the attached picture is the error I encountered when conda env update from the latest pull from Tax-Calc.

I'm only able to get it run by adding the fsspec requirement in environment.yml file. (remove taxcalc-dev and reinstall, such attempts did not work) ~ this might be a single case for my local machine though.

Screenshot 2024-06-14 at 11 55 29 AM

martinholmer commented 2 months ago

@bodiyang, Why is fsspec required at all? What is it used for in Tax-Calculator?

jdebacker commented 2 months ago

@martinholmer fsspec is a dependency of pandas. Which is probably all the more reason to not list it in the environment.yml file with any pin (let conda determine which version of pandas and pandas choose the appropriate dependencies for itself).

@bodiyang In your screenshot, I find it odd that after conda env update there is reference to Python 3.9, but then your python -V returns 3.11.

I'm thinking your error was due to something unique to your env and will close this PR. But please report back if you have issues in the future.