Skip to content

Commit

Permalink
Merge pull request #1 from josephine-wolf-oberholtzer/alzabo
Browse files Browse the repository at this point in the history
Rename praetor -> alzabo
  • Loading branch information
josephine-wolf-oberholtzer authored May 27, 2024
2 parents d6d0fce + 8fce1a7 commit 2b91a0e
Show file tree
Hide file tree
Showing 103 changed files with 156 additions and 156 deletions.
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
DC := docker compose
DCR := $(DC) run --rm --cap-add SYS_NICE
CONTAINER := api
export CORPUS_PATH ?= ~/Dropbox/PraetorMix/ClassicMix
export PRAETOR_CONFIG_PATH ?= praetor.local.yaml
export CORPUS_PATH ?= ~/Dropbox/AlzaboMix/ClassicMix
export PRAETOR_CONFIG_PATH ?= alzabo.local.yaml

help: ## Print this help
@awk 'BEGIN {FS = ":.*?## "} /^[a-z0-9A-Z_-]+:.*?## / {printf "%-30s%s\n", $$1, $$2}' $(MAKEFILE_LIST)
Expand All @@ -16,7 +16,7 @@ build: ## Build Docker images
$(DC) --progress plain build --build-arg BUILDKIT_INLINE_CACHE=1 $(CONTAINER)

up: up-datastores ## Bring up containers
PRAETOR_CONFIG_PATH="praetor.server.yaml" $(DC) up -d
PRAETOR_CONFIG_PATH="alzabo.server.yaml" $(DC) up -d

up-datastores: ## Bring up Milvus containers
$(DC) up -d attu etcd milvus minio redis
Expand All @@ -41,21 +41,21 @@ push: ## Push image to GHCR
### INGEST

ingest: up ## Run the ingest pipeline
python -m praetor --api-url http://localhost:8000 audio-upload $(CORPUS_PATH)/*.wav
python -m alzabo --api-url http://localhost:8000 audio-upload $(CORPUS_PATH)/*.wav

ingest-test: up ## Run the ingest pipeline
python -m praetor --api-url http://localhost:8000 audio-upload tests/recordings/*.wav
python -m alzabo --api-url http://localhost:8000 audio-upload tests/recordings/*.wav

### CLIENT

client: up ## Run the client
python -m praetor --api-url http://localhost:8000 run
python -m alzabo --api-url http://localhost:8000 run

client-x: ## Run the client
python -m praetor --api-url http://localhost:8000 run
python -m alzabo --api-url http://localhost:8000 run

client-es9: ## Run the client with ES-9
PRAETOR_CONFIG_PATH=praetor.es9.yaml python -m praetor --api-url http://localhost:8000 run
PRAETOR_CONFIG_PATH=alzabo.es9.yaml python -m alzabo --api-url http://localhost:8000 run

### FORMATTING

Expand Down Expand Up @@ -84,15 +84,15 @@ mypy: ## Type-check via mypy
$(DCR) $(CONTAINER) mypy .

kubeval:
kubectl kustomize kubernetes/praetor/base | kubeval --strict
kubectl kustomize kubernetes/alzabo/base | kubeval --strict

### TESTING

pytest: up-datastores ## Run pytest
PRAETOR_CONFIG_PATH="" $(DCR) --cap-add SYS_NICE $(CONTAINER) pytest

pytest-cov: up-datastores ## Run pytest with coverage
PRAETOR_CONFIG_PATH="" $(DCR) --cap-add SYS_NICE $(CONTAINER) pytest --cov=praetor --cov-report=html --cov-report=term --durations=10
PRAETOR_CONFIG_PATH="" $(DCR) --cap-add SYS_NICE $(CONTAINER) pytest --cov=alzabo --cov-report=html --cov-report=term --durations=10

pytest-x: up-datastores ## Run pytest and fail fast
PRAETOR_CONFIG_PATH="" $(DCR) --cap-add SYS_NICE $(CONTAINER) pytest -x
Expand All @@ -105,10 +105,10 @@ test: reformat lint pytest-cov
### MISC

ensure-buckets:
$(DCR) $(CONTAINER) python3 -m praetor ensure-buckets
$(DCR) $(CONTAINER) python3 -m alzabo ensure-buckets

ensure-database:
$(DCR) $(CONTAINER) python3 -m praetor ensure-database
$(DCR) $(CONTAINER) python3 -m alzabo ensure-database

pip-compile: ## Rebuild requirements.txt
python -m piptools compile
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Praetor
# Alzabo

A distributed concatenative synthesis and audio analysis engine.

Expand All @@ -23,15 +23,15 @@ pip install -e .
Get help:

```
python -m praetor --help
python -m alzabo --help
```

### Load audio into the corpus

Batch audio upload via URLs:

```
python -m praetor \
python -m alzabo \
audio-batch \
s3://test-source/bloodborne-dialog.mp3 \
s3://test-source/bloodborne-enemy-dialog.mp3 \
Expand All @@ -46,7 +46,7 @@ python -m praetor \
Direct upload an audio file:

```
python -m praetor \
python -m alzabo \
audio-upload \
tests/recordings/ibn-arabi-44100.wav
```
Expand All @@ -56,15 +56,15 @@ python -m praetor \
Upload audio, analyze via scsynth, and query:

```
python -m praetor \
python -m alzabo \
query-scsynth-upload \
tests/recordings/ibn-arabi-44100-1s.wav
```

Query via scsynth vector:

```
python -m praetor \
python -m alzabo \
query-scsynth -- \
65.12738627115885 \
-53.331234178235455 \
Expand All @@ -87,7 +87,7 @@ python -m praetor \
Upload audio, analyze via AST, and query:

```
python -m praetor \
python -m alzabo \
query-ast-upload \
tests/recordings/ibn-arabi-44100-1s.wav
```
Expand All @@ -97,7 +97,7 @@ python -m praetor \
Fetch audio segment:

```
python -m praetor \
python -m alzabo \
audio-fetch \
ade95a26d07c28af966ec474445379cae82d96c2bc30913b93e972702d9fb208 \
82756096 \
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion praetor-gui/index.html → alzabo-gui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap"
/>
<title>praetor | corpus explorer</title>
<title>alzabo | corpus explorer</title>
</head>
<body>
<div id="root"></div>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion praetor-gui/package.json → alzabo-gui/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "praetor-gui",
"name": "alzabo-gui",
"private": true,
"version": "0.0.0",
"type": "module",
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion praetor-gui/src/App.tsx → alzabo-gui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const App = () => {
sx={{ mr: 2 }}
variant="h6"
>
praetor
alzabo
</Typography>
<Divider
flexItem
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions praetor.es9.yaml → alzabo.es9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,32 @@ api:
key: null
url: http://api:8000/
application:
analyzer_class: praetor.client.analyzer.OnlineScsynthAnalyzer
pattern_factory_class: praetor.client.pattern_factory.PatternFactory
analyzer_class: alzabo.client.analyzer.OnlineScsynthAnalyzer
pattern_factory_class: alzabo.client.pattern_factory.PatternFactory
ast:
checkpoint_path: data/ast/audioset_model.pth
enabled: false
labels_path: data/ast/audioset_labels.csv
midi:
client_class: praetor.client.midi_client.MidiClient
client_class: alzabo.client.midi_client.MidiClient
devices: {}
enabled: false
milvus:
url: http://milvus:19530/
monome:
arc: []
client_class: praetor.client.monome_client.MonomeClient
client_class: alzabo.client.monome_client.MonomeClient
enabled: false
open_telemetry:
enabled: false
redis:
url: redis://redis:6379/0
s3:
access_key_id: minioadmin
data_bucket: praetor-ai-data
data_bucket: alzabo-ai-data
endpoint_url: http://minio:9000
secret_access_key: minioadmin
uploads_bucket: praetor-ai-uploads
uploads_bucket: alzabo-ai-uploads
scsynth:
block_size: 256
enabled: true
Expand Down
12 changes: 6 additions & 6 deletions praetor.local.yaml → alzabo.local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,32 @@ api:
key: null
url: http://api:8000/
application:
analyzer_class: praetor.client.analyzer.OnlineScsynthAnalyzer
pattern_factory_class: praetor.client.pattern_factory.PatternFactory
analyzer_class: alzabo.client.analyzer.OnlineScsynthAnalyzer
pattern_factory_class: alzabo.client.pattern_factory.PatternFactory
ast:
checkpoint_path: data/ast/audioset_model.pth
enabled: false
labels_path: data/ast/audioset_labels.csv
midi:
client_class: praetor.client.midi_client.MidiClient
client_class: alzabo.client.midi_client.MidiClient
devices: {}
enabled: false
milvus:
url: http://milvus:19530/
monome:
arc: []
client_class: praetor.client.monome_client.MonomeClient
client_class: alzabo.client.monome_client.MonomeClient
enabled: false
open_telemetry:
enabled: false
redis:
url: redis://redis:6379/0
s3:
access_key_id: minioadmin
data_bucket: praetor-ai-data
data_bucket: alzabo-ai-data
endpoint_url: http://minio:9000
secret_access_key: minioadmin
uploads_bucket: praetor-ai-uploads
uploads_bucket: alzabo-ai-uploads
scsynth:
block_size: 256
enabled: true
Expand Down
12 changes: 6 additions & 6 deletions praetor.server.yaml → alzabo.server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,32 @@ api:
key: null
url: http://api:8000/
application:
analyzer_class: praetor.client.analyzer.OnlineScsynthAnalyzer
pattern_factory_class: praetor.client.pattern_factory.PatternFactory
analyzer_class: alzabo.client.analyzer.OnlineScsynthAnalyzer
pattern_factory_class: alzabo.client.pattern_factory.PatternFactory
ast:
checkpoint_path: data/ast/audioset_model.pth
enabled: false
labels_path: data/ast/audioset_labels.csv
midi:
client_class: praetor.client.midi_client.MidiClient
client_class: alzabo.client.midi_client.MidiClient
devices: {}
enabled: false
milvus:
url: http://milvus:19530/
monome:
arc: []
client_class: praetor.client.monome_client.MonomeClient
client_class: alzabo.client.monome_client.MonomeClient
enabled: false
open_telemetry:
enabled: false
redis:
url: redis://redis:6379/0
s3:
access_key_id: minioadmin
data_bucket: praetor-ai-data
data_bucket: alzabo-ai-data
endpoint_url: http://minio:9000
secret_access_key: minioadmin
uploads_bucket: praetor-ai-uploads
uploads_bucket: alzabo-ai-uploads
scsynth:
block_size: 256
enabled: true
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions praetor/api/__init__.py → alzabo/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Praetor API
Alzabo API
"""

import aiohttp_cors
Expand Down Expand Up @@ -34,7 +34,7 @@ async def on_shutdown(app: web.Application) -> None:
# openapi
setup_aiohttp_apispec(
app=app,
title="Praetor",
title="Alzabo",
version="v1",
url="/api/docs/swagger.json",
swagger_path="/api/docs",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion praetor/cli.py → alzabo/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def query_scsynth_upload(
def run():
logging.basicConfig()
logging.getLogger().setLevel(logging.INFO)
logging.getLogger("praetor").setLevel(logging.INFO)
logging.getLogger("alzabo").setLevel(logging.INFO)
logging.getLogger("supriya.osc").setLevel(logging.WARNING)
logging.getLogger("supriya.udp").setLevel(logging.INFO)
logging.getLogger("supriya.scsynth").setLevel(logging.INFO)
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class APIClient:
"""
A client for talking to the Praetor Cloud API.
A client for talking to the Alzabo Cloud API.
"""

def __init__(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class PerformanceConfig(TypedDict):

class Application:
"""
The Praetor Client application.
The Alzabo Client application.
Harnesses together all application logic.
"""
Expand All @@ -59,7 +59,7 @@ def __init__(self) -> None:
self.context = AsyncServer()
self.clock = AsyncClock()
self.clock.change(beats_per_minute=60 * 4)
# Praetor non-pluggable classes
# Alzabo non-pluggable classes
self.api_client = APIClient(
api_url=str(config.api.url), api_key=config.api.key or None
)
Expand All @@ -71,7 +71,7 @@ def __init__(self) -> None:
self.performer = Performer(
buffer_manager=self.buffer_manager, clock=self.clock, context=self.context
)
# Praetor pluggable classes
# Alzabo pluggable classes
self.analyzer: OnlineScsynthAnalyzer = cast(
Type[OnlineScsynthAnalyzer], import_class(config.application.analyzer_class)
)(
Expand All @@ -91,7 +91,7 @@ def __init__(self) -> None:
self.pattern_factory: PatternFactory = cast(
Type[PatternFactory], import_class(config.application.pattern_factory_class)
)(context=self.context)
# Praetor state
# Alzabo state
self.performance_config: dict[str, float] = dict(
density=0.5, history=0.05, index=0.0, reverb=0.05, stretch=0.5
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 2b91a0e

Please sign in to comment.