Rangekeeper 0.8.27__py3-none-any.whl → 0.8.29__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
rangekeeper/duration.py CHANGED
@@ -18,7 +18,7 @@ class Type(enum.Enum):
18
18
  SEMIYEAR = "6M"
19
19
  QUARTER = "Q"
20
20
  MONTH = "M"
21
- BIWEEKLY = "2W"
21
+ BIWEEK = "2W"
22
22
  WEEK = "W"
23
23
  DAY = "D"
24
24
 
@@ -39,7 +39,7 @@ class Type(enum.Enum):
39
39
  if value == "M":
40
40
  return Type.MONTH
41
41
  if value in ("2W", "2W-SUN"):
42
- return Type.BIWEEKLY
42
+ return Type.BIWEEK
43
43
  if value in ("W-SUN", "W"):
44
44
  return Type.WEEK
45
45
  if value == "D":
@@ -63,7 +63,7 @@ class Type(enum.Enum):
63
63
  return "Q"
64
64
  if type == Type.MONTH:
65
65
  return "M"
66
- if type == Type.BIWEEKLY:
66
+ if type == Type.BIWEEK:
67
67
  return "2W"
68
68
  if type == Type.WEEK:
69
69
  return "W"
@@ -88,10 +88,10 @@ class Type(enum.Enum):
88
88
  return "QE"
89
89
  if type == Type.MONTH:
90
90
  return "ME"
91
- if type == Type.BIWEEKLY:
92
- return "2W"
91
+ if type == Type.BIWEEK:
92
+ return "2W-SUN"
93
93
  if type == Type.WEEK:
94
- return "W"
94
+ return "W-SUN"
95
95
  if type == Type.DAY:
96
96
  return "D"
97
97
  else:
@@ -129,7 +129,7 @@ def measure(
129
129
  result = (delta.years * 4) + math.floor(delta.months / 3)
130
130
  elif duration.value == Type.MONTH.value:
131
131
  result = (delta.years * 12) + delta.months
132
- elif duration.value == Type.BIWEEKLY.value:
132
+ elif duration.value == Type.BIWEEK.value:
133
133
  result = math.floor((calc_end_date - start_date).days / 14)
134
134
  elif duration.value == Type.WEEK.value:
135
135
  result = math.floor((calc_end_date - start_date).days / 7)
@@ -177,7 +177,7 @@ def offset(
177
177
  result = date + pd.offsets.MonthEnd(3 * amount)
178
178
  elif duration.value == Type.MONTH.value:
179
179
  result = date + pd.offsets.MonthEnd(amount)
180
- elif duration.value == Type.BIWEEKLY.value:
180
+ elif duration.value == Type.BIWEEK.value:
181
181
  result = date + pd.DateOffset(weeks=2 * amount)
182
182
  elif duration.value == Type.WEEK.value:
183
183
  result = date + pd.DateOffset(weeks=amount)
@@ -200,7 +200,7 @@ def offset(
200
200
  result = date + pd.DateOffset(months=3 * amount)
201
201
  elif duration.value == Type.MONTH.value:
202
202
  result = date + pd.DateOffset(months=amount)
203
- elif duration.value == Type.BIWEEKLY.value:
203
+ elif duration.value == Type.BIWEEK.value:
204
204
  result = date + pd.DateOffset(weeks=2 * amount)
205
205
  elif duration.value == Type.WEEK.value:
206
206
  result = date + pd.DateOffset(weeks=amount)
@@ -245,7 +245,7 @@ class Period:
245
245
  Type.SEMIYEAR: 2,
246
246
  Type.QUARTER: 4,
247
247
  Type.MONTH: 12,
248
- Type.BIWEEKLY: 26,
248
+ Type.BIWEEK: 26,
249
249
  Type.WEEK: 52,
250
250
  Type.DAY: 365,
251
251
  }.get(duration, None)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Rangekeeper
3
- Version: 0.8.27
3
+ Version: 0.8.29
4
4
  Summary: A Python library assisting financial modelling in real estate asset & development planning, decision-making, cashflow forecasting, and scenario analysis.
5
5
  Author-email: Daniel Fink <danfink@mit.edu>
6
6
  License-Expression: MPL-2.0
@@ -1,7 +1,7 @@
1
1
  rangekeeper/__init__.py,sha256=8q0KF90SLgIfptpFGuI66FOCqe3K9UgIzTHFL1pwP4Y,1731
2
2
  rangekeeper/api.py,sha256=3nuG7C2IQjpumcn79MvYDTa7ADWPAos7VfVM-3pL4n4,4798
3
3
  rangekeeper/distribution.py,sha256=2C3jhi1rLJUs0seBztdQb196hNhc00sKJEGMkFiDpYs,8961
4
- rangekeeper/duration.py,sha256=9GU6dcZTL_OAOgEHLGkCVxjG16_Po1IMEU29K5g4iRM,20433
4
+ rangekeeper/duration.py,sha256=c0roYG0zzIfr3B19_NxahlaBoAt1DuKSjeqyVGOhn0Y,20425
5
5
  rangekeeper/extrapolation.py,sha256=Zfsz2KwkImxEMMCNZaF8RpiQxlIgemS1dQkSnjliYU4,2814
6
6
  rangekeeper/flux.py,sha256=25-jSnBrO9QGDXpuNahaVFUiJrHAWaiTda1uplUXFck,32043
7
7
  rangekeeper/format.py,sha256=DOfF4-LCXqWyCtE1OomwE80sJLe6LjL4gqEOAP454LQ,10796
@@ -20,7 +20,7 @@ rangekeeper/dynamics/trend.py,sha256=-WqrRvmmTj2mE24Pz-Dl5lXEpLXnDUMngafU__em_ac
20
20
  rangekeeper/dynamics/volatility.py,sha256=MGDLzrI1uP_C6HL-pigJwWikHg1KNbfB_0m0Akh-L2A,5162
21
21
  rangekeeper/formula/__init__.py,sha256=4OXzdJAYDBxQeOMzLR5MZvIjxxIfFOTE9aNu9zFryAE,36
22
22
  rangekeeper/formula/financial.py,sha256=oNFdhygbtdEUFjpxYFuuDnpC_P8nOO538b21FzaMtTU,14045
23
- rangekeeper-0.8.27.dist-info/METADATA,sha256=2RSAoHJkWMaR5bEw9Y03S_pZHx149hKs6bvcXFkoK8s,2212
24
- rangekeeper-0.8.27.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
- rangekeeper-0.8.27.dist-info/top_level.txt,sha256=7ov6d70lppmzKc088MAmRWnCtCRGA2cd43G28QBSv-c,12
26
- rangekeeper-0.8.27.dist-info/RECORD,,
23
+ rangekeeper-0.8.29.dist-info/METADATA,sha256=d6pMSrTHDrBQt4S_eIypA9BNaW5Vy7Mds8mkLb5f7Vk,2212
24
+ rangekeeper-0.8.29.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
+ rangekeeper-0.8.29.dist-info/top_level.txt,sha256=7ov6d70lppmzKc088MAmRWnCtCRGA2cd43G28QBSv-c,12
26
+ rangekeeper-0.8.29.dist-info/RECORD,,