-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transition from using setup.py to pyproject.toml to specify project m…
…etadata (#89)
- Loading branch information
Showing
7 changed files
with
135 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,29 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
[build-system] | ||
requires = ['setuptools', 'wheel'] | ||
build-backend = 'setuptools.build_meta' | ||
|
||
"""The setup script.""" | ||
|
||
from setuptools import setup, find_packages | ||
|
||
with open('README.md', encoding='utf-8') as readme_file: | ||
readme = readme_file.read() | ||
|
||
with open('HISTORY.md', encoding='utf-8') as history_file: | ||
history = history_file.read() | ||
|
||
install_requires = [ | ||
[project] | ||
name = 'deepecho' | ||
description = 'Create sequential synthetic data of mixed types using a GAN.' | ||
authors = [{ name = 'DataCebo, Inc.', email = '[email protected]' }] | ||
classifiers = [ | ||
'Development Status :: 2 - Pre-Alpha', | ||
'Intended Audience :: Developers', | ||
'License :: Free for non-commercial use', | ||
'Natural Language :: English', | ||
'Programming Language :: Python :: 3', | ||
'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', | ||
] | ||
keywords = ['deepecho', 'DeepEcho'] | ||
version = '0.5.1.dev0' | ||
license = { text = 'BSL-1.1' } | ||
requires-python = '>=3.8,<3.12' | ||
readme = 'README.md' | ||
dependencies = [ | ||
"numpy>=1.20.0,<2;python_version<'3.10'", | ||
"numpy>=1.23.3,<2;python_version>='3.10'", | ||
"pandas>=1.1.3;python_version<'3.10'", | ||
|
@@ -23,19 +35,25 @@ | |
'tqdm>=4.15,<5', | ||
] | ||
|
||
setup_requires = [ | ||
'pytest-runner>=2.11.1', | ||
] | ||
[project.urls] | ||
"Source Code"= "https://github.com/sdv-dev/Deepecho/" | ||
"Issue Tracker" = "https://github.com/sdv-dev/Deepecho/issues" | ||
"Twitter" = "https://twitter.com/sdv_dev" | ||
"Chat" = "https://bit.ly/sdv-slack-invite" | ||
|
||
tests_require = [ | ||
[project.optional-dependencies] | ||
test = [ | ||
'pytest>=3.4.2', | ||
'pytest-cov>=2.6.0', | ||
'pytest-rerunfailures>=9.0.0,<10', | ||
'jupyter>=1.0.0,<2', | ||
'rundoc>=0.4.3,<0.5', | ||
'pytest-runner >= 2.11.1', | ||
'tomli>=2.0.0,<3', | ||
] | ||
dev = [ | ||
'deepecho[test]', | ||
|
||
development_requires = [ | ||
# general | ||
'setuptools<49.2', | ||
'bumpversion>=0.5.3,<0.6', | ||
|
@@ -79,39 +97,20 @@ | |
'invoke' | ||
] | ||
|
||
setup( | ||
author='DataCebo, Inc.', | ||
author_email='[email protected]', | ||
classifiers=[ | ||
'Development Status :: 2 - Pre-Alpha', | ||
'Intended Audience :: Developers', | ||
'License :: Free for non-commercial use', | ||
'Natural Language :: English', | ||
'Programming Language :: Python :: 3', | ||
'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='Create sequential synthetic data of mixed types using a GAN.', | ||
extras_require={ | ||
'test': tests_require, | ||
'dev': development_requires + tests_require, | ||
}, | ||
include_package_data=True, | ||
install_requires=install_requires, | ||
keywords='deepecho deepecho DeepEcho', | ||
license='BSL-1.1', | ||
long_description=readme + '\n\n' + history, | ||
long_description_content_type='text/markdown', | ||
name='deepecho', | ||
packages=find_packages(include=['deepecho', 'deepecho.*']), | ||
python_requires='>=3.8,<3.12', | ||
setup_requires=setup_requires, | ||
test_suite='tests', | ||
tests_require=tests_require, | ||
url='https://github.com/sdv-dev/DeepEcho', | ||
version='0.5.1.dev0', | ||
zip_safe=False, | ||
) | ||
[tool.setuptools] | ||
include-package-data = true | ||
|
||
[tool.setuptools.packages.find] | ||
include = ['deepecho', 'deepecho.*'] | ||
namespaces = false | ||
|
||
[tool.isort] | ||
include_trailing_comment = true | ||
line_length = 99 | ||
lines_between_types = 0 | ||
multi_line_output = 4 | ||
not_skip = ['__init__.py'] | ||
use_parentheses = true | ||
|
||
[tool.pytest.ini_options] | ||
collect_ignore = ['pyproject.toml'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
"""Tests for the ``tasks.py`` file.""" | ||
from tasks import _get_minimum_versions | ||
|
||
|
||
def test_get_minimum_versions(): | ||
"""Test the ``_get_minimum_versions`` method. | ||
The method should return the minimum versions of the dependencies for the given python version. | ||
If a library is linked to an URL, the minimum version should be the URL. | ||
""" | ||
# Setup | ||
dependencies = [ | ||
"numpy>=1.20.0,<2;python_version<'3.10'", | ||
"numpy>=1.23.3,<2;python_version>='3.10'", | ||
"pandas>=1.2.0,<2;python_version<'3.10'", | ||
"pandas>=1.3.0,<2;python_version>='3.10'", | ||
'humanfriendly>=8.2,<11', | ||
'pandas @ git+https://github.com/pandas-dev/pandas.git@master#egg=pandas' | ||
] | ||
|
||
# Run | ||
minimum_versions_39 = _get_minimum_versions(dependencies, '3.9') | ||
minimum_versions_310 = _get_minimum_versions(dependencies, '3.10') | ||
|
||
# Assert | ||
expected_versions_39 = [ | ||
'numpy==1.20.0', | ||
'pandas @ git+https://github.com/pandas-dev/pandas.git@master#egg=pandas', | ||
'humanfriendly==8.2', | ||
] | ||
expected_versions_310 = [ | ||
'numpy==1.23.3', | ||
'pandas @ git+https://github.com/pandas-dev/pandas.git@master#egg=pandas', | ||
'humanfriendly==8.2', | ||
] | ||
|
||
assert minimum_versions_39 == expected_versions_39 | ||
assert minimum_versions_310 == expected_versions_310 |