pygfunction icon indicating copy to clipboard operation
pygfunction copied to clipboard

Planned deprecations for v3.0

Open MassimoCimmino opened this issue 4 years ago • 4 comments

This is a list of planned deprecations for the eventual major release v3.0.

  • [ ] Old g-function API functions from v1.x. A deprecation warning was introduced in #160.
  • [ ] pipes.borehole_thermal_resistance(). This function is replaced by the pipes._BasePipe.effective_borehole_thermal_resistance() class method. A deprecation warning was introduced in #148.
  • [ ] boreholes.rectangle_field() and other bore field creation functions in the boreholes module. These functions are replaced by class methods in the borefield.Borefield class. A deprecation warning was introduced in #308.

MassimoCimmino avatar Nov 08 '21 20:11 MassimoCimmino

I have modified the boreholes.field_from_file(filename) function to account for tilt and orientation if they are provided in my https://github.com/j-c-cook/pygfunction/blob/issue50_FLSInclined/pygfunction/boreholes.py#L1003-L1010 branch. Should we add a deprecation warning that tilt and orientation will be a requirement in v3.0, or leave it optional?

j-c-cook avatar May 20 '22 13:05 j-c-cook

It may make sense to keep the last two columns optional since the tilt and orientation arguments are optional in the Borehole class. It is unlikely that these two arguments cease to be optional or that the default values change in the future.

This also cleans up the text file and eliminates the columns of zeros in fields of vertical boreholes.

MassimoCimmino avatar May 20 '22 15:05 MassimoCimmino

I concur. Should the function enforce either 4 or 6 arguments? E.g. if tilt is given then orientation would be required as well.

j-c-cook avatar May 21 '22 02:05 j-c-cook

@j-c-cook Yes. We should provide an error message on invalid files.

MassimoCimmino avatar May 21 '22 17:05 MassimoCimmino