jyundt / oval Goto Github PK
View Code? Open in Web Editor NEWThe Oval
Home Page: https://theoval.us
License: GNU General Public License v2.0
The Oval
Home Page: https://theoval.us
License: GNU General Public License v2.0
In instances where a participant won the point prime, but was not placed in the results (e.g. DNF), display them at the end of the results with no place.
Add feature to upload an image (race registration form, results sheet, finish line footage) and attach to a race.
Required to have data parity with existing ACA results format.
A few example graphs @mmaps is working on:
After the 1.1.0 changes "Delete Racer" button stopped working.
For seasons with no results yet, e.g., right now what we've got 2017 races entered in the calendar but no results because no races have actually happened yet, we're displaying empty tables. This is ok, but it would look better to say something about not having results yet.
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
Regression from feature for #19.
As per Eric Lundgren:
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
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?
The mobile user experience is pretty rough in the Standings view.
Fixing the first column (name) and row (date) might help this.
Maybe move the point totals to the left as well?
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?
Situation occurs when Participant is not an ACA member, scored points in a higher category already in the season, etc.
Example: 2012 B overall
Craig Cozza and Nate Clair tied with 57 points, but Craig won due to number of wins.
There are two steps required when adding a participant who won the point prime:
This is repetitively redundant.
After performing the first step, a prime (with the text of "Point "Prime) should be automatically added to the participant.
I think this behavior changed with the addition of filters to the Race view, but if a Racer is added, they won't display in the Racer view until they have at least one result.
I think there is something missing here in logging in the Course view.
Sample log:
2016-09-09 14:27:42,930 [INFO] 98.111.250.104 jheffner[7]: course-edit Oval[1] %.2f
Maybe an extra %.2f somewhere?
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;
When adding a new Participant to a race, if DNF is set to True, set Place value to None.
@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.
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.
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?
I tried testing the upload functionality with Doug and got this error every time.
Probably an nginx issue...
For development, you usually want a copy of the current production database. Let's make it easy to grab a dump and load it in.
@johnwheffner I'm leaning towards hiding the columns for races that haven't happened yet.
Unfortunately the extra columns make this difficult to see the total points standings on mobile:
Desktop for reference:
Thoughts?
cc @emilywools in case she has any comments
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.
When adding a new race, anything in the 'starters' field is not saved when clicking "Add".
We will need to track results for B
and W
separately prior to the start of series points.
Maybe some type of sub-race or something?
The Race Edit view functions as expected, but Race Add does not.
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.
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.
Migrate from the existing async SMTP implementation to mailgun.
As per Jack, add it after the number of Starters.
Maybe disqus?
Include the following
List steps required to getting a local DEV environment up and running.
Currently race times are limited to MM:SS, this should be HH:MM:SS for race > 60 minutes.
Do we actually have tiebreak rules? I think it's by number of individual points, but I'm not actually sure.
Each Racer will have a "Connect with STRAVA" button on their Racer page. Clicking the button will perform an OAuth2 authorization against a rider's Strava account using the stravalib python library.
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.