Skip to content

Commit

Permalink
Update installers
Browse files Browse the repository at this point in the history
  • Loading branch information
thedatadavis committed Sep 7, 2024
1 parent 40711d2 commit 2f01706
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
8 changes: 6 additions & 2 deletions dar/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Darrell Analytics Runner (dar)
# Darrell

A CLI tool for orchestrating dbt and Evidence BI.
## What is Darrell?
An open source analytics stack for nimble data teams that wraps dbt and Evidence BI.

## How does it work?
More details coming soon.
16 changes: 11 additions & 5 deletions dar/dar/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

@click.command()
@click.option('--path', default='analytics', help='Path to create the analytics directory')
def install_analytics(path):
def setup(path):
"""Install and set up the analytics environment"""
# Create analytics directory
os.makedirs(path, exist_ok=True)
os.chdir(path)

# Install dbt
click.echo("Installing dbt...")
subprocess.run(["pip", "install", "dbt-core", "dbt-postgres"])
subprocess.run(["pip", "install", "dbt-core", "dbt-duckdb"])

# Initialize dbt project
click.echo("Initializing dbt project...")
Expand All @@ -23,9 +23,15 @@ def install_analytics(path):
subprocess.run(["npx", "degit", "evidence-dev/template", "reports"])
subprocess.run(["npm", "--prefix", "./reports", "install"])

# Create additional directories
dirs = ['analyses', 'docs', 'macros', 'seeds', 'snapshots', 'tests']
# Create additional directories in analytics directory
dirs = ['data', 'scripts']
for dir_name in dirs:
os.makedirs(os.path.join(path, dir_name), exist_ok=True)
os.makedirs(dir_name, exist_ok=True)

click.echo("Analytics environment set up successfully!")
click.echo("Analytics folder set up successfully!")

## Make 'site' directory at same level as 'analytics' directory
os.makedirs('site', exist_ok=True)

click.echo("Site folder set up successfully!")
16 changes: 8 additions & 8 deletions dar/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
long_description = fh.read()

setup(
name="dar",
name="Darrell",
version="0.1.0",
author="Your Name",
author_email="your.email@example.com",
description="Darrell Analytics Runner: dbt and Evidence BI orchestrator",
author="Chris Davis",
author_email="chris@bootstrapital.com",
description="Darrell - Open Source Analytics Stack",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/yourusername/dar",
url="https://github.com/bootstrapital/darrell",
packages=find_packages(),
install_requires=[
"click",
Expand All @@ -29,9 +29,9 @@
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
python_requires=">=3.7",
python_requires=">=3.9",
)

0 comments on commit 2f01706

Please sign in to comment.