I am no longer hosting open source projects on GitHub.
I explained in a recent post my reasoning for why I migrated my projects to SourceHut.
⚠️ Development moved to Sourcehut
Home Page: https://sr.ht/~loges/mychef/
License: MIT License
The pipeline fails with the following status:
Error: Process completed with exit code 137
A quick scan through the internet points to the tests being interrupted by a SIGKILL (9)
being sent from the ubuntu based runner. This is likely caused by excessive memory usage, but need to investigate further why this is occurring and what has changed since 70172ec where it was working fine.
It was discovered that singular and plural forms of ingredients were being written to the database. In order to avoid this, we will lemmatize the tokens.
I do not want to redirect user directly to the source website, but take them to a unique recipe page with more information regarding the recipe.
With nuxt you can do this relatively easily https://nuxtjs.org/guide/routing/
Right now the URL is hardcoded in the application. This should be dynamic whether in development, production, etc.
Right now axios is loading all recipes from api. I am not sure whether this will cause problems when scaling. Need to look into dynamically loading recipes as the user scrolls down to the bottom of the page.
After switching from orm
package to raw sqlalchemy
async support, I ran into the issue of exceptions being raised when a unique constraint was broken.
The prior functionality was to except the Unique constraint exception and move along with the next ingredient, but now it is breaking the add recipe endpoint:
ERROR: duplicate key value violates unique constraint "ingredients_ingredient_key"
A cleaner solution would be to first check if ingredient exists before trying to add it.
Update the readme to give an overview of the what the project entails.
Currently, I do not have anything in-place regarding database migrations. I am completely removing the database volume and recreating the tables.
Goal:
Documentation needed for frontend build or another make command will be usefull
cd frontend
yarn install
nuxt generate
Another things backend failing unless you build images locally since backend/api/start.sh
needed to run
it gives this error
File "/opt/mychef/app/main.py", line 4, in <module>
from app.api.v1.router import router
File "/opt/mychef/app/api/v1/router.py", line 3, in <module>
from .endpoints import ingredients, recipes, sources
File "/opt/mychef/app/api/v1/endpoints/ingredients.py", line 12, in <module>
from app.db.repositories.ingredients import IngredientsRepository
ModuleNotFoundError: No module named 'app.db.repositories'
[2022-03-23 19:13:18 +0000] [12] [INFO] Worker exiting (pid: 12)
[2022-03-23 19:13:18 +0000] [1] [INFO] Shutting down: Master
[2022-03-23 19:13:18 +0000] [1] [INFO] Reason: Worker failed to boot.```
When I comment that line it worked fine and backend updated. before that i tried like couple times and every time scraper failed Recipe already exist.
I guess in my first run scraper interrupted and when I restart make scrape
it fails on same recipe and this does not allow to update further recipes with backend
Many of the dependencies have become outdated and I ran into trouble build and running the app in clean environment.
May want to also consider switching images to debian to avoid long build times with alpine.
Right now we load a blank nlp model and attach it to the app. Instead we should return None if the model is not found and return an error when a recipe post request is attempted, which should consequently stop the spider as well.
Add base frontend to application.
The following should be done:
web
service to docker-composeI think it is a good idea to refactor front end to use nuxt instead of vue for three main reasons:
The UI should show that no recipes were found when the frontend does not receive recipes from the api.
Need a way to display available ingredients when the user is inputting data. Right now we only store a list of ingredients as a JSON array via the recipe endpoint.
Tasks:
Update docker service for the api to utilize gunicorn for multiple workers etc.
Follow advice from https://fastapi.tiangolo.com/deployment/
Link to docker image https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker
Improve UX by dynamically changing the grid dimensions of the recipe list:
Goal:
Make scraper an optional service through using thedepends_on
keyword in docker-compose.
Before how I started service:
docker-compose up -d
which started all service
New way:
docker compose up ui
which will start db and api because ui depends on these
Also make the entrypoint of scraper scrapy
.
Prompt user for ingredients.
Goal:
Horizon:
I think it is a good idea to refactor front end to use nuxt instead of vue for three main reasons:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.