diff --git a/.gitignore b/.gitignore index 8c2653b..5e14552 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +dist/* *.db **/__pycache__/** *.egg-info/ @@ -34,4 +35,4 @@ *build debug.py pyvenv.cfg -intro.ipynb \ No newline at end of file +intro.ipynb diff --git a/readme.md b/README.md similarity index 95% rename from readme.md rename to README.md index 932d20a..28c9128 100644 --- a/readme.md +++ b/README.md @@ -8,7 +8,13 @@ See examples in `notebooks/introduction.ipynb`.

-install (preferably in a `venv`) with +- install + +``` +pip install duckreg +``` + +- dev install (preferably in a `venv`) with ``` (uv) pip install git+https://github.com/apoorvalal/duckreg.git ``` @@ -28,7 +34,7 @@ $$ 3. `DuckDoubleDemeaning`: Double demeaning regression, which compresses the data to y averages by all values of $w$ after demeaning. This also eliminates unit and time FEs $$ -y \sim (W\_{it} - \bar{w}\_{i, .} - \bar{w}\_{., t} + \bar{w}\_{., .}) +y \sim (W\_{it} - \bar{w}\_{i, .} - \bar{w}\_{., t} + \bar{w}\_{., .}) $$ 4. `DuckMundlakEventStudy`: Two-way mundlak with dynamic treatment effects. This incorporates treatment-cohort FEs ($\psi\_i$), time-period FEs ($\gamma\_t$) and dynamic treatment effects $\tau\_k$ given by cohort X time interactions. @@ -37,7 +43,7 @@ $$ y \sim \psi\_i + \gamma\_t + \sum\_{k=1}^{T} \tau\_{k} D\_i 1(t = k) $$ -All the above regressions are run in compressed fashion with `duckdb`. +All the above regressions are run in compressed fashion with `duckdb`. --- references: diff --git a/setup.py b/setup.py index 1c24857..df00828 100644 --- a/setup.py +++ b/setup.py @@ -1,22 +1,47 @@ from setuptools import setup, find_packages +import os +here = os.path.abspath(os.path.dirname(__file__)) -# Function to read the contents of the requirements.txt file def read_requirements(): - with open("requirements.txt", "r") as req: - return req.read().splitlines() + try: + with open(os.path.join(here, "requirements.txt"), "r") as req: + return req.read().splitlines() + except FileNotFoundError: + return [] +def read_long_description(): + try: + with open(os.path.join(here, "README.md"), "r", encoding="utf-8") as fh: + return fh.read() + except FileNotFoundError: + return "" setup( name="duckreg", - version="0.1", + version="0.1.1", # Use semantic versioning packages=find_packages(), install_requires=read_requirements(), - # Additional metadata about your package author="Apoorva Lal", author_email="lal.apoorva@gmail.com", description="A package for Regression in compressed representation powered by DuckDB", + long_description=read_long_description(), + long_description_content_type="text/markdown", license="MIT", keywords="statistics, econometrics, sufficient statistics, bootstrap", url="https://github.com/apoorvalal/duckreg", + classifiers=[ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + ], + python_requires='>=3.7', + include_package_data=True, + package_data={ + 'duckreg': ['*.py'], + }, )