Skip to content

Conversation

lisanumber1
Copy link
Collaborator

No description provided.

@lisanumber1 lisanumber1 linked an issue Jun 28, 2024 that may be closed by this pull request
Copy link
Contributor

@ylyangtw ylyangtw left a 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.

Copy link
Contributor

@ylyangtw ylyangtw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests pass. Approve.

@ylyangtw
Copy link
Contributor

ylyangtw commented Aug 2, 2024

@IN-CORE/core-dev For testing, please install this pyincore PR IN-CORE/pyincore#606

@navarroc
Copy link
Member

navarroc commented May 7, 2025

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.

@lisanumber1
Copy link
Collaborator Author

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!

@navarroc
Copy link
Member

@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.

Copy link
Member

@longshuicy longshuicy left a 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:

@navarroc
Copy link
Member

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.

@navarroc navarroc merged commit caca598 into develop May 15, 2025
4 checks passed
@navarroc navarroc deleted the 5-lisa-new-independent-recovery-analysis branch May 15, 2025 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lisa new independent recovery analysis
4 participants