Skip to content

Commit

Permalink
Merge pull request #335 from StateFarmIns/packaging-improvements
Browse files Browse the repository at this point in the history
Packaging improvements
  • Loading branch information
guillermo-navas-palencia authored Oct 14, 2024
2 parents 8de83e4 + d4ab315 commit 6773258
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 27 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']

python-version: ['3.7', '3.8', '3.9', '3.10', "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macos-12]

steps:
Expand Down
33 changes: 7 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#!/usr/bin/env python

import os
import sys

from setuptools import find_packages, setup, Command
from setuptools.command.test import test as TestCommand


long_description = '''
The optimal binning is the optimal discretization of a variable into bins
Expand Down Expand Up @@ -34,20 +31,6 @@ def run(self):
os.system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info')


# test suites
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = []

def run_tests(self):
# import here, because outside the eggs aren't loaded
import pytest
errcode = pytest.main(self.test_args)
sys.exit(errcode)


# install requirements
install_requires = [
'matplotlib',
Expand All @@ -59,15 +42,10 @@ def run_tests(self):
'scipy>=1.6.0',
]

# test requirements
tests_require = [
'pytest',
'coverage'
]

# extra requirements
extras_require = {
'distributed': ['pympler', 'tdigest'],
'test': ['coverage', 'flake8', 'pytest', 'pyarrow'],
}


Expand All @@ -89,10 +67,9 @@ def run_tests(self):
include_package_data=True,
license="Apache Licence 2.0",
url="https://github.com/guillermo-navas-palencia/optbinning",
cmdclass={'clean': CleanCommand, 'test': PyTest},
cmdclass={'clean': CleanCommand},
python_requires='>=3.7',
install_requires=install_requires,
tests_require=tests_require,
extras_require=extras_require,
classifiers=[
'Topic :: Scientific/Engineering :: Mathematics',
Expand All @@ -105,5 +82,9 @@ def run_tests(self):
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9']
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
]
)

0 comments on commit 6773258

Please sign in to comment.