Spaces:
Sleeping
Sleeping
Justin Donaldson
commited on
Commit
β’
79db6a1
1
Parent(s):
42854be
new poetry
Browse files- .envrc +2 -0
- Makefile +134 -0
- README.md +0 -13
- pyproject.toml +19 -0
- requirements.txt +8 -0
- sentientdream/__init__.py +0 -0
- tests/__init__.py +0 -0
.envrc
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
layout poetry
|
2 |
+
|
Makefile
ADDED
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
.PHONY: clean lint requirements test preflight docs
|
3 |
+
|
4 |
+
#################################################################################
|
5 |
+
# GLOBALS #
|
6 |
+
#################################################################################
|
7 |
+
|
8 |
+
PROJECT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
9 |
+
BUCKET = [OPTIONAL] your-bucket-for-syncing-data (do not include 's3://')
|
10 |
+
PROFILE = default
|
11 |
+
PROJECT_NAME = hushh-vibe-catalog-reader
|
12 |
+
PYTHON_INTERPRETER = python3
|
13 |
+
|
14 |
+
ifeq (,$(shell which conda))
|
15 |
+
HAS_CONDA=False
|
16 |
+
else
|
17 |
+
HAS_CONDA=True
|
18 |
+
endif
|
19 |
+
|
20 |
+
#################################################################################
|
21 |
+
# COMMANDS #
|
22 |
+
#################################################################################
|
23 |
+
|
24 |
+
## Set up direnv/Python environment
|
25 |
+
environment :
|
26 |
+
brew install swift
|
27 |
+
brew install direnv
|
28 |
+
brew install miniconda
|
29 |
+
eval "$(conda shell.zsh hook)" # load conda env
|
30 |
+
direnv reload
|
31 |
+
$(MAKE) requirements
|
32 |
+
|
33 |
+
# Clean environment by rebuilding it completely
|
34 |
+
clean_environment : | clean
|
35 |
+
conda env create -f environment.yml --force
|
36 |
+
|
37 |
+
## Install Python dependencies
|
38 |
+
requirements :
|
39 |
+
$(PYTHON_INTERPRETER) -m pip install -e ".[dev]"
|
40 |
+
|
41 |
+
## Delete all compiled Python files
|
42 |
+
clean:
|
43 |
+
find . -type f -name "*.py[co]" -delete
|
44 |
+
find . -type d -name "__pycache__" -delete
|
45 |
+
|
46 |
+
preflight: test
|
47 |
+
pip-compile
|
48 |
+
conda env export > environment.yml
|
49 |
+
|
50 |
+
test:
|
51 |
+
pytest --cov=python/src python/test
|
52 |
+
|
53 |
+
docs:
|
54 |
+
quartodoc build
|
55 |
+
quarto render
|
56 |
+
|
57 |
+
publish_docs: docs
|
58 |
+
quarto publish
|
59 |
+
|
60 |
+
serve:
|
61 |
+
sh -c "$(PYTHON_INTERPRETER) -m uvicorn hushh.server:app --reload & open http://127.0.0.1:8000 & wait"
|
62 |
+
|
63 |
+
## Lint using flake8
|
64 |
+
lint:
|
65 |
+
black src
|
66 |
+
flake8 src
|
67 |
+
|
68 |
+
|
69 |
+
#################################################################################
|
70 |
+
# PROJECT RULES #
|
71 |
+
#################################################################################
|
72 |
+
|
73 |
+
|
74 |
+
|
75 |
+
#################################################################################
|
76 |
+
# Self Documenting Commands #
|
77 |
+
#################################################################################
|
78 |
+
|
79 |
+
.DEFAULT_GOAL := help
|
80 |
+
|
81 |
+
# Inspired by <http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html>
|
82 |
+
# sed script explained:
|
83 |
+
# /^##/:
|
84 |
+
# * save line in hold space
|
85 |
+
# * purge line
|
86 |
+
# * Loop:
|
87 |
+
# * append newline + line to hold space
|
88 |
+
# * go to next line
|
89 |
+
# * if line starts with doc comment, strip comment character off and loop
|
90 |
+
# * remove target prerequisites
|
91 |
+
# * append hold space (+ newline) to line
|
92 |
+
# * replace newline plus comments by `---`
|
93 |
+
# * print line
|
94 |
+
# Separate expressions are necessary because labels cannot be delimited by
|
95 |
+
# semicolon; see <http://stackoverflow.com/a/11799865/1968>
|
96 |
+
.PHONY: help
|
97 |
+
help:
|
98 |
+
@echo "$$(tput bold)Available rules:$$(tput sgr0)"
|
99 |
+
@echo
|
100 |
+
@sed -n -e "/^## / { \
|
101 |
+
h; \
|
102 |
+
s/.*//; \
|
103 |
+
:doc" \
|
104 |
+
-e "H; \
|
105 |
+
n; \
|
106 |
+
s/^## //; \
|
107 |
+
t doc" \
|
108 |
+
-e "s/:.*//; \
|
109 |
+
G; \
|
110 |
+
s/\\n## /---/; \
|
111 |
+
s/\\n/ /g; \
|
112 |
+
p; \
|
113 |
+
}" ${MAKEFILE_LIST} \
|
114 |
+
| LC_ALL='C' sort --ignore-case \
|
115 |
+
| awk -F '---' \
|
116 |
+
-v ncol=$$(tput cols) \
|
117 |
+
-v indent=19 \
|
118 |
+
-v col_on="$$(tput setaf 6)" \
|
119 |
+
-v col_off="$$(tput sgr0)" \
|
120 |
+
'{ \
|
121 |
+
printf "%s%*s%s ", col_on, -indent, $$1, col_off; \
|
122 |
+
n = split($$2, words, " "); \
|
123 |
+
line_length = ncol - indent; \
|
124 |
+
for (i = 1; i <= n; i++) { \
|
125 |
+
line_length -= length(words[i]) + 1; \
|
126 |
+
if (line_length <= 0) { \
|
127 |
+
line_length = ncol - indent - length(words[i]) - 1; \
|
128 |
+
printf "\n%*s ", -indent, " "; \
|
129 |
+
} \
|
130 |
+
printf "%s ", words[i]; \
|
131 |
+
} \
|
132 |
+
printf "\n"; \
|
133 |
+
}' \
|
134 |
+
| more $(shell test $(shell uname) = Darwin && echo '--no-init --raw-control-chars')
|
README.md
CHANGED
@@ -1,13 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: Sentientdream
|
3 |
-
emoji: π
|
4 |
-
colorFrom: purple
|
5 |
-
colorTo: pink
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version: 4.7.1
|
8 |
-
app_file: app.py
|
9 |
-
pinned: false
|
10 |
-
---
|
11 |
-
|
12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
13 |
-
test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pyproject.toml
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[tool.poetry]
|
2 |
+
name = "sentientdream"
|
3 |
+
version = "0.1.0"
|
4 |
+
description = ""
|
5 |
+
authors = ["Justin Donaldson <[email protected]>"]
|
6 |
+
readme = "README.md"
|
7 |
+
|
8 |
+
[tool.poetry.dependencies]
|
9 |
+
python = "^3.11"
|
10 |
+
|
11 |
+
[tool.poetry.group.dev.dependencies]
|
12 |
+
pip-tools = "^0"
|
13 |
+
bump2version = "^0"
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
+
[build-system]
|
18 |
+
requires = ["poetry-core"]
|
19 |
+
build-backend = "poetry.core.masonry.api"
|
requirements.txt
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#
|
2 |
+
# This file is autogenerated by pip-compile with Python 3.11
|
3 |
+
# by the following command:
|
4 |
+
#
|
5 |
+
# pip-compile
|
6 |
+
#
|
7 |
+
pip-tools==0.3.6
|
8 |
+
# via sentientdream (pyproject.toml)
|
sentientdream/__init__.py
ADDED
File without changes
|
tests/__init__.py
ADDED
File without changes
|