Code Monkey home page Code Monkey logo

whiskyton's Introduction

Whiskython

By Eduardo Cuducos and Gabriel Vicente.

About

This was our very first project in Python, back in 2014. 10 years later, the idea is to use that as a playground to explore Rust bindings in Python projetcs.

This web based app uses an open database about whisky to help you find whiskys you'd probably like. It uses mathematics to run through the tastes classified in that database, and to find the best matches. We were inspired by this data visualization shared on Reddit.

Thanks

We had a lot of Python teachers, we are so glad we could count on you, guys:

In sum, we had the best teachers of the world in Python. Any mistake here is completely our fault.

Also we are glad to have contributions from Henrique Bastos, Lucretiel, Justin Velluppillai and Chris Loverchio.

Installation

Depends on Python 3.12 (or newer), Poetry and Rust.

Install the Python dependencies

$ poetry install

Install the Rust crates

$ poetry run pip install .

Web server

$ poetry run flask --app whiskyton run

Tests

To run tests:

$ cargo test --no-default-features
$ poetry run pytest

Some tests use your local Firefox through Selenium. So get the server running before running tests. If you do not want to run UI tests, use -k 'not ui'.

whiskyton's People

Contributors

cloverchio avatar cuducos avatar henriquebastos avatar lucretiel 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  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  avatar  avatar  avatar  avatar  avatar  avatar

whiskyton's Issues

Implement tests

I have no idea about how to start it. I'm open to pair programming tutors (;

Validate Python code style

You could also look into using an IDE that has PEP-8 validation built-in. Personally, I use PyCharm 3, but there is tons of other choices.

Implement json module

views.py

  • instead of this string concatenation:

wlist = '['
for whisky in whiskies:
wlist = wlist + '\n "' + whisky.distillery + '",'
wlist = wlist[:-1] + '\n]'

  • use the json module:

import json
...
wlist = json.dumps([whisky.distillery for whisky in whiskies])

Optimize DB usage

Make a correlations table (and query) that avoid duplicate correlations (e.g. correlation between whisky=19 and ref=32 could be the same row of whisky=32 and ref=19)

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.