Skip to content
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

556 deprecationwarning #561

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion bifacial_radiance/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
TEMP folder in bifacial_radiance \\ bifacial_radiance

"""
from deprecated import deprecated

''' DEPRECATED - doesn't work with python3
def load_inputvariablesfile(inputfile):
"""
Expand Down Expand Up @@ -235,7 +237,7 @@ def loadTrackerDict(trackerdict, fileprefix=None):
``finalkey`` (last index file in directory)

"""

# TODO: get this module working
import re, os
import numpy as np

Expand Down Expand Up @@ -327,6 +329,9 @@ def _exportTrackerDict(trackerdict, savefile, reindex):
d.to_csv(savefile)


@deprecated(reason='load.deepcleanResult has been abandoned'+\
' Please use load.cleanResult instead',
version='0.5.0')
def deepcleanResult(resultsDict, sensorsy, numpanels, automatic=True):
"""
Cleans results file read by read1Result. If automatic = False, user is
Expand All @@ -335,6 +340,10 @@ def deepcleanResult(resultsDict, sensorsy, numpanels, automatic=True):
If you pass in results from a file with only _Front or _Back parameters,
only the corresponding Frontresults or Backresults will be returned.

.. deprecated:: 0.5.0
This cleaning routine is deprecated in favor of :func:`cleanResult` which
is more stable

Parameters
-----------
sensorsy : int
Expand Down
2 changes: 2 additions & 0 deletions bifacial_radiance/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
import pandas as pd
import numpy as np
import warnings
from deprecated import deprecated

#from input import *

# Mutual parameters across all processes
Expand Down
5 changes: 3 additions & 2 deletions bifacial_radiance/mismatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@author: sayala
"""

#from load import *
from deprecated import deprecated



Expand Down Expand Up @@ -300,7 +300,8 @@ def _mad_1D(data): #1D calculation of MAD
return _mad_1D(data)



@deprecated(reason='This analysis script will be moved to its own tutorial' +\
' file in a future release.', version='0.5.0')
def analysisIrradianceandPowerMismatch(testfolder, writefiletitle, portraitorlandscape, bififactor, numcells=72, downsamplingmethod='byCenter'):
r'''
Use this when sensorsy calculated with bifacial_radiance > cellsy
Expand Down
2 changes: 2 additions & 0 deletions docs/sphinx/source/whatsnew/pending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Enhancements
Deprecations
~~~~~~~~~~~~~~
* .ini files loaded with :py:func:`bifacial_radiance.load.readconfigurationinputfile` use `azimuth` key instead of `axis_azimuth` (:issue:`438`)(:pull:`551`)
* :py:func:`bifacial_radiance.load.deepcleanResult` is now deprecated in favor of :py:func:`~bifacial_radiance.load.cleanResult` (:issue:`556`)
* :py:func:`bifacial_radiance.mismatch.analysisIrradianceandPowerMismatch` is being removed to its own example notebook in a future release. (:issue:`556`)

Bug fixes
~~~~~~~~~
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
'configparser',
'requests',
'pyradiance',
'deprecated'
],

# List additional groups of dependencies here (e.g. development
Expand Down
Loading