Code Monkey home page Code Monkey logo

oval's People

Contributors

johnwheffner avatar jyundt avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

oval's Issues

Add updates for points / registered members

Update Racer and Race models to reflect "current_member" and "points_race" (respectively).

When adding a new race, the "points_race" [T/F] should be automatically populated based on current date (if it is June, July or August).

Additionally, When adding a new participant to a race, the "points" field should be automatically populated points_race == True

Participants should not get points if points are entered but the Racer has current_member = False

Modify txt results file download to include additional data

As per Jack:

Now that I’ve tried to use the txt file for my results, I realize that from theoval, the following things are not included that I normally include:

Winning Time
Fast Lap
Slow Lap
Ave Lap
Number of Starters

These could just be shown at the bottom after the Primes for example.

Jack

Basic Facebook integration

Maybe add a "Share on Facebook" button to each race? Or some type of comment feed somewhere?

@mmaps , what do the kids do these days?

Circular blueprint/view imports

Still figuring out framework stuff. Looking for insight @jyundt @mmaps.

I see for instance marshal/__init__.py imports views (AFTER creating the Blueprint) in order to use the decorators to register routes. And mashal/views.py imports marshal so that it can register the routes. This is definitely counter to all Python style guides. Is this canonical Flask?

Create a "head to head" comparison between the results of two racers

Sample DB query:

select race.date, ra.place as first_racer_place, rb.place as second_racer_place from
(
    select
        participant.race_id as race_id,
        participant.place as place
    from racer
    inner join participant on participant.racer_id = racer.id
    where name = 'First Racer Name'
) ra
inner join
(
    select
        participant.race_id as race_id,
        participant.place as place
    from racer
    inner join participant on participant.racer_id = racer.id
    where name = 'Second Racer Name'
) rb
on ra.race_id = rb.race_id
inner join race on race.id = ra.race_id
order by 1;

Update DB schema to track picnic races

@johnwheffner
Currently, I'm using the "Race Notes" to include some free form text indicating that a race is a "picnic race".

Thoughts on adding a boolean to Race for something like is_picnic or picnic_race? I'm open to suggestions.

Automatically populate "points" field when adding a new Participant to a Race

Similar to how "place" is automatically populated, automatically populate the "points" field.

There will need to be some logic added to Race to determine what races have points (June, July, August?). Or maybe have a boolean when adding a new Race (has_points)?

Racers will probably need a model update to include something like (current_aca_member) to determine if a Racer is eligible for points.

Return Race objects in _gen_race_calendar()

Rather than returning a list of strings, return Race objects.

This will allow the template to render links to a Race in the detailed Standings view (and allow for the template to handle string formatting).

Mike, thoughts?

Error when adding "Point Prime" to a participant with zero points

Traceback:

Exception on /race/138/participant/add/ [POST]
Traceback (most recent call last):
  File "/home/oval/oval/venv/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/oval/oval/venv/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/oval/oval/venv/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/oval/oval/venv/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/oval/oval/venv/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app/decorators.py", line 16, in decorated_view
    return func(*args, **kwargs)
  File "./app/race/views.py", line 307, in add_participant
    points += 1
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'int'

I think a check is required that if points == None && point_prime == True, points = 1.

Or something like that.

Generating "last team" for Individual/MAR standings breaks if Racer is not on a team

Stack trace:

IndexError
IndexError: list index out of range

Traceback (most recent call last)
File "/home/acct.upmchs.net/yundtj/oval/oval/venv/lib/python2.7/site-packages/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
File "/home/acct.upmchs.net/yundtj/oval/oval/venv/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/home/acct.upmchs.net/yundtj/oval/oval/venv/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/acct.upmchs.net/yundtj/oval/oval/venv/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/home/acct.upmchs.net/yundtj/oval/oval/venv/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/acct.upmchs.net/yundtj/oval/oval/venv/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/acct.upmchs.net/yundtj/oval/oval/venv/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/home/acct.upmchs.net/yundtj/oval/oval/venv/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/acct.upmchs.net/yundtj/oval/oval/app/main/views.py", line 225, in standings
standings_type)
File "/home/acct.upmchs.net/yundtj/oval/oval/app/main/views.py", line 188, in generate_standings
results = STANDING_TYPES[standings_type](year, race_class_id, race_calendar)
File "/home/acct.upmchs.net/yundtj/oval/oval/app/main/views.py", line 119, in _gen_ind_standings
Open an interactive python shell in this frame.all()[-1]
IndexError: list index out of range
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object
Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.

Display ACA membership status in Racer view

Feature request from Jack:

When the Racer List is shown, it would be nice to indicate if he/she is a paid ACA member. Right now I have to enter “Edit” to find out. No big deal if it’s a lot of work.

I’d like to see it in the “all racer list”. Similar to the Strava indicator.

Generate raw text file of results (for download)

In order to add results from theoval.us, add a "Download raw text results" button in the Race view.

Sample from Jack:

Details for Race: 05/11/2016 – A
Place             Name                      Team
1                    Keith Hower           Freddie Fu Cycling
(etc.)
19                  John Heffner           GPOA
MAR
MAR Place   Name                       Team
(etc)

image

Display Team for Individual and MAR Standings

Similar to acaracing.com, display the "Team" of the Racer. Unfortunately current_team can't be used (e.g. for generating standings from previous seasons). Maybe something like max() based on the frequency of participation for each team for each rider?

image

Tiebreaks for MAR standings

Do we actually have tiebreak rules? I think it's by number of individual points, but I'm not actually sure.

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.