Giter VIP home page Giter VIP logo

mychef's Introduction

Hello there 👋

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.

mychef's People

Contributors

dependabot[bot] avatar logan-connolly avatar sanders41 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mychef's Issues

Tests in CI failing

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.

Lemmatize ingredients

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.

Add env variable for api url

Right now the URL is hardcoded in the application. This should be dynamic whether in development, production, etc.

Dynamically load recipes

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.

Check if ingredient exists before trying to add

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 readme

Update the readme to give an overview of the what the project entails.

Initial run is failing

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.```


Upgrade images and dependencies

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.

Picture size not standardized

The picture size of the recipe cards can change based on the dimensions of the image. Need to confine the size to a defined dimension.

recipe_card_bug

Reject recipes without ingredient extractor

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 frontend to app

Add base frontend to application.

The following should be done:

  • add web service to docker-compose
  • display recipes and pictures of meals in a grid format (Vue + Bootstrap)
  • display ingredients on either hover or click
    • this crowds the overlay container -> in the future will display a Match %
  • open a ticket to add user ingredient input #10
  • open a ticket to improve recipe grid for mobile, medium and large windows #11

Refactor to nuxt

I think it is a good idea to refactor front end to use nuxt instead of vue for three main reasons:

  • SEO => vuxt prerenders html
  • Routing => routing comes with /pages directory
  • State Management => nuxt comes with vuex

No recipes found

The UI should show that no recipes were found when the frontend does not receive recipes from the api.

Add ingredient endpoint

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:

  • Write tests
  • Create a schema and DB model for ingredients
  • Create an endpoint for reading/writing ingredients
  • Write ingredients that are not in DB before storing recipe

Dynamic grid

Improve UX by dynamically changing the grid dimensions of the recipe list:

Goal:

  • Create an adaptive grid for small, medium, and large screens

Make scraper optional service

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.

Accept ingredient input

Prompt user for ingredients.

Goal:

  • At a minimum the app should accept user recipe keywords as input and store

Horizon:

  • Assist ingredient input with completion -> will need to create a table in DB with unique ingredients
  • Rank recipes by Match %

Refactor to nuxt

I think it is a good idea to refactor front end to use nuxt instead of vue for three main reasons:

  • SEO => vuxt prerenders html
  • Routing => routing comes with /pages directory
  • State Management => nuxt comes with vuex

https://nuxtjs.org/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.