Technologic101 commited on
Commit
ec2933c
·
1 Parent(s): 5960996

build: begin packages and environment

Browse files
Files changed (5) hide show
  1. .gitignore +8 -1
  2. notebook.ipynb +68 -1
  3. pyproject.toml +67 -0
  4. requirements.txt +0 -26
  5. uv.lock +0 -0
.gitignore CHANGED
@@ -4,4 +4,11 @@
4
  .env.test.local
5
  .env.production.local
6
 
7
- .venv
 
 
 
 
 
 
 
 
4
  .env.test.local
5
  .env.production.local
6
 
7
+ .venv
8
+
9
+ .ipynb_checkpoints
10
+
11
+ .chainlit
12
+
13
+ .chainlit/cache
14
+
notebook.ipynb CHANGED
@@ -1 +1,68 @@
1
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "metadata": {},
6
+ "source": [
7
+ "# CSS Zen Garden Scraper\n",
8
+ "\n",
9
+ "This notebook scrapes CSS Zen Garden designs and captures screenshots at different viewport sizes."
10
+ ]
11
+ },
12
+ {
13
+ "cell_type": "code",
14
+ "execution_count": 1,
15
+ "metadata": {},
16
+ "outputs": [],
17
+ "source": [
18
+ "# Setup and imports\n",
19
+ "import asyncio\n",
20
+ "from playwright.async_api import async_playwright\n",
21
+ "import os\n",
22
+ "import json\n",
23
+ "from bs4 import BeautifulSoup\n",
24
+ "import requests\n",
25
+ "from pathlib import Path\n",
26
+ "import pandas as pd\n",
27
+ "from typing import List, Dict, Any"
28
+ ]
29
+ },
30
+ {
31
+ "cell_type": "code",
32
+ "execution_count": null,
33
+ "metadata": {},
34
+ "outputs": [],
35
+ "source": [
36
+ "# Create directories\n",
37
+ "BASE_DIR = Path('zen_garden_data')\n",
38
+ "SCREENSHOTS_DIR = BASE_DIR / 'screenshots'\n",
39
+ "CSS_DIR = BASE_DIR / 'css'\n",
40
+ "METADATA_DIR = BASE_DIR / 'metadata'\n",
41
+ "\n",
42
+ "for dir_path in [BASE_DIR, SCREENSHOTS_DIR, CSS_DIR, METADATA_DIR]:\n",
43
+ " dir_path.mkdir(parents=True, exist_ok=True)"
44
+ ]
45
+ }
46
+ ],
47
+ "metadata": {
48
+ "kernelspec": {
49
+ "display_name": ".venv",
50
+ "language": "python",
51
+ "name": "python3"
52
+ },
53
+ "language_info": {
54
+ "codemirror_mode": {
55
+ "name": "ipython",
56
+ "version": 3
57
+ },
58
+ "file_extension": ".py",
59
+ "mimetype": "text/x-python",
60
+ "name": "python",
61
+ "nbconvert_exporter": "python",
62
+ "pygments_lexer": "ipython3",
63
+ "version": "3.11.11"
64
+ }
65
+ },
66
+ "nbformat": 4,
67
+ "nbformat_minor": 2
68
+ }
pyproject.toml ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "ImagineUI"
3
+ version = "0.1.0"
4
+ description = "An AI-powered CSS style generator using CSS Zen Garden designs"
5
+ authors = [
6
+ {name = "Anthony Chapman", email = "adc@thewebdev.us"}
7
+ ]
8
+ readme = "README.md"
9
+ dependencies = [
10
+ "jupyter",
11
+ "notebook",
12
+ "ipykernel>=6.29.0",
13
+ "beautifulsoup4>=4.12.0",
14
+ "scrapy>=2.11.0",
15
+ "selenium>=4.18.0",
16
+ "playwright>=1.42.0",
17
+ "pandas>=2.2.0",
18
+ "numpy>=1.26.0",
19
+ "langchain>=0.1.0",
20
+ "langgraph>=0.0.19",
21
+ "chainlit>=0.7.700",
22
+ "transformers>=4.37.0",
23
+ "datasets>=2.17.0",
24
+ "torch==2.1.2",
25
+ "sentence-transformers>=2.5.0",
26
+ "python-dotenv>=1.0.0",
27
+ "requests>=2.28.1",
28
+ ]
29
+ requires-python = ">=3.11,<3.12"
30
+
31
+ [build-system]
32
+ requires = ["hatchling"]
33
+ build-backend = "hatchling.build"
34
+
35
+ [tool.hatch.build.targets.wheel]
36
+ packages = ["src/build"]
37
+
38
+ [tool.hatch.metadata]
39
+ allow-direct-references = true
40
+
41
+ [tool.ruff]
42
+ line-length = 88
43
+ target-version = "py311"
44
+
45
+ [tool.ruff.lint]
46
+ select = [
47
+ "E", # pycodestyle errors
48
+ "W", # pycodestyle warnings
49
+ "F", # pyflakes
50
+ "I", # isort
51
+ "B", # flake8-bugbear
52
+ ]
53
+
54
+ [tool.pytest.ini_options]
55
+ pythonpath = ["."]
56
+ addopts = "-ra -q"
57
+ testpaths = ["tests"]
58
+
59
+ [tool.mypy]
60
+ python_version = "3.11"
61
+ warn_return_any = true
62
+ warn_unused_configs = true
63
+ check_untyped_defs = true
64
+
65
+ [tool.black]
66
+ line-length = 88
67
+ target-version = ['py311']
requirements.txt DELETED
@@ -1,26 +0,0 @@
1
- # Jupyter environment
2
- jupyter
3
- notebook
4
-
5
- # Web scraping and automation
6
- beautifulsoup4
7
- scrapy
8
- selenium
9
- playwright
10
-
11
- # Data processing
12
- pandas
13
- numpy
14
-
15
- # LLM and AI tools
16
- langchain
17
- langgraph
18
- chainlit
19
- transformers # Hugging Face Transformers
20
- datasets # Hugging Face Datasets
21
- torch # Required for many HF models
22
- sentence-transformers # For embeddings
23
-
24
- # API and utilities
25
- python-dotenv # For environment variables
26
- requests
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
uv.lock ADDED
The diff for this file is too large to render. See raw diff