Skip to content

Commit ebb0825

Browse files
authored
重构结构
1 parent 1bde746 commit ebb0825

File tree

6 files changed

+8
-5
lines changed

6 files changed

+8
-5
lines changed

.github/workflows/pytest.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ jobs:
1515
uses: actions/checkout@main
1616
- name: Installation depends # 安装依赖
1717
run: |
18-
pip install -r requirements.txt
18+
pip install -r bobotools/requirements.txt
1919
- name: Start test # 自动化测试
2020
run: |
21+
cd bobotools/
2122
pytest -s test.py

test.py renamed to bobotools/test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import torchvision.models as models
2-
from bobotools.torch_tools import Torch_Tools
3-
2+
from .torch_tools import Torch_Tools
3+
'''
4+
pytest自动化测试
5+
'''
46
#=================Torch工具类==============================
57
def test_get_model_info():
68
model = models.resnet18(pretrained=False)

bobotools/torch_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .common.tools import get_model_size,get_model_time
1+
from .com import get_model_size,get_model_time
22
class Torch_Tools(object):
33
"""
44
Pytorch操作

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
description="bobotools",
1515
long_description=open("README.md", "r").read(),
1616
long_description_content_type="text/markdown",
17-
version="0.4.5", # 版本
17+
version="0.4.6", # 版本
1818
install_requires=install_requires,
1919
python_requires=">=3.6",
2020
include_package_data=True,

0 commit comments

Comments
 (0)