Skip to content

Commit 210fec0

Browse files
Hyperkid123claude
andcommitted
refactor(memory-server): rename src/ to bot_memory_server/ package
RHCLOUD-48377 Proper Python package structure so relative imports work. - git mv src/ → bot_memory_server/ - Add [build-system] + setuptools config to pyproject.toml - Update all test imports from src.* to bot_memory_server.* - Remove sys.path hacks from test files - Update Dockerfile, Makefile, docker-compose, vite config - Update .gitignore paths for dashboard build output Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 24cf713 commit 210fec0

30 files changed

Lines changed: 38 additions & 31 deletions

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ __pycache__/
2020
.python-version
2121
dashboard/node_modules/
2222
# Dashboard build output (built in Dockerfile, not committed)
23-
memory-server/src/static/assets/
24-
memory-server/src/static/index.html
25-
memory-server/src/static/app.js
26-
memory-server/src/static/style.css
23+
memory-server/bot_memory_server/static/assets/
24+
memory-server/bot_memory_server/static/index.html
25+
memory-server/bot_memory_server/static/app.js
26+
memory-server/bot_memory_server/static/style.css
2727
sa-key.json
2828
.ssh/
2929
.gitconfig

dashboard/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import react from '@vitejs/plugin-react'
44
export default defineConfig({
55
plugins: [react()],
66
build: {
7-
outDir: '../memory-server/src/static',
7+
outDir: '../memory-server/bot_memory_server/static',
88
emptyOutDir: false,
99
},
1010
server: {

memory-server/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ WORKDIR /app
1818
COPY memory-server/pyproject.toml memory-server/uv.lock* ./
1919
RUN uv sync --frozen --no-dev --no-install-project
2020

21-
COPY memory-server/src/ src/
21+
COPY memory-server/bot_memory_server/ bot_memory_server/
2222

2323
# Copy dashboard build output into static dir
24-
COPY --from=dashboard /app/memory-server/src/static/index.html src/static/index.html
25-
COPY --from=dashboard /app/memory-server/src/static/assets/ src/static/assets/
24+
COPY --from=dashboard /app/memory-server/bot_memory_server/static/index.html bot_memory_server/static/index.html
25+
COPY --from=dashboard /app/memory-server/bot_memory_server/static/assets/ bot_memory_server/static/assets/
2626

2727
RUN uv sync --frozen --no-dev
2828

@@ -39,4 +39,4 @@ EXPOSE 8080
3939
# Run python directly from the pre-built venv — avoids uv cache init permission
4040
# issues with OpenShift arbitrary UIDs (astral-sh/uv#10023)
4141
ENV PATH="/app/.venv/bin:$PATH"
42-
CMD ["python", "-m", "src.server"]
42+
CMD ["python", "-m", "bot_memory_server.server"]

memory-server/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ lock:
1212
uv lock
1313

1414
run:
15-
uv run python -m src.server
15+
uv run python -m bot_memory_server.server
1616

1717
dev: up
18-
uv run python -m src.server
18+
uv run python -m bot_memory_server.server
1919

2020
# Docker
2121
up:
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)