Hello. I wrote an application to analyse the results of the 'Empire State Run Up', 2013 edition, after I ran the race.
Here you will find my code.
See the previous section called 'Packaging', and then install it on your virtual environment:
python3 -m venv ~/virtualenv/EmpireStateRunUp
. ~/virtualenv/EmpireStateRunUp/bin/activate
pip install --upgrade pip
python -m build .
pip install --upgrade dist/EmpireStateRunUp-0.0.1-py3-none-any.whl
There are 4 scripts that you can run:
- esru_numbers
- esru_outlier
- esru_browser
- esru_plot
If you want to learn more about these programs, please grab a cup of coffe and read the TUTORIAL
python3 -m venv ~/virtualenv/EmpireStateRunUp
. ~/virtualenv/EmpireStateRunUp/bin/activate
pip install --upgrade pip
pip install --editable .[dev,lint]
For example, playing with the 'esru_outlier' application:
. ~/virtualenv/EmpireStateRunUp/bin/activate
pip install textual-dev
# On another terminal: . ~/virtualenv/EmpireStateRunUp/bin/activate && textual console
textual run --dev empirestaterunup.apps:run_outlier
python3 -m venv ~/virtualenv/EmpireStateRunUp
. ~/virtualenv/EmpireStateRunUp/bin/activate
pip install --upgrade pip
pip install --upgrade build
pip install --upgrade wheel
python -m build .
For your user:
pip install --user EmpireStateRunUp
Or using a virtual environment:
python -m venv ~/virtualenv/EmpireStateRunUp && \
. ~/virtualenv/EmpireStateRunUp/bin/acvtivate && \
pip install EmpireStateRunUp
I used the files generated by the ISO-3166-Countries-with-Regional-Codes for the flag lookup, using Regional indicator symbol.
Make sure you check the tutorial. It explains how this project got started, as well showcases features of the applications.
If there is enough interest I may spin this off a separate project. Also, if you see a bug please open an Issue and I will work on a fix.
The applications now support running in web server mode. To enable:
(EmpireStateRunUp) [josevnz@dmaf5 EmpireStateRunUp]$ esru_server --help
usage: esru_server [-h] --application {esru_numbers,esru_outlier,esru_browser} [--port PORT] [--debug] [results ...]
Browse user results
positional arguments:
results Race results.
options:
-h, --help show this help message and exit
--application {esru_numbers,esru_outlier,esru_browser}
Applications that can run in server mode: ['esru_numbers', 'esru_outlier', 'esru_browser']
--port PORT Default port (8000)
--debug Enable debug mode
esru_server --application esru_numbers
# Or if you have an external results file:
sru_server --application esru_browser empirestaterunup/results-full-level-2023.csv