Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
notebooks/
data/raw/

# Ignore raw data files
*.csv
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/docker-build-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Production Docker Image
on:
push:
branches:
- main
- PRODUCTION

jobs:
build:
Expand All @@ -12,8 +12,14 @@ jobs:
contents: read
packages: write
steps:
- name: Checkout code
- name: Checkout code with submodules
uses: actions/checkout@v2
with:
submodules: 'true'

- name: Initialize nested submodules
run: |
git submodule update --init --recursive # This command will initialize submodules recursively

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand All @@ -27,4 +33,4 @@ jobs:
with:
context: .
push: true
tags: ghcr.io/econlabs/econlabs/fsdc-api:production
tags: ghcr.io/gitinference/gitinference/fsdc-api:production
4 changes: 2 additions & 2 deletions .github/workflows/docker-build-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Staging Docker Image
on:
push:
branches:
- STAGING
- main

jobs:
build:
Expand Down Expand Up @@ -33,4 +33,4 @@ jobs:
with:
context: .
push: true
tags: ghcr.io/econlabs/econlabs/fsdc-api:staging
tags: ghcr.io/gitinference/gitinference/fsdc-api:staging
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,4 @@ cython_debug/
*.zip
*.parquet
*.json
data/raw/*
11 changes: 7 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[submodule "src/fsdc_calories"]
path = src/fsdc_calories
url = https://github.com/EconLabs/fsdc-calories.git
[submodule "src/submodules/fsdc_calories"]
path = src/submodules/fsdc_calories
url = https://github.com/EconLabs/fsdc-calories.git
branch = main
[submodule "src/submodules/fsdc_security"]
path = src/submodules/fsdc_security
url = https://github.com/EconLabs/fsdc-security
url = https://github.com/EconLabs/fsdc-security.git
branch = main
[submodule "src/submodules/pr_food"]
path = src/submodules/pr_food
url = https://github.com/ouslan/pr-food.git
branch = main
69 changes: 0 additions & 69 deletions docker-compose-prod.yml

This file was deleted.

15 changes: 7 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ services:
container_name: FastAPI
build:
context: .
ports:
- 5071:8000
restart: always
secrets:
- db-password
Expand All @@ -39,15 +41,12 @@ services:
POSTGRES_DB: postgres
POSTGRES_PORT: 5555

volumes:
- data_folder:/app/data
webapp:
container_name: fsdc_webapp
image: ghcr.io/econlabs/econlabs/fsdc-webapp:staging
restart: always
ports:
- 8051:8000
networks:
- api_network
depends_on:
database:
condition: service_healthy
- 5070:3000

networks:
api_network:
Expand Down
Empty file added notebooks/test.qmd
Empty file.
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@ dependencies = [
"requests>=2.32.3",
"chardet>=5.2.0",
"fastexcel>=0.12.1",
"flask>=3.1.0",
"flask-cors>=5.0.0",
"ibis-framework[duckdb,geospatial,sqlite]>=9.0.0",
"openpyxl>=3.1.5",
"pandas>=2.2.3",
"plotly>=5.24.1",
"polars>=1.22.0",
"requests>=2.32.3",
"sqlmodel>=0.0.22",
Expand Down
53 changes: 36 additions & 17 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ anyio==4.8.0
# httpx
# starlette
# watchfiles
anywidget==0.9.14
anywidget==0.9.15
# via altair
arro3-core==0.4.5
# via vegafusion
Expand All @@ -32,6 +32,8 @@ certifi==2025.1.31
# pyogrio
# pyproj
# requests
chardet==5.2.0
# via fsdc-api (pyproject.toml)
charset-normalizer==3.4.1
# via requests
click==8.1.8
Expand All @@ -46,22 +48,28 @@ decorator==5.2.1
# via ipython
dnspython==2.7.0
# via email-validator
duckdb==1.2.0
duckdb==1.2.1
# via
# fsdc-api (pyproject.toml)
# ibis-framework
email-validator==2.2.0
# via fastapi
et-xmlfile==2.0.0
# via openpyxl
executing==2.2.0
# via stack-data
fastapi==0.115.8
fastapi==0.115.11
# via fsdc-api (pyproject.toml)
fastapi-cli==0.0.7
# via fastapi
fastexcel==0.13.0
# via fsdc-api (pyproject.toml)
geoarrow-types==0.2.0
# via ibis-framework
geopandas==1.0.1
# via ibis-framework
greenlet==3.1.1
# via sqlalchemy
h11==0.14.0
# via
# httpcore
Expand All @@ -72,21 +80,23 @@ httptools==0.6.4
# via uvicorn
httpx==0.28.1
# via fastapi
ibis-framework==10.1.0
ibis-framework==10.2.0
# via fsdc-api (pyproject.toml)
idna==3.10
# via
# anyio
# email-validator
# httpx
# requests
ipython==8.32.0
ipython==9.0.2
# via ipywidgets
ipython-pygments-lexers==1.1.1
# via ipython
ipywidgets==8.1.5
# via anywidget
jedi==0.19.2
# via ipython
jinja2==3.1.5
jinja2==3.1.6
# via
# altair
# fastapi
Expand All @@ -106,7 +116,7 @@ mdurl==0.1.2
# via markdown-it-py
mercantile==1.2.1
# via altair-tiles
narwhals==1.28.0
narwhals==1.30.0
# via
# altair
# vegafusion
Expand All @@ -118,6 +128,8 @@ numpy==2.2.3
# pandas
# pyogrio
# shapely
openpyxl==3.1.5
# via fsdc-api (pyproject.toml)
packaging==24.2
# via
# altair
Expand All @@ -138,14 +150,10 @@ parsy==2.1
# via ibis-framework
pexpect==4.9.0
# via ipython
polars==1.23.0
polars==1.24.0
# via fsdc-api (pyproject.toml)
prompt-toolkit==3.0.50
# via ipython
psycopg==3.2.5
# via ibis-framework
psycopg-binary==3.2.5
# via psycopg
psygnal==0.12.0
# via anywidget
ptyprocess==0.7.0
Expand All @@ -155,16 +163,20 @@ pure-eval==0.2.3
pyarrow==19.0.1
# via
# altair
# fastexcel
# ibis-framework
pyarrow-hotfix==0.6
# via ibis-framework
pydantic==2.10.6
# via fastapi
# via
# fastapi
# sqlmodel
pydantic-core==2.27.2
# via pydantic
pygments==2.19.1
# via
# ipython
# ipython-pygments-lexers
# rich
pyogrio==0.10.0
# via geopandas
Expand All @@ -190,6 +202,8 @@ referencing==0.36.2
# via
# jsonschema
# jsonschema-specifications
regex==2024.11.6
# via ibis-framework
requests==2.32.3
# via fsdc-api (pyproject.toml)
rich==13.9.4
Expand All @@ -213,11 +227,15 @@ six==1.17.0
# via python-dateutil
sniffio==1.3.1
# via anyio
sqlglot==26.6.0
sqlalchemy==2.0.38
# via sqlmodel
sqlglot==26.9.0
# via ibis-framework
sqlmodel==0.0.24
# via fsdc-api (pyproject.toml)
stack-data==0.6.3
# via ipython
starlette==0.45.3
starlette==0.46.1
# via fastapi
toolz==1.0.0
# via ibis-framework
Expand All @@ -229,7 +247,7 @@ traitlets==5.14.3
# ipython
# ipywidgets
# matplotlib-inline
typer==0.15.1
typer==0.15.2
# via fastapi-cli
typing-extensions==4.12.2
# via
Expand All @@ -240,6 +258,7 @@ typing-extensions==4.12.2
# pydantic
# pydantic-core
# rich-toolkit
# sqlalchemy
# typer
tzdata==2025.1
# via pandas
Expand All @@ -261,7 +280,7 @@ watchfiles==1.0.4
# via uvicorn
wcwidth==0.2.13
# via prompt-toolkit
websockets==15.0
websockets==15.0.1
# via uvicorn
widgetsnbextension==4.0.13
# via ipywidgets
Expand Down
Empty file added src/dependencies.py
Empty file.
Empty file added src/internal/__init__.py
Empty file.
8 changes: 7 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@

app = FastAPI()

origins = ["http://localhost:3000", "http://192.168.50.24:5751", "fsdc.econlabs.net", "https://www.uprm.edu"]
origins = [
"http://localhost:3000",
"http://192.168.50.24:5751",
"fsdc.econlabs.net",
"uprm.edu",
"https://www.uprm.edu/foodsecuritydatacenter/series-de-tiempo/",
]

app.include_router(data.router)
app.include_router(files.router)
Expand Down
Loading
Loading