Skip to main content

My dummy dash app

Project description

dummy_app

Planning

  • Create model train + score api -- done
  • Write training/test data to db -- done
    • update model train to read database -- done
      • to do: need to figure how to pass large datasets through api - jsonify?
  • create dash app that can visualise -- done
    • train/test data scatter plot with linear model predictions
    • return predictions
      • to do: update to make prettier and include time stamps etc.....
  • stand up ci/cd practices - done
    • set up git hooks - done
      • linting pre-hooks?
      • pytest unit tests?
    • github actions - done
      • Steps
      • build simple tests
      • run on github actions on push
  • create docker file that can run and query data -- done
    • docker to create and publish dockerfile
  • Package pipeline - done
    • Test building + importing package -- done
    • Publish package -- done
  • Convert env to poetry - done
  • Host App + serve dataset on cloud platform

Useful code

# Poetry
poetry update
poetry install
poetry build
poetry config pypi-token.pypi  <token>
poetry publish -- build

# Run app
python  dummy_app/model_api_v2.py & 
sleep 5 
python dummy_app/app.py

# Docker commands
docker ps
docker run -d -it flask-api-image bash
docker exec -it ubuntu bash
docker exec -it flask-api-image bash
docker exec -it <container id or name> bash

# Other 
docker-compose down  # Stop container on current dir if there is a docker-compose.yml
docker rm -fv $(docker ps -aq)  # Remove all containers
sudo lsof -i -P -n | grep 8000 # List who's using the port
sudo lsof -i -P -n | grep python 

# Kill jobs
sudo lsof -i -P -n | grep python 
sudo lsof -i -P -n | grep python | awk '{print $2}'
sudo lsof -i -P -n | grep python | awk '{print $2}' | xargs sudo kill -9 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dummy_app-0.0.2.tar.gz (9.7 kB view hashes)

Uploaded Source

Built Distribution

dummy_app-0.0.2-py3-none-any.whl (9.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page