Skip to content

Commit

Permalink
Remove py311 and update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
katxiao committed Jan 18, 2023
1 parent 731fff3 commit b387ec5
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 23 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,26 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10']
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- if: matrix.os == 'windows-latest'
- if: matrix.os == 'windows-latest' && matrix.python-version != '3.10'
name: Install dependencies - Windows
run: |
python -m pip install --upgrade pip
python -m pip install 'torch==1.8.0' -f https://download.pytorch.org/whl/cpu/torch/
python -m pip install 'torchvision==0.9.0' -f https://download.pytorch.org/whl/cpu/torchvision/
- if: matrix.os == 'windows-latest' && matrix.python-version == '3.10'
name: Install dependencies - Windows
run: |
python -m pip install --upgrade pip
python -m pip install 'torch==1.11.0' -f https://download.pytorch.org/whl/cpu/torch/
python -m pip install 'torchvision==0.9.0' -f https://download.pytorch.org/whl/cpu/torchvision/
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/minimum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,26 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10']
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- if: matrix.os == 'windows-latest'
- if: matrix.os == 'windows-latest' && matrix.python-version != 3.10
name: Install dependencies - Windows
run: |
python -m pip install --upgrade pip
python -m pip install 'torch==1.8.0' -f https://download.pytorch.org/whl/cpu/torch/
python -m pip install 'torchvision==0.9.0' -f https://download.pytorch.org/whl/cpu/torchvision/
- if: matrix.os == 'windows-latest' && matrix.python-version == 3.10
name: Install dependencies - Windows
run: |
python -m pip install --upgrade pip
python -m pip install 'torch==1.11.0' -f https://download.pytorch.org/whl/cpu/torch/
python -m pip install 'torchvision==0.9.0' -f https://download.pytorch.org/whl/cpu/torchvision/
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10']
os: [ubuntu-latest, macos-latest] # skip windows bc rundoc fails
steps:
- uses: actions/checkout@v1
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,26 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10']
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- if: matrix.os == 'windows-latest'
- if: matrix.os == 'windows-latest' && matrix.python-version != 3.10
name: Install dependencies - Windows
run: |
python -m pip install --upgrade pip
python -m pip install 'torch==1.8.0' -f https://download.pytorch.org/whl/cpu/torch/
python -m pip install 'torchvision==0.9.0' -f https://download.pytorch.org/whl/cpu/torchvision/
- if: matrix.os == 'windows-latest' && matrix.python-version == 3.10
name: Install dependencies - Windows
run: |
python -m pip install --upgrade pip
python -m pip install 'torch==1.11.0' -f https://download.pytorch.org/whl/cpu/torch/
python -m pip install 'torchvision==0.9.0' -f https://download.pytorch.org/whl/cpu/torchvision/
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Requirements

**SDGym** has been developed and tested on [Python 3.7, 3.8, 3.9, 3.10, and 3.11](https://www.python.org/downloads/)
**SDGym** has been developed and tested on [Python 3.7, 3.8, 3.9, and 3.10](https://www.python.org/downloads/)

Also, although it is not strictly required, the usage of a [virtualenv](
https://virtualenv.pypa.io/en/latest/) is highly recommended in order to avoid
Expand Down
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@
"scipy>=1.5.4,<2;python_version<'3.10'",
"scipy>=1.9.2,<2;python_version>='3.10'",
'tabulate>=0.8.3,<0.9',
'torch>=1.8.0,<2',
"torch>=1.8.0,<2;python_version<'3.10'",
"torch>=1.11.0,<2;python_version>='3.10'",
'tqdm>=4.15,<5',
'XlsxWriter>=1.2.8,<4',
'rdt>=1.2.1,<2.0',
'sdmetrics>=0.7.0,<1.0',
'rdt>=1.3.0.dev2,<2.0',
'sdmetrics>=0.9.0.dev0,<1.0',
'sdv>=0.17.1',
]

Expand All @@ -46,8 +47,8 @@
]

tests_require = [
'pytest>=3.4.2',
'pytest-cov>=2.6.0',
'pytest>=6.2.5,<7',
'pytest-cov>=2.6.0,<3',
'jupyter>=1.0.0,<2',
'rundoc>=0.4.3,<0.5',
]
Expand Down Expand Up @@ -92,7 +93,6 @@
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
],
description=(
Expand All @@ -117,7 +117,7 @@
keywords='machine learning synthetic data generation benchmark generative models',
name='sdgym',
packages=find_packages(include=['sdgym', 'sdgym.*']),
python_requires='>=3.7,<3.12',
python_requires='>=3.7,<3.11',
setup_requires=setup_requires,
test_suite='tests',
tests_require=tests_require,
Expand Down
17 changes: 10 additions & 7 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import operator
import os
import re
import pkg_resources
import platform
import shutil
import stat
Expand Down Expand Up @@ -53,15 +54,18 @@ def readme(c):


def _validate_python_version(line):
python_version_match = re.search(r"python_version(<=?|>=?)\'(\d\.?)+\'", line)
if python_version_match:
is_valid = True
for python_version_match in re.finditer(r"python_version(<=?|>=?|==)\'(\d\.?)+\'", line):
python_version = python_version_match.group(0)
comparison = re.search(r'(>=?|<=?)', python_version).group(0)
comparison = re.search(r'(>=?|<=?|==)', python_version).group(0)
version_number = python_version.split(comparison)[-1].replace("'", "")
comparison_function = COMPARISONS[comparison]
return comparison_function(platform.python_version(), version_number)
is_valid = is_valid and comparison_function(
pkg_resources.parse_version(platform.python_version()),
pkg_resources.parse_version(version_number),
)

return True
return is_valid


@task
Expand All @@ -74,8 +78,7 @@ def install_minimum(c):
for line in lines:
if started:
if line == ']':
started = False
continue
break

line = line.strip()
if _validate_python_version(line):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-lint, py3{7,8,9,10,11}-{integration,unit,minimum,readme}
envlist = py38-lint, py3{7,8,9,10}-{integration,unit,minimum,readme}

[testenv]
skipsdist = false
Expand Down

0 comments on commit b387ec5

Please sign in to comment.