Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.12 #289

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/minimum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, macos-latest] # skip windows bc rundoc fails
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -26,4 +26,4 @@ jobs:
run: invoke unit
- if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.8
name: Upload codecov report
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Before you submit a pull request, check that it meets these guidelines:
4. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
5. The pull request should work for Python 3.8, 3.9, 3.10 and 3.11. Check
5. The pull request should work for Python 3.8, 3.9, 3.10, 3.11 and 3.12. Check
https://github.com/sdv-dev/SDGym/actions
and make sure that all the checks pass.

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.8, 3.9, 3.10 and 3.11](https://www.python.org/downloads/)
**SDGym** has been developed and tested on [Python 3.8, 3.9, 3.10, 3.11 and 3.12](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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ lint: ## check style with flake8 and isort
fix-lint: ## fix lint issues using autoflake, autopep8, and isort
find sdgym tests -name '*.py' | xargs autoflake --in-place --remove-all-unused-imports --remove-unused-variables
autopep8 --in-place --recursive --aggressive sdgym tests
isort --apply --atomic --recursive sdgym tests
isort --apply --atomic sdgym tests


# TEST TARGETS
Expand Down
74 changes: 39 additions & 35 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,43 @@ classifiers = [
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
]
keywords = ['machine learning', 'synthetic data generation', 'benchmark', 'generative models']
dynamic = ['version']
license = { text = 'BSL-1.1' }
requires-python = '>=3.8,<3.12'
requires-python = '>=3.8,<3.13'
readme = 'README.md'
dependencies = [
'appdirs>=1.3',
'boto3>=1.15.0,<2',
'botocore>=1.18,<2',
'boto3>=1.28,<2',
'botocore>=1.31,<2',
'compress-pickle>=1.2.0',
'humanfriendly>=8.2',
"numpy>=1.20.0;python_version<'3.10'",
"numpy>=1.23.3;python_version>='3.10'",
"numpy>=1.23.3,<2;python_version>='3.10' and python_version<'3.12'",
"numpy>=1.26.0,<2;python_version>='3.12'",
"pandas>=1.1.3;python_version<'3.10'",
"pandas>=1.3.4;python_version>='3.10' and python_version<'3.11'",
"pandas>=1.5.0;python_version>='3.11'",
"pandas>=1.5.0;python_version>='3.11' and python_version<'3.12'",
"pandas>=2.1.1;python_version>='3.12'",
'psutil>=5.7',
"scikit-learn>=0.24,<2;python_version<'3.10'",
"scikit-learn>=1.1.3,<2;python_version>='3.10'",
"scikit-learn>=0.24;python_version<'3.10'",
"scikit-learn>=1.1.3;python_version>='3.10' and python_version<'3.12'",
"scikit-learn>=1.3.1;python_version>='3.12'",
"scipy>=1.5.4;python_version<'3.10'",
"scipy>=1.9.2;python_version>='3.10'",
"scipy>=1.9.2;python_version>='3.10' and python_version<'3.12'",
"scipy>=1.12.0;python_version>='3.12'",
'tabulate>=0.8.3,<0.9',
"torch>=1.8.0;python_version<'3.10'",
"torch>=1.11.0;python_version>='3.10' and python_version<'3.11'",
"torch>=2.0.0;python_version>='3.11'",
'tqdm>=4.15',
"torch>=2.0.0;python_version>='3.10' and python_version<'3.12'",
"torch>=2.2.0;python_version>='3.12'",
'tqdm>=4.29',
'XlsxWriter>=1.2.8',
'rdt>=1.6.1',
'sdmetrics>=0.11.0',
'sdv>=1.3.0',
'rdt>=1.11.0',
'sdmetrics>=0.14.0',
'sdv>=1.12.0',
]

[project.urls]
Expand All @@ -59,7 +64,7 @@ sdgym = { main = 'sdgym.cli.__main__:main' }
[project.optional-dependencies]
dask = ['dask', 'distributed']
test = [
'pytest>=3.4.2',
'pytest>=6.2.5',
'pytest-cov>=2.6.0',
'jupyter>=1.0.0,<2',
'rundoc>=0.4.3,<0.5',
Expand All @@ -72,43 +77,43 @@ dev = [
'build>=1.0.0,<2',
'bump-my-version>=0.18.3,<1',
'pip>=9.0.1',
'watchdog>=0.8.3,<0.11',
'watchdog>=1.0.1,<5',

# style check
'flake8>=3.7.7,<4',
'flake8>=3.7.7,<8',
'flake8-absolute-import>=1.0,<2',
'flake8-builtins>=1.5.3,<1.6',
'flake8-comprehensions>=3.6.1,<3.7',
'flake8-debugger>=4.0.0,<4.1',
'flake8-builtins>=1.5.3,<3',
'flake8-comprehensions>=3.6.1,<4',
'flake8-debugger>=4.0.0,<5',
'flake8-docstrings>=1.5.0,<2',
'flake8-eradicate>=1.1.0,<1.2',
'flake8-eradicate>=1.1.0,<2',
'flake8-fixme>=1.1.1,<1.2',
'flake8-mock>=0.3,<0.4',
'flake8-mock>=0.3,<1',
'flake8-multiline-containers>=0.0.18,<0.1',
'flake8-mutable>=1.2.0,<1.3',
'flake8-expression-complexity>=0.0.9,<0.1',
'flake8-print>=4.0.0,<4.1',
'flake8-pytest-style>=1.5.0,<2',
'flake8-pytest-style>=2.0.0,<3',
'flake8-quotes>=3.3.0,<4',
'flake8-sfs>=0.0.3,<0.1',
'flake8-sfs>=0.0.3,<2',
'flake8-variables-names>=0.0.4,<0.1',
'dlint>=0.11.0,<0.12',
'isort>=4.3.4,<5',
'pandas-vet>=0.2.3,<0.3',
'pep8-naming>=0.12.1,<0.13',
'pydocstyle>=6.1.1,<6.2',
'dlint>=0.11.0,<1',
'isort>=5.13.2,<6',
'pandas-vet>=0.2.3,<2024',
'pep8-naming>=0.12.1,<1',
'pydocstyle>=6.1.1,<7',

# fix style issues
'autoflake>=1.1,<2',
'autopep8>=1.4.3,<2',
'autoflake>=1.1,<3',
'autopep8>=1.4.3,<3',

# distribute on PyPI
'twine>=1.10.0,<4',
'twine>=1.10.0,<6',
'wheel>=0.30.0',

# Advanced testing
'coverage>=4.5.1,<6',
'tox>=2.9.1,<4',
'coverage>=4.5.12,<8',
'tox>=2.9.1,<5',
'importlib-metadata>=3.6',

# Invoke
Expand Down Expand Up @@ -156,7 +161,6 @@ version = {attr = 'sdgym.__version__'}
line_length = 99
lines_between_types = 0
multi_line_output = 4
not_skip = ['__init__.py']
use_parentheses = true

[tool.pydocstyle]
Expand Down
15 changes: 11 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@
max-line-length = 99
inline-quotes = single
exclude = docs, .tox, .git, __pycache__, .ipynb_checkpoints, sdgym/cli
extend-ignore = D105, # Missing docstring in magic method
D107, # Missing docstring in __init__
PD005, # Use arithmetic operator instead of method
SFS3 # String literal formatting using f-string
extend-ignore =
# Missing docstring in magic method
D105,
# Missing docstring in __init__
D107,
# Use arithmetic operator instead of method
PD005,
# String literal formatting using f-string
SFS3,
# TokenError: unterminated string literal
E902

[aliases]
test = pytest
3 changes: 1 addition & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sys
from pathlib import Path

import pkg_resources
import tomli
from invoke import task
from packaging.requirements import Requirement
Expand Down Expand Up @@ -113,7 +112,7 @@ def lint(c):
c.run('pydocstyle sdgym')
c.run('flake8 tests --ignore=D')
c.run('pydocstyle tests')
c.run('isort -c --recursive sdgym tests')
c.run('isort -c sdgym tests')


def remove_readonly(func, path, _):
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{8,9,10,11}-{integration,unit,minimum,readme}
envlist = py38-lint, py3{8,9,10,11,12}-{integration,unit,minimum,readme}

[testenv]
skipsdist = false
Expand Down
Loading