GeezerVison is showing github.com — BLD: Use strict bounds with requirements_dev · wangtingpython/zipline@be8cf93
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: setup.py +6-4Lines changed: 6 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -118,17 +118,18 @@ def _filter_requirements(lines_iter): |
118 | 118 | yield requirement |
119 | 119 |
|
120 | 120 |
|
121 | | -def read_requirements(path, convert_eq_to_lte=True): |
| 121 | +def read_requirements(path, strict_bounds=False): |
122 | 122 | """ |
123 | 123 | Read a requirements.txt file, expressed as a path relative to Zipline root. |
124 | 124 |
|
125 | | - Returns requirements with the pinned versions as lower bounds. |
| 125 | + Returns requirements with the pinned versions as lower bounds |
| 126 | + if `strict_bounds` is falsey. |
126 | 127 | """ |
127 | 128 | real_path = join(dirname(abspath(__file__)), path) |
128 | 129 | with open(real_path) as f: |
129 | 130 | reqs = _filter_requirements(f.readlines()) |
130 | 131 |
|
131 | | - if not convert_eq_to_lte: |
| 132 | + if strict_bounds: |
132 | 133 | return list(reqs) |
133 | 134 | else: |
134 | 135 | return [req.replace('==', '>=') for req in reqs] |
@@ -139,7 +140,8 @@ def install_requires(): |
139 | 140 |
|
140 | 141 |
|
141 | 142 | def extras_requires(): |
142 | | - dev_reqs = read_requirements('etc/requirements_dev.txt') |
| 143 | + dev_reqs = read_requirements('etc/requirements_dev.txt', |
| 144 | + strict_bounds=True) |
143 | 145 | talib_reqs = ['TA-Lib==0.4.9'] |
144 | 146 | return { |
145 | 147 | 'dev': dev_reqs, |
|