Skip to content

Commit 270e77c

Browse files
committed
Creating 0.1.3 release
1 parent 453cd63 commit 270e77c

File tree

6 files changed

+44
-23
lines changed

6 files changed

+44
-23
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ venv
55

66
Datasets/*
77
Models/*
8+
dist
89

910
!*.md

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## [0.1.3] - 2022-20-12
2+
3+
Initial release of mltu (Machine Learning Training Utilities)
4+
5+
- Project to help with training machine learning models

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include requirements.txt

mltu/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.1.0"
1+
__version__ = "0.1.3"

requirements.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
stow
2-
pyyaml
1+
stow>=1.1.6
2+
PyYAML>=6.0
33
tqdm
4+
pandas
45
numpy
56
opencv-python
6-
tensorflow==2.10.*
7-
pandas
87
tf2onnx
9-
onnxruntime # onnxruntime-gpu for GPU support
8+
onnxruntime # onnxruntime-gpu for GPU support
9+
tensorflow<=2.10.1

setup.py

+31-17
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,32 @@
1+
import os
12
from setuptools import setup
23

3-
import codecs
4-
import os.path
5-
from pathlib import Path
4+
DIR = os.path.abspath(os.path.dirname(__file__))
65

7-
def read(rel_path):
8-
here = os.path.abspath(os.path.dirname(__file__))
9-
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
10-
return fp.read()
6+
with open(os.path.join(DIR, 'README.md')) as fh:
7+
long_description = fh.read()
118

12-
def get_version(rel_path):
13-
for line in read(rel_path).splitlines():
14-
if line.startswith('__version__'):
15-
delim = '"' if '"' in line else "'"
16-
return line.split(delim)[1]
17-
else:
18-
raise RuntimeError("Unable to find version string.")
9+
with open(os.path.join(DIR, 'requirements.txt')) as fh:
10+
requirements = fh.read().splitlines()
1911

20-
# read the contents of your README file
21-
this_directory = Path(__file__).parent
22-
long_description = (this_directory / "README.md").read_text()
12+
def get_version(initpath: str) -> str:
13+
""" Get from the init of the source code the version string
14+
15+
Params:
16+
initpath (str): path to the init file of the python package relative to the setup file
17+
18+
Returns:
19+
str: The version string in the form 0.0.1
20+
"""
21+
22+
path = os.path.join(os.path.dirname(__file__), initpath)
23+
24+
with open(path, "r") as handle:
25+
for line in handle.read().splitlines():
26+
if line.startswith("__version__"):
27+
return line.split("=")[1].strip().strip("\"'")
28+
else:
29+
raise RuntimeError("Unable to find version string.")
2330

2431
setup(
2532
name = 'mltu',
@@ -29,4 +36,11 @@ def get_version(rel_path):
2936
url='https://pylessons.com/',
3037
author='PyLessons',
3138
author_email='[email protected]',
39+
install_requires=requirements,
40+
extras_require={
41+
'gpu': ['onnxruntime-gpu'],
42+
},
43+
python_requires='>=3',
44+
packages = ['mltu'],
45+
include_package_data=True,
3246
)

0 commit comments

Comments
 (0)