IN-CORE / pyincore

pyIncore is a component of IN-CORE. It is a python package consisting of two primary components: 1) a set of service classes to interact with the IN-CORE web services, and 2) IN-CORE analyses . The pyIncore allows users to apply various hazards to infrastructure in selected areas, propagating the effect of physical infrastructure damage and loss of functionality to social and economic impacts.
Mozilla Public License 2.0
24 stars 7 forks source link

560 renaming housing recovery to housing valuation recovery #565

Closed longshuicy closed 1 month ago

longshuicy commented 2 months ago
  1. Use the sphinx deprecation decorator
  2. Found an elegant way for he old class to call the new one
  3. Update the sphinx doc, also add the deprecation decorator
image

To test:

  1. run the old test_housingrecovery.py. This should print out warnings but still execute as it used to.
  2. run the new test_housingvaluationrecovery.py.
navarroc commented 2 months ago

I think we'll need to add deprecated to the list of dependencies, right?

longshuicy commented 2 months ago

I think we'll need to add deprecated to the list of dependencies, right?

Hmm sorry I don't follow. Could you give me an example?

navarroc commented 2 months ago

I think we'll need to add deprecated to the list of dependencies, right?

Hmm sorry I don't follow. Could you give me an example?

I had to install the "deprecated" library into my pip environment to run the test so we might need to add it to setup.py. Looking at the conda environment for 1.18.1, it is already there (probably part of the base conda package) or another dependency we have already pulls it in.

navarroc commented 2 months ago

Basic tests pass (checked old output vs new output), the old analysis shows a deprecation message. I also checked/built the module documentation, looks good.

longshuicy commented 2 months ago

I think we'll need to add deprecated to the list of dependencies, right?

Hmm sorry I don't follow. Could you give me an example?

I had to install the "deprecated" library into my pip environment to run the test so we might need to add it to setup.py. Looking at the conda environment for 1.18.1, it is already there (probably part of the base conda package) or another dependency we have already pulls it in.

Ah i see! You are talking about the deprecated library. Yes I think I need to add it good catch!

longshuicy commented 2 months ago

I had to install the "deprecated" library into my pip environment to run the test so we might need to add it to setup.py. Looking at the conda environment for 1.18.1, it is already there (probably part of the base conda package) or another dependency we have already pulls it in.

I added the dependencies: