Skip to content

Commit f2c6e26

Browse files
Merge pull request #175 from runpod/update-release-notes
Update release notes
2 parents 4527762 + b4b7cd0 commit f2c6e26

File tree

9 files changed

+42
-39
lines changed

9 files changed

+42
-39
lines changed

.github/workflows/CI-pylint.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ jobs:
3030
- name: Install Dependencies
3131
run: |
3232
python -m pip install --upgrade pip
33-
pip install -r requirements.txt
34-
pip install pylint
35-
pip install pytest
33+
pip install .[test]
3634
3735
- name: Pylint Source
3836
run: |
39-
find . -type f -name '*.py' | xargs pylint --extension-pkg-whitelist='pydantic'
37+
find . -type f -name '*.py' | grep -v './build/' | xargs pylint --extension-pkg-whitelist='pydantic'

.github/workflows/CI-tests.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,8 @@ jobs:
3030
- name: Install Dependencies
3131
run: |
3232
python -m pip install --upgrade pip
33-
pip install -r requirements.txt
34-
pip install pytest
35-
pip install pytest-timeout
36-
pip install pytest-cov
37-
pip install pytest-asyncio
33+
pip install .[test]
3834
3935
- name: Run Tests
4036
run: |
41-
pytest --timeout=120 --timeout_method=thread --cov=runpod --cov-report=xml --cov-report=term-missing --cov-fail-under=100 -W error -p no:cacheprovider -p no:unraisableexception
37+
pytest --ignore=build --timeout=120 --timeout_method=thread --cov=runpod --cov-report=xml --cov-report=term-missing --cov-fail-under=100 -W error -p no:cacheprovider -p no:unraisableexception

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Change Log
22

3-
## Release 1.3.0 (TBD)
3+
## Release 1.3.0 (10/12/23)
44

55
### Changes
66

77
- Backwards compatibility with Python >= 3.8
8+
- Consolidated install dependencies to `requirements.txt`
89

910
### Fixed
1011

requirements.txt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
1-
aiohttp >= 3.8.4
1+
aiohttp >= 3.8.6
22
aiohttp-retry >= 2.8.3
33

44
backoff == 2.2.1
55
boto3 >= 1.26.165
66
click >= 8.1.7
7+
fastapi[all] >= 0.94.0
78
pillow >= 9.5.0
89
py-cpuinfo == 9.0.0
910
python-dotenv >= 1.0.0
1011
requests >= 2.31.0
1112
tomli >= 2.0.1
1213
tqdm-loggable == 0.1.4
13-
setuptools_scm == 8.0.4
14-
15-
fastapi[all] >= 0.94.0
16-
17-
# Minimum versions for dependencies
1814
urllib3 >= 1.26.6
19-
20-
# Testing Requirements
21-
nest_asyncio == 1.5.8
15+
setuptools_scm == 8.0.4

runpod/version.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
from pkg_resources import get_distribution, DistributionNotFound
44

5-
try:
6-
__version__ = get_distribution("runpod").version
7-
except DistributionNotFound:
8-
__version__ = "unknown"
5+
def get_version():
6+
""" Get the version of runpod-python """""
7+
try:
8+
return get_distribution("runpod").version
9+
except DistributionNotFound:
10+
return "unknown"
11+
12+
__version__ = get_version()

setup.cfg

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,13 @@ classifiers =
2828
include_package_data = true
2929
packages = find:
3030
python_requires = >= 3.8
31-
install_requires =
32-
aiohttp >= 3.8.4
33-
aiohttp-retry >= 2.8.3
34-
backoff >= 2.2.1
35-
boto3 >= 1.26.165
36-
click >= 8.1.7
37-
pillow >= 9.5.0
38-
py-cpuinfo >= 9.0.0
39-
python-dotenv >= 1.0.0
40-
requests >= 2.31.0
41-
tomli >= 2.0.1
42-
tqdm-loggable >= 0.1.4
43-
fastapi[all] >= 0.94.0
4431

45-
# Minimum versions for dependencies
46-
urllib3 >= 1.26.6
4732

4833
[options.extras_require]
4934
test =
5035
asynctest
5136
nest_asyncio
37+
pylint
5238
pytest
5339
pytest-cov
5440
pytest-timeout

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@
55

66
from setuptools import setup
77

8+
with open('requirements.txt', encoding="UTF-8") as requirements_file:
9+
requirements = requirements_file.read().splitlines()
10+
811
if __name__ == "__main__":
912
setup(
1013
name='runpod',
1114
use_scm_version=True,
1215
setup_requires=['setuptools_scm'],
16+
install_requires=requirements,
1317

1418
entry_points={
1519
'console_scripts': [

tests/test_shared/test_auth.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'''
22
Test shared functions related to authentication
33
'''
4+
45
import unittest
56
import importlib
67

tests/test_version.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
""" Test the version module """
2+
3+
from unittest.mock import patch, Mock
4+
from pkg_resources import DistributionNotFound
5+
from runpod.version import get_version
6+
7+
def test_version_found():
8+
""" Test that the version is found """
9+
with patch('runpod.version.get_distribution') as mock_get_distribution:
10+
mock_get_distribution.return_value = Mock(version='1.0.0')
11+
assert get_version() == '1.0.0'
12+
assert mock_get_distribution.called
13+
14+
def test_version_not_found():
15+
""" Test that the version is not found """
16+
with patch('runpod.version.get_distribution') as mock_get_distribution:
17+
mock_get_distribution.side_effect = DistributionNotFound
18+
assert get_version() == 'unknown'
19+
assert mock_get_distribution.called

0 commit comments

Comments
 (0)