-
Notifications
You must be signed in to change notification settings - Fork 1
5 lisa new independent recovery analysis #6
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For test_ independentrecovery.py, please refer to the tutorial section Create test for new analysis
.
It should be under tests > pyincore_incubator > analyses. The related files should be in the same folder as well.
Also, the test doesn't pass. Please modify it accordingly.
pyincore_incubator/analyses/independentrecovery/test_independentrecovery.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests pass. Approve.
@IN-CORE/core-dev For testing, please install this pyincore PR IN-CORE/pyincore#606 |
Can you merge in the develop branch to fix the build issues? I know this has been open a long time, if you prefer, we can fix the build issue for you. |
Hi Chris, Thank you for your comment. If it's straightforward on your end, please go ahead and address the issue. It's been a while, and I must admit I've nearly forgotten the specifics. Appreciate your assistance! |
@lisanumber1 I've updated the input keys and types to match any existing pyincore types. For example, I believe what you had as "household housing recovery" with type incore:housingRecovery is the output of the HousingRecoverySequential analysis, which has a type specified as incore:housingRecoveryHistory. I updated a few others as well and eliminated spaces in the key names (e.g. PopulationDislocation output type is incore:popDislocation). If you get a chance, please run the analysis and verify it looks ok. The last change I think is I will upload the sample datasets to our development site so we don't need them included in the source code repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good and runs.
I see some pandas future warnings. Not sure if they matter at the moment though.
ee the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
modified_housing_recovery["hur"][j] = i * 4
/Users/cwang138/Documents/Projects/INCORE-2.0/pyincore-incubator/pyincore_incubator/analyses/independentrecovery/independentrecovery.py:255: FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0!
You are setting values through chained assignment. Currently this works in certain cases, but when using Copy-on-Write (which will become the default behaviour in pandas 3.0) this will never work to update the original DataFrame or Series, because the intermediate object on which we are setting values will behave as a copy.
A typical example is when you are setting values in a column of a DataFrame, like:
Good point, I saw those pandas warnings as well. Right now I think it's fine, but maybe @lisanumber1 can address this in another PR later. |
No description provided.