Skip to content

Commit 38b044c

Browse files
authored
Merge pull request #149 from codeforjapan/chore/cleanup
cleanup unused files
2 parents 8ee036a + 272bc08 commit 38b044c

File tree

15 files changed

+51
-457
lines changed

15 files changed

+51
-457
lines changed

CLAUDE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Commands
6+
- **Test**: `tox` (runs format, lint, test, type check)
7+
- **Run single test**: `python -m pytest path/to/test_file.py::TestClass::test_method -v`
8+
- **Format**: `black <directory> && isort <directory>`
9+
- **Lint**: `pflake8 <directory>`
10+
- **Type check**: `mypy <directory> --strict`
11+
12+
## Code Style
13+
- **Line length**: 120 characters
14+
- **Python version**: 3.10+
15+
- **Formatting**: Black (opinionated)
16+
- **Imports**: isort with Black profile, groups: standard, third-party, first-party
17+
- **Type hints**: Required, use strict mypy checking
18+
- **Naming**: Snake case for functions/variables, PascalCase for classes
19+
- **Error handling**: Custom exceptions inherit from BaseError
20+
- **Exception naming**: Follow pattern `<Problem>Error`
21+
- **Testing**: Use pytest with appropriate fixtures

api/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ dynamic = [
1313
"version",
1414
]
1515
readme = "README.md"
16-
license = {file = "../LICENSE"}
1716
requires-python = ">=3.10"
1817

1918
classifiers = [

common/birdxplorer_common/models.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from typing import (
66
Annotated,
77
Any,
8+
Callable,
89
Dict,
910
List,
1011
Literal,
@@ -17,7 +18,9 @@
1718
from uuid import UUID
1819

1920
from pydantic import BaseModel as PydanticBaseModel
20-
from pydantic import ConfigDict
21+
from pydantic import (
22+
ConfigDict,
23+
)
2124
from pydantic import Field as PydanticField
2225
from pydantic import (
2326
GetCoreSchemaHandler,
@@ -492,13 +495,14 @@ def model_dump_json(
492495
indent: int | None = None,
493496
include: IncEx | None = None,
494497
exclude: IncEx | None = None,
495-
context: Dict[str, Any] | None = None,
496-
by_alias: bool = True,
498+
context: Any | None = None,
499+
by_alias: bool | None = True,
497500
exclude_unset: bool = False,
498501
exclude_defaults: bool = False,
499502
exclude_none: bool = False,
500503
round_trip: bool = False,
501-
warnings: bool | Literal["none"] | Literal["warn"] | Literal["error"] = True,
504+
warnings: bool | Literal["none", "warn", "error"] = True,
505+
fallback: Callable[[Any], Any] | None = None,
502506
serialize_as_any: bool = False,
503507
) -> str:
504508
return super(BaseModel, self).model_dump_json(
@@ -512,6 +516,7 @@ def model_dump_json(
512516
exclude_none=exclude_none,
513517
round_trip=round_trip,
514518
warnings=warnings,
519+
fallback=fallback,
515520
serialize_as_any=serialize_as_any,
516521
)
517522

common/birdxplorer_common/storage.py

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,30 @@
88
from sqlalchemy.orm.query import RowReturningQuery
99
from sqlalchemy.types import CHAR, DECIMAL, JSON, Integer, String, Uuid
1010

11-
from .models import BinaryBool, LanguageIdentifier
11+
from .models import (
12+
BinaryBool,
13+
LanguageIdentifier,
14+
)
1215
from .models import Link as LinkModel
13-
from .models import LinkId, Media, MediaDetails, MediaType, NonNegativeInt
16+
from .models import (
17+
LinkId,
18+
Media,
19+
MediaDetails,
20+
MediaType,
21+
NonNegativeInt,
22+
)
1423
from .models import Note as NoteModel
15-
from .models import NoteId, NotesClassification, NotesHarmful, ParticipantId
24+
from .models import (
25+
NoteId,
26+
NotesClassification,
27+
NotesHarmful,
28+
ParticipantId,
29+
)
1630
from .models import Post as PostModel
17-
from .models import PostId, SummaryString
31+
from .models import (
32+
PostId,
33+
SummaryString,
34+
)
1835
from .models import Topic as TopicModel
1936
from .models import (
2037
TopicId,

common/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ dynamic = [
1313
"version",
1414
]
1515
readme = "../README.md"
16-
license = {file = "../LICENSE"}
1716
requires-python = ">=3.10"
1817

1918
classifiers = [

compose.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ version: "3.1"
33
services:
44
db:
55
image: postgres:15.4
6-
container_name: postgres_container
76
environment:
87
POSTGRES_USER: postgres
98
POSTGRES_PASSWORD: ${BX_STORAGE_SETTINGS__PASSWORD}
@@ -35,19 +34,6 @@ services:
3534
- action: rebuild
3635
path: ./
3736
target: /app
38-
migrate:
39-
depends_on:
40-
db:
41-
condition: service_healthy
42-
build:
43-
args:
44-
- ENVIRONMENT=dev
45-
context: ./
46-
dockerfile: ./migrate/Dockerfile.dev
47-
environment:
48-
- WAIT_HOSTS=db:5432
49-
env_file:
50-
- .env
5137

5238
volumes:
5339
postgres_data:

migrate/Dockerfile

Lines changed: 0 additions & 46 deletions
This file was deleted.

migrate/Dockerfile.dev

Lines changed: 0 additions & 52 deletions
This file was deleted.

migrate/birdxplorer_migration/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

migrate/birdxplorer_migration/data/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)