-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: testing with python version 3.9.13 and 3.9.17
- Loading branch information
1 parent
b2dd123
commit e63de98
Showing
5 changed files
with
62 additions
and
46 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 |
---|---|---|
|
@@ -7,15 +7,15 @@ | |
|
||
here = pathlib.Path(__file__).parent.resolve() | ||
|
||
version_file = here / 'VERSION' | ||
version_file = here / "VERSION" | ||
|
||
# Get the long description from the README file | ||
long_description = (here / 'README.md').read_text(encoding='utf-8') | ||
long_description = (here / "README.md").read_text(encoding="utf-8") | ||
|
||
|
||
def format_git_describe_version(version): | ||
if '-' in version: | ||
splitted = version.split('-') | ||
if "-" in version: | ||
splitted = version.split("-") | ||
tag = splitted[0] | ||
index = f"dev{splitted[1]}" | ||
return f"{tag}.{index}" | ||
|
@@ -25,17 +25,19 @@ def format_git_describe_version(version): | |
|
||
def get_version_from_git(): | ||
try: | ||
process = subprocess.run(["git", "describe"], cwd=str(here), check=True, capture_output=True) | ||
version = process.stdout.decode('utf-8').strip() | ||
process = subprocess.run( | ||
["git", "describe"], cwd=str(here), check=True, capture_output=True | ||
) | ||
version = process.stdout.decode("utf-8").strip() | ||
version = format_git_describe_version(version) | ||
with version_file.open('w') as f: | ||
with version_file.open("w") as f: | ||
f.write(version) | ||
return version | ||
except subprocess.CalledProcessError: | ||
if version_file.exists(): | ||
return version_file.read_text().strip() | ||
else: | ||
return '0.1.0' | ||
return "0.1.0" | ||
|
||
|
||
version = get_version_from_git() | ||
|
@@ -47,7 +49,7 @@ def get_version_from_git(): | |
class GetVersionCommand(distutils.cmd.Command): | ||
"""A custom command to get the current project version inferred from git describe.""" | ||
|
||
description = 'gets the project version from git describe' | ||
description = "gets the project version from git describe" | ||
user_options = [] | ||
|
||
def initialize_options(self): | ||
|
@@ -63,7 +65,7 @@ def run(self): | |
class DownloadDatasets(distutils.cmd.Command): | ||
"""A custom command to download the datasets used in the examples.""" | ||
|
||
description = 'downloads the datasets used in the examples' | ||
description = "downloads the datasets used in the examples" | ||
user_options = [] | ||
|
||
def initialize_options(self): | ||
|
@@ -74,6 +76,7 @@ def finalize_options(self): | |
|
||
def run(self): | ||
import psyki | ||
|
||
try: | ||
from test.resources.data import DATASETS | ||
|
||
|
@@ -84,50 +87,50 @@ def run(self): | |
|
||
|
||
setup( | ||
name='psyki', # Required | ||
name="psyki", # Required | ||
version=version, | ||
description='Python-based implementation of PSyKI, i.e. a Platform for Symbolic Knowledge Injection', | ||
license='Apache 2.0 License', | ||
description="Python-based implementation of PSyKI, i.e. a Platform for Symbolic Knowledge Injection", | ||
license="Apache 2.0 License", | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
url='https://github.com/psykei/psyki-python', | ||
author='Matteo Magnini', | ||
author_email='[email protected]', | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/psykei/psyki-python", | ||
author="Matteo Magnini", | ||
author_email="[email protected]", | ||
classifiers=[ | ||
'Development Status :: 3 - Alpha', | ||
'Intended Audience :: Developers', | ||
'Topic :: Software Development :: Libraries', | ||
'Topic :: Scientific/Engineering :: Artificial Intelligence', | ||
'License :: OSI Approved :: Apache Software License', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3 :: Only', | ||
'Programming Language :: Prolog' | ||
"Development Status :: 3 - Alpha", | ||
"Intended Audience :: Developers", | ||
"Topic :: Software Development :: Libraries", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Prolog", | ||
], | ||
keywords='symbolic knowledge injection, ski, symbolic ai', # Optional | ||
keywords="symbolic knowledge injection, ski, symbolic ai", # Optional | ||
# package_dir={'': 'src'}, # Optional | ||
packages=find_packages(), # Required | ||
include_package_data=True, | ||
python_requires='>=3.9.13, <3.10', | ||
python_requires=">=3.9.13, <3.10", | ||
install_requires=[ | ||
'tensorflow>=2.14.1,<2.15.0', | ||
'numpy>=1.22.3', | ||
'2ppy>=0.4.0', | ||
'scikit-learn>=1.0.2', | ||
'pandas>=1.4.2', | ||
'codecarbon>=2.2.4,<2.3.0', | ||
'prometheus_client>=0.17.0' | ||
"tensorflow>=2.14.1,<2.15.0", | ||
"numpy>=1.22.3", | ||
"2ppy>=0.4.0", | ||
"scikit-learn>=1.0.2", | ||
"pandas>=1.4.2", | ||
"codecarbon>=2.2.4,<2.3.0", | ||
"prometheus_client>=0.17.0", | ||
], # Optional | ||
zip_safe = False, | ||
platforms = "Independant", | ||
zip_safe=False, | ||
platforms="Independant", | ||
project_urls={ # Optional | ||
'Bug Reports': 'https://github.com/psykei/psyki-python/issues', | ||
"Bug Reports": "https://github.com/psykei/psyki-python/issues", | ||
# 'Funding': 'https://donate.pypi.org', | ||
# 'Say Thanks!': 'http://saythanks.io/to/example', | ||
'Source': 'https://github.com/psykei/psyki-python', | ||
"Source": "https://github.com/psykei/psyki-python", | ||
}, | ||
cmdclass={ | ||
'get_project_version': GetVersionCommand, | ||
'download_datasets': DownloadDatasets | ||
"get_project_version": GetVersionCommand, | ||
"download_datasets": DownloadDatasets, | ||
}, | ||
) |
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