Skip to content

Commit 72acef3

Browse files
Merge pull request #19 from goldlabelapps/staging
This pull request introduces a few improvements and fixes related to API routing, endpoint metadata, and test data. The most significant changes are adjustments to the way the `products` API router is imported and included, an update to the root endpoint's metadata, and the addition of a new CSV test file.
2 parents 556208e + 940d2bf commit 72acef3

6 files changed

Lines changed: 13 additions & 3 deletions

File tree

app/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""NX AI - FastAPI/Python/Postgres/tsvector"""
22

33
# Current Version
4-
__version__ = "1.0.7"
4+
__version__ = "1.0.8"

app/api/products/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .products import router

app/api/root.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def root() -> dict:
2222
"message": "Welcome to NX AI!"
2323
}
2424
endpoints = [
25-
{"docs": "docs", "url": f"{base_url}/docs"},
25+
{"name": "docs", "url": f"{base_url}/docs"},
2626
{"name": "health", "url": f"{base_url}/health"},
2727
{"name": "products", "url": f"{base_url}/products"}
2828
]

app/api/routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from app.api.health import router as health_router
1515
from app.api.echo import router as echo_router
1616
from app.api.import_csv import router as import_csv_router
17-
from app.api.products import router as products_router
17+
from app.api.products.products import router as products_router
1818

1919
router.include_router(root_router)
2020
router.include_router(health_router)

tests/csv/small.csv

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Params,item,desc,UOS,Pack_Description,Hierarchy1,Hierarchy2,Hierarchy3,UOP,sSell1,sSell2,sSell3,sSell4,sSell5,pack1,pack2,pack3,pack4,pack5,EAN
2+
"Branch: 1, Display Cost: Y,From Hierarchy1: 19,To Hierarchy1: 19,From Hierarchy2: ,To Hierarchy2: ZZZZZZZZZZ,From Hierarchy3: ,To Hierarchy3: ZZZZZZZZZZ",14217,HEETS AMBER LABEL,10,20'S,19 ECIG/VAPE,,,1,55.99,0,0,0,0,1,0,0,0,0,5.06059E+12
3+
4+
"Branch: 1, Display Cost: Y,From Hierarchy1: 19,To Hierarchy1: 19,From Hierarchy2: ,To Hierarchy2: ZZZZZZZZZZ,From Hierarchy3: ,To Hierarchy3: ZZZZZZZZZZ",19098,INSTA FLOW 5000 FRESH MINT MOJITO,1,6,19 ECIG/VAPE,,,1,28.99,0,0,0,0,1,0,0,0,0,
5+
"Branch: 1, Display Cost: Y,From Hierarchy1: 19,To Hierarchy1: 19,From Hierarchy2: ,To Hierarchy2: ZZZZZZZZZZ,From Hierarchy3: ,To Hierarchy3: ZZZZZZZZZZ",19099,INSTA FLOW 5000 KIWI PASSION FRUIT GUAVA,1,6,19 ECIG/VAPE,,,1,28.99,0,0,0,0,1,0,0,0,0,5.06102E+12
6+
"Branch: 1, Display Cost: Y,From Hierarchy1: 19,To Hierarchy1: 19,From Hierarchy2: ,To Hierarchy2: ZZZZZZZZZZ,From Hierarchy3: ,To Hierarchy3: ZZZZZZZZZZ",19100,INSTA FLOW 5000 LEMON LIME,1,6,19 ECIG/VAPE,,,1,28.99,0,0,0,0,1,0,0,0,0,
7+
"Branch: 1, Display Cost: Y,From Hierarchy1: 19,To Hierarchy1: 19,From Hierarchy2: ,To Hierarchy2: ZZZZZZZZZZ,From Hierarchy3: ,To Hierarchy3: ZZZZZZZZZZ",19101,INSTA FLOW 5000 PINEAPPLE ICE,1,6,19 ECIG/VAPE,,,1,28.99,0,0,0,0,1,0,0,0,0,
8+
"Branch: 1, Display Cost: Y,From Hierarchy1: 19,To Hierarchy1: 19,From Hierarchy2: ,To Hierarchy2: ZZZZZZZZZZ,From Hierarchy3: ,To Hierarchy3: ZZZZZZZZZZ",19102,INSTA FLOW 5000 POLAR MINT,1,6,19 ECIG/VAPE,,,1,28.99,0,0,0,0,1,0,0,0,0,
9+
"Branch: 1, Display Cost: Y,From Hierarchy1: 19,To Hierarchy1: 19,From Hierarchy2: ,To Hierarchy2: ZZZZZZZZZZ,From Hierarchy3: ,To Hierarchy3: ZZZZZZZZZZ",19103,INSTA FLOW 5000 RASPBERRY LEMONADE,1,6,19 ECIG/VAPE,,,1,28.99,0,0,0,0,1,0,0,0,0,

0 commit comments

Comments
 (0)