Skip to content

Commit

Permalink
Initial success using deprecated.deprecated decorator.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdeline committed Oct 5, 2024
1 parent 75aae25 commit 2a178e1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
24 changes: 23 additions & 1 deletion 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 Expand Up @@ -357,6 +359,22 @@ class RadianceObj(SuperClass):
_setPath : change the working directory
"""

@property
def Wm2Front(self):
return self._Wm2Front
@Wm2Front.setter
def Wm2Front(self, value):
self._Wm2Front = value

@Wm2Front.getter
@deprecated(reason='RadianceObj.Wm2Front will be abandoned'+\
' by v0.5.0. Please use values recorded in ' +
' AnalysisObj.Wm2Front or RadianceObj.results')
def Wm2Front(self):
return self._Wm2Front


def __repr__(self):
#return str(self.__dict__)
return str(type(self)) + ' : ' + str({key: self.__dict__[key] for key in self.columns if key != 'trackerdict'})
Expand Down Expand Up @@ -387,7 +405,11 @@ def __init__(self, name=None, path=None, hpc=False):
self.skyfiles = [] # skyfiles for oconv
self.radfiles = [] # scene rad files for oconv
self.octfile = [] #octfile name for analysis
self.Wm2Front = 0 # cumulative tabulation of front W/m2

self._Wm2Front = 0 # cumulative tabulation of front W/m2



self.Wm2Back = 0 # cumulative tabulation of rear W/m2
self.backRatio = 0 # ratio of rear / front Wm2
#self.nMods = None # number of modules per row
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

0 comments on commit 2a178e1

Please sign in to comment.