Skip to content

Commit 8a8efe7

Browse files
committed
Bump version to 0.1.12
1 parent 1385471 commit 8a8efe7

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

evo_science/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.11
1+
0.1.12

scripts/read-requirement.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import io
2+
import os
3+
4+
5+
def read(*paths, **kwargs):
6+
"""Read the contents of a text file safely.
7+
>>> read("evo_science", "VERSION")
8+
'0.1.0'
9+
>>> read("README.md")
10+
...
11+
"""
12+
13+
content = ""
14+
with io.open(
15+
os.path.join(os.path.dirname(__file__), *paths),
16+
encoding=kwargs.get("encoding", "utf8"),
17+
) as open_file:
18+
content = open_file.read().strip()
19+
return content
20+
21+
22+
def read_requirements(path):
23+
return [
24+
line.strip()
25+
for line in read(path).split("\n")
26+
if not line.startswith(('"', "#", "-", "git+"))
27+
]
28+
29+
30+
z = read_requirements("../requirements.txt")
31+
32+
print(z)

0 commit comments

Comments
 (0)