-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from mkopec87/feature/switch-to-toml
* Switch from setup.py to pyproject.toml
- Loading branch information
Showing
7 changed files
with
126 additions
and
181 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
"""THIS FILE IS AUTO-GENERATED BY SETUP.PY.""" | ||
|
||
import re | ||
from typing import Tuple | ||
|
||
name = "histogrammar" | ||
__version__ = "1.0.34" | ||
version = "1.0.34" | ||
full_version = "1.0.34" | ||
release = True | ||
|
||
version_info = tuple(re.split(r"[-\.]", __version__)) | ||
specification = ".".join(version_info[:2]) | ||
|
||
def split_version_string(version_string: str) -> Tuple[int, int]: | ||
version_numbers = list(map(int, re.split(r"[-.]", version_string))) | ||
return version_numbers[0], version_numbers[1] | ||
|
||
|
||
specification = ".".join([str(i) for i in split_version_string(version)[:2]]) | ||
|
||
|
||
def compatible(serialized_version: str) -> bool: | ||
self_major, self_minor = split_version_string(version) | ||
other_major, other_minor = split_version_string(serialized_version) | ||
|
||
def compatible(serializedVersion): | ||
selfMajor, selfMinor = map(int, version_info[:2]) | ||
otherMajor, otherMinor = map(int, re.split(r"[-\.]", serializedVersion)[:2]) | ||
if selfMajor >= otherMajor: | ||
if self_major >= other_major: | ||
return True | ||
elif selfMinor >= otherMinor: | ||
elif self_minor >= other_minor: | ||
return True | ||
else: | ||
return False |
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,78 @@ | ||
[build-system] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "histogrammar" | ||
description = "Composable histogram primitives for distributed data reduction" | ||
keywords = [ | ||
"pandas", | ||
"spark", | ||
"data-science", | ||
"data-analysis", | ||
"statistics", | ||
"python", | ||
"jupyter", | ||
"ipython" | ||
] | ||
readme = "README.rst" | ||
requires-python = ">=3.9" | ||
authors = [{ name = "Jim Pivarski (DIANA-HEP)", email = "pivarski@fnal.gov" }, { name = "Max Baak", email = "maxbaak@gmail.com" }] | ||
maintainers = [{ name = "Max Baak", email = "maxbaak@gmail.com" }] | ||
license = { type = "Apache Software License v2", file = "LICENSE" } | ||
dependencies = [ | ||
"numpy", | ||
"tqdm", | ||
"joblib>=0.14.0" | ||
] | ||
classifiers = ["Development Status :: 5 - Production/Stable", | ||
"Environment :: Console", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Topic :: Scientific/Engineering :: Information Analysis", | ||
"Topic :: Scientific/Engineering :: Mathematics", | ||
"Topic :: Scientific/Engineering :: Physics", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.optional-dependencies] | ||
pandas = [ | ||
"pandas" | ||
] | ||
spark = [ | ||
"pyspark>=3.1; python_version <= '3.11'", | ||
] | ||
test = [ | ||
"ipykernel>=5.1.3", | ||
"jupyter_client>=5.2.3", | ||
"matplotlib", | ||
"pandas", | ||
"pre-commit>=2.9.0", | ||
"pytest-notebook>=0.6.1", | ||
"pytest>=4.0.2", | ||
] | ||
test_numpy_pre2 = [ | ||
"numpy<2", | ||
"pandas<2", | ||
] | ||
|
||
# files to be shipped with the installation, under: histogrammar/test_data and histogrammar/notebooks | ||
# after installation, these can be found with the functions in resources.py | ||
[tool.setuptools.package-data] | ||
histogrammar = [ | ||
"test_data/*.csv.gz", | ||
"test_data/*.json*", | ||
"notebooks/*tutorial*.ipynb", | ||
] | ||
|
||
[project.urls] | ||
repository = "https://github.com/histogrammar/histogrammar-python" | ||
|
||
[tool.semantic_release] | ||
version_variable = [ | ||
"histogrammar/version.py:version", | ||
] | ||
build_command = "pip install build && python -m build" | ||
|
||
[tool.setuptools.dynamic] | ||
version = { attr = "histogrammar.version.version" } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.