Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: API #6

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f691c86
refactor: update dependencies
zameji May 2, 2024
115d4a6
refactor: update to psycopg3
zameji May 2, 2024
c5794de
feat: typing
zameji May 2, 2024
8a5f6d3
refactor: restructure db config
zameji May 2, 2024
dae50fa
fix: support optional cast
zameji May 2, 2024
ef77a64
feat: type response
zameji May 2, 2024
e529513
refactor: optimize query
zameji May 2, 2024
303914a
ci: local mypy run
zameji May 2, 2024
1f6ef50
feat: add pagination support to API
zameji May 2, 2024
5767f6b
refactor: `get_intersection`
zameji May 3, 2024
cf7e746
fix: minor fixes
zameji May 3, 2024
f57a536
refactor: reorder functions
zameji May 3, 2024
3f11095
refactor: `build_where_statement`
zameji May 3, 2024
7854c9c
refactor: `build_where_stament` -> `build_filter_query`
zameji May 3, 2024
df4db14
fix: `build_filter_query`
zameji May 3, 2024
59b54ca
feat: server-side pagination
zameji May 8, 2024
99fddb4
fix: remove hardcoded localhost server
zameji May 8, 2024
82a1a9c
refactor: initial commit
zameji May 12, 2024
d37c7c4
refactor: result display
zameji May 13, 2024
7979c78
refactor: UI changes
zameji May 21, 2024
33169f4
refactor: further UI refactoring
zameji May 23, 2024
4ef7849
refactor: search control cleanup
zameji May 24, 2024
d4ac0f6
feat: display geometries
zameji May 25, 2024
eba92b6
feat: allow multiple instances of same feature
zameji May 27, 2024
1d2d55d
feat: simplify return for no results
zameji May 27, 2024
b47b5c4
refactor: extract join statement function
zameji May 27, 2024
0866230
fix: restore original map centering
zameji May 27, 2024
0bf9a9d
feat: improve result visualisation
zameji May 27, 2024
492da21
refactor: format & lint
zameji May 27, 2024
e235d23
fix: localhost server in bellingcat.service.ts
zameji May 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ frontend/dist
# local env files
.env.local
.env.*.local
.env
*/.env

# Log files
npm-debug.log*
Expand Down Expand Up @@ -92,3 +92,7 @@ node_modules/

# dotenv environment variables file
.env

# Python cache
__pycache__
.mypy_cache
2 changes: 2 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
known_third_party = api_types,firebase_admin,flask,flask_cors,loguru,psycopg,pydantic,typing_extensions
47 changes: 47 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: mixed-line-ending
args: [--fix=lf]

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py310-plus]
- repo: https://github.com/hadialqattan/pycln
rev: v2.3.0
hooks:
- id: pycln
- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: [--profile, black]

- repo: https://github.com/psf/black
rev: 23.10.1
hooks:
- id: black
language_version: python3.10
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==24.4.2]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
hooks:
- id: mypy
1 change: 1 addition & 0 deletions api/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12.3
7 changes: 6 additions & 1 deletion api/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ name = "pypi"

[packages]
flask = "*"
psycopg2 = "*"
flask-cors = "*"
gunicorn = "*"
loguru = "*"
firebase-admin = "*"
psycopg = {extras = ["c"] }
pydantic = "*"

[dev-packages]
pre-commit = "*"
mypy = "*"
types-all = "*"

[requires]
python_version = "3.10"
2,045 changes: 1,789 additions & 256 deletions api/Pipfile.lock

Large diffs are not rendered by default.

Loading