randonneuring-intelligence 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- randonneuring_intelligence-0.1.0/LICENSE +21 -0
- randonneuring_intelligence-0.1.0/PKG-INFO +193 -0
- randonneuring_intelligence-0.1.0/README.md +162 -0
- randonneuring_intelligence-0.1.0/pyproject.toml +79 -0
- randonneuring_intelligence-0.1.0/randonneuring_intelligence.egg-info/PKG-INFO +193 -0
- randonneuring_intelligence-0.1.0/randonneuring_intelligence.egg-info/SOURCES.txt +19 -0
- randonneuring_intelligence-0.1.0/randonneuring_intelligence.egg-info/dependency_links.txt +1 -0
- randonneuring_intelligence-0.1.0/randonneuring_intelligence.egg-info/requires.txt +7 -0
- randonneuring_intelligence-0.1.0/randonneuring_intelligence.egg-info/top_level.txt +1 -0
- randonneuring_intelligence-0.1.0/setup.cfg +4 -0
- randonneuring_intelligence-0.1.0/src/randonneuring_intelligence/__init__.py +9 -0
- randonneuring_intelligence-0.1.0/src/randonneuring_intelligence/audax_india/__init__.py +88 -0
- randonneuring_intelligence-0.1.0/src/randonneuring_intelligence/audax_india/aggregations.py +281 -0
- randonneuring_intelligence-0.1.0/src/randonneuring_intelligence/audax_india/data_loader.py +163 -0
- randonneuring_intelligence-0.1.0/src/randonneuring_intelligence/audax_india/filters.py +216 -0
- randonneuring_intelligence-0.1.0/src/randonneuring_intelligence/audax_india/queries.py +123 -0
- randonneuring_intelligence-0.1.0/src/randonneuring_intelligence/lrm/__init__.py +54 -0
- randonneuring_intelligence-0.1.0/src/randonneuring_intelligence/lrm/aggregations.py +253 -0
- randonneuring_intelligence-0.1.0/src/randonneuring_intelligence/lrm/data_loader.py +53 -0
- randonneuring_intelligence-0.1.0/src/randonneuring_intelligence/lrm/filters.py +182 -0
- randonneuring_intelligence-0.1.0/src/randonneuring_intelligence/lrm/queries.py +103 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Randonneuring Intelligence Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: randonneuring-intelligence
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python libraries for processing and analyzing randonneuring cycling event data
|
|
5
|
+
Author-email: Prathap Pandian <mprathappandian@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/mprathappandian/randonneuring-intelligence
|
|
8
|
+
Project-URL: Repository, https://github.com/mprathappandian/randonneuring-intelligence
|
|
9
|
+
Project-URL: Documentation, https://github.com/mprathappandian/randonneuring-intelligence/blob/main/README.md
|
|
10
|
+
Keywords: randonneuring,cycling,audax,data-analysis,lrm
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Requires-Python: >=3.8
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest>=7.4.0; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
27
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
28
|
+
Requires-Dist: flake8>=6.0.0; extra == "dev"
|
|
29
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
30
|
+
Dynamic: license-file
|
|
31
|
+
|
|
32
|
+
# Randonneuring Intelligence
|
|
33
|
+
|
|
34
|
+
A comprehensive Python library for processing and analyzing randonneuring cycling event data from multiple sources.
|
|
35
|
+
|
|
36
|
+
## Overview
|
|
37
|
+
|
|
38
|
+
This library provides two main modules for working with randonneuring data:
|
|
39
|
+
|
|
40
|
+
- **audax_india**: Process and analyze Audax India event and participant data
|
|
41
|
+
- **lrm**: Process and analyze Long Randonnée Medal (LRM) results from worldwide events
|
|
42
|
+
|
|
43
|
+
## Features
|
|
44
|
+
|
|
45
|
+
### Audax India Module (32 functions)
|
|
46
|
+
- Load and merge event catalogs with detailed participant data
|
|
47
|
+
- Filter events by year, club, location, state, distance, status
|
|
48
|
+
- Filter participants by name, club, result status, medal, fee payment
|
|
49
|
+
- Statistical analysis: event stats, club stats, rider stats, completion rates
|
|
50
|
+
- Query functions for unique values across all dimensions
|
|
51
|
+
|
|
52
|
+
### LRM Module (21 functions)
|
|
53
|
+
- Load worldwide LRM result data
|
|
54
|
+
- Filter by year, rider, country, event, club, distance, gender, time
|
|
55
|
+
- Statistical analysis: rider stats, club stats, event stats, time analysis
|
|
56
|
+
- Gender distribution analysis
|
|
57
|
+
- Query functions for unique values
|
|
58
|
+
|
|
59
|
+
## Installation
|
|
60
|
+
|
|
61
|
+
### From source
|
|
62
|
+
```bash
|
|
63
|
+
cd intelligence
|
|
64
|
+
pip install -e .
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### With development dependencies
|
|
68
|
+
```bash
|
|
69
|
+
pip install -e ".[dev]"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Quick Start
|
|
73
|
+
|
|
74
|
+
### Audax India
|
|
75
|
+
```python
|
|
76
|
+
from randonneuring_intelligence.audax_india import (
|
|
77
|
+
load_events,
|
|
78
|
+
filter_events_by_year,
|
|
79
|
+
get_club_statistics
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
# Load data
|
|
83
|
+
events = load_events('data/audax_india/events.json')
|
|
84
|
+
|
|
85
|
+
# Filter 2023 events
|
|
86
|
+
events_2023 = filter_events_by_year(events, year=2023)
|
|
87
|
+
|
|
88
|
+
# Get club statistics
|
|
89
|
+
stats = get_club_statistics(events, "Pune Randonneurs")
|
|
90
|
+
print(f"Total events: {stats['total_events']}")
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### LRM
|
|
94
|
+
```python
|
|
95
|
+
from randonneuring_intelligence.lrm import (
|
|
96
|
+
load_data,
|
|
97
|
+
filter_by_year,
|
|
98
|
+
get_rider_stats
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
# Load data
|
|
102
|
+
records = load_data('data/lrm/results.json')
|
|
103
|
+
|
|
104
|
+
# Filter and analyze
|
|
105
|
+
records_2023 = filter_by_year(records, year=2023)
|
|
106
|
+
stats = get_rider_stats(records, "SMITH, John")
|
|
107
|
+
print(f"Total events: {stats['total_events']}")
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Project Structure
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
intelligence/
|
|
114
|
+
├── src/
|
|
115
|
+
│ └── randonneuring_intelligence/
|
|
116
|
+
│ ├── __init__.py
|
|
117
|
+
│ ├── audax_india/ # Audax India module
|
|
118
|
+
│ │ ├── __init__.py
|
|
119
|
+
│ │ ├── data_loader.py
|
|
120
|
+
│ │ ├── filters.py
|
|
121
|
+
│ │ ├── aggregations.py
|
|
122
|
+
│ │ └── queries.py
|
|
123
|
+
│ └── lrm/ # LRM module
|
|
124
|
+
│ ├── __init__.py
|
|
125
|
+
│ ├── data_loader.py
|
|
126
|
+
│ ├── filters.py
|
|
127
|
+
│ ├── aggregations.py
|
|
128
|
+
│ └── queries.py
|
|
129
|
+
├── tests/
|
|
130
|
+
│ ├── audax_india/
|
|
131
|
+
│ └── lrm/
|
|
132
|
+
├── docs/
|
|
133
|
+
│ ├── audax_india/
|
|
134
|
+
│ └── lrm/
|
|
135
|
+
├── data/ # Data files location
|
|
136
|
+
├── pyproject.toml # Project configuration
|
|
137
|
+
├── LICENSE
|
|
138
|
+
└── README.md
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Development
|
|
142
|
+
|
|
143
|
+
### Running Tests
|
|
144
|
+
```bash
|
|
145
|
+
# Run all tests
|
|
146
|
+
pytest
|
|
147
|
+
|
|
148
|
+
# Run with coverage
|
|
149
|
+
pytest --cov=src --cov-report=html
|
|
150
|
+
|
|
151
|
+
# Run specific module tests
|
|
152
|
+
pytest tests/audax_india/
|
|
153
|
+
pytest tests/lrm/
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Code Quality
|
|
157
|
+
```bash
|
|
158
|
+
# Format code
|
|
159
|
+
black src/ tests/
|
|
160
|
+
|
|
161
|
+
# Lint
|
|
162
|
+
flake8 src/ tests/
|
|
163
|
+
|
|
164
|
+
# Type checking
|
|
165
|
+
mypy src/
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Documentation
|
|
169
|
+
|
|
170
|
+
Detailed documentation for each module:
|
|
171
|
+
- [Audax India Documentation](docs/audax_india/README.md)
|
|
172
|
+
- [LRM Documentation](docs/lrm/README.md)
|
|
173
|
+
|
|
174
|
+
## Requirements
|
|
175
|
+
|
|
176
|
+
- Python >= 3.8
|
|
177
|
+
- No external runtime dependencies (pure Python standard library)
|
|
178
|
+
|
|
179
|
+
## License
|
|
180
|
+
|
|
181
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
182
|
+
|
|
183
|
+
## Contributing
|
|
184
|
+
|
|
185
|
+
Contributions are welcome! Please ensure:
|
|
186
|
+
1. All tests pass
|
|
187
|
+
2. Code is formatted with black
|
|
188
|
+
3. Type hints are included
|
|
189
|
+
4. Documentation is updated
|
|
190
|
+
|
|
191
|
+
## Authors
|
|
192
|
+
|
|
193
|
+
Randonneuring Intelligence Team
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Randonneuring Intelligence
|
|
2
|
+
|
|
3
|
+
A comprehensive Python library for processing and analyzing randonneuring cycling event data from multiple sources.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This library provides two main modules for working with randonneuring data:
|
|
8
|
+
|
|
9
|
+
- **audax_india**: Process and analyze Audax India event and participant data
|
|
10
|
+
- **lrm**: Process and analyze Long Randonnée Medal (LRM) results from worldwide events
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
### Audax India Module (32 functions)
|
|
15
|
+
- Load and merge event catalogs with detailed participant data
|
|
16
|
+
- Filter events by year, club, location, state, distance, status
|
|
17
|
+
- Filter participants by name, club, result status, medal, fee payment
|
|
18
|
+
- Statistical analysis: event stats, club stats, rider stats, completion rates
|
|
19
|
+
- Query functions for unique values across all dimensions
|
|
20
|
+
|
|
21
|
+
### LRM Module (21 functions)
|
|
22
|
+
- Load worldwide LRM result data
|
|
23
|
+
- Filter by year, rider, country, event, club, distance, gender, time
|
|
24
|
+
- Statistical analysis: rider stats, club stats, event stats, time analysis
|
|
25
|
+
- Gender distribution analysis
|
|
26
|
+
- Query functions for unique values
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
### From source
|
|
31
|
+
```bash
|
|
32
|
+
cd intelligence
|
|
33
|
+
pip install -e .
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### With development dependencies
|
|
37
|
+
```bash
|
|
38
|
+
pip install -e ".[dev]"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Quick Start
|
|
42
|
+
|
|
43
|
+
### Audax India
|
|
44
|
+
```python
|
|
45
|
+
from randonneuring_intelligence.audax_india import (
|
|
46
|
+
load_events,
|
|
47
|
+
filter_events_by_year,
|
|
48
|
+
get_club_statistics
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
# Load data
|
|
52
|
+
events = load_events('data/audax_india/events.json')
|
|
53
|
+
|
|
54
|
+
# Filter 2023 events
|
|
55
|
+
events_2023 = filter_events_by_year(events, year=2023)
|
|
56
|
+
|
|
57
|
+
# Get club statistics
|
|
58
|
+
stats = get_club_statistics(events, "Pune Randonneurs")
|
|
59
|
+
print(f"Total events: {stats['total_events']}")
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### LRM
|
|
63
|
+
```python
|
|
64
|
+
from randonneuring_intelligence.lrm import (
|
|
65
|
+
load_data,
|
|
66
|
+
filter_by_year,
|
|
67
|
+
get_rider_stats
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
# Load data
|
|
71
|
+
records = load_data('data/lrm/results.json')
|
|
72
|
+
|
|
73
|
+
# Filter and analyze
|
|
74
|
+
records_2023 = filter_by_year(records, year=2023)
|
|
75
|
+
stats = get_rider_stats(records, "SMITH, John")
|
|
76
|
+
print(f"Total events: {stats['total_events']}")
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Project Structure
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
intelligence/
|
|
83
|
+
├── src/
|
|
84
|
+
│ └── randonneuring_intelligence/
|
|
85
|
+
│ ├── __init__.py
|
|
86
|
+
│ ├── audax_india/ # Audax India module
|
|
87
|
+
│ │ ├── __init__.py
|
|
88
|
+
│ │ ├── data_loader.py
|
|
89
|
+
│ │ ├── filters.py
|
|
90
|
+
│ │ ├── aggregations.py
|
|
91
|
+
│ │ └── queries.py
|
|
92
|
+
│ └── lrm/ # LRM module
|
|
93
|
+
│ ├── __init__.py
|
|
94
|
+
│ ├── data_loader.py
|
|
95
|
+
│ ├── filters.py
|
|
96
|
+
│ ├── aggregations.py
|
|
97
|
+
│ └── queries.py
|
|
98
|
+
├── tests/
|
|
99
|
+
│ ├── audax_india/
|
|
100
|
+
│ └── lrm/
|
|
101
|
+
├── docs/
|
|
102
|
+
│ ├── audax_india/
|
|
103
|
+
│ └── lrm/
|
|
104
|
+
├── data/ # Data files location
|
|
105
|
+
├── pyproject.toml # Project configuration
|
|
106
|
+
├── LICENSE
|
|
107
|
+
└── README.md
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Development
|
|
111
|
+
|
|
112
|
+
### Running Tests
|
|
113
|
+
```bash
|
|
114
|
+
# Run all tests
|
|
115
|
+
pytest
|
|
116
|
+
|
|
117
|
+
# Run with coverage
|
|
118
|
+
pytest --cov=src --cov-report=html
|
|
119
|
+
|
|
120
|
+
# Run specific module tests
|
|
121
|
+
pytest tests/audax_india/
|
|
122
|
+
pytest tests/lrm/
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Code Quality
|
|
126
|
+
```bash
|
|
127
|
+
# Format code
|
|
128
|
+
black src/ tests/
|
|
129
|
+
|
|
130
|
+
# Lint
|
|
131
|
+
flake8 src/ tests/
|
|
132
|
+
|
|
133
|
+
# Type checking
|
|
134
|
+
mypy src/
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Documentation
|
|
138
|
+
|
|
139
|
+
Detailed documentation for each module:
|
|
140
|
+
- [Audax India Documentation](docs/audax_india/README.md)
|
|
141
|
+
- [LRM Documentation](docs/lrm/README.md)
|
|
142
|
+
|
|
143
|
+
## Requirements
|
|
144
|
+
|
|
145
|
+
- Python >= 3.8
|
|
146
|
+
- No external runtime dependencies (pure Python standard library)
|
|
147
|
+
|
|
148
|
+
## License
|
|
149
|
+
|
|
150
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
151
|
+
|
|
152
|
+
## Contributing
|
|
153
|
+
|
|
154
|
+
Contributions are welcome! Please ensure:
|
|
155
|
+
1. All tests pass
|
|
156
|
+
2. Code is formatted with black
|
|
157
|
+
3. Type hints are included
|
|
158
|
+
4. Documentation is updated
|
|
159
|
+
|
|
160
|
+
## Authors
|
|
161
|
+
|
|
162
|
+
Randonneuring Intelligence Team
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "randonneuring-intelligence"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Python libraries for processing and analyzing randonneuring cycling event data"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = {text = "MIT"}
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "Prathap Pandian", email = "mprathappandian@gmail.com"}
|
|
14
|
+
]
|
|
15
|
+
keywords = ["randonneuring", "cycling", "audax", "data-analysis", "lrm"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.8",
|
|
22
|
+
"Programming Language :: Python :: 3.9",
|
|
23
|
+
"Programming Language :: Python :: 3.10",
|
|
24
|
+
"Programming Language :: Python :: 3.11",
|
|
25
|
+
"Programming Language :: Python :: 3.12",
|
|
26
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
dependencies = []
|
|
30
|
+
|
|
31
|
+
[project.optional-dependencies]
|
|
32
|
+
dev = [
|
|
33
|
+
"pytest>=7.4.0",
|
|
34
|
+
"pytest-cov>=4.1.0",
|
|
35
|
+
"black>=23.0.0",
|
|
36
|
+
"flake8>=6.0.0",
|
|
37
|
+
"mypy>=1.0.0",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
[project.urls]
|
|
41
|
+
Homepage = "https://github.com/mprathappandian/randonneuring-intelligence"
|
|
42
|
+
Repository = "https://github.com/mprathappandian/randonneuring-intelligence"
|
|
43
|
+
Documentation = "https://github.com/mprathappandian/randonneuring-intelligence/blob/main/README.md"
|
|
44
|
+
|
|
45
|
+
[tool.setuptools]
|
|
46
|
+
packages = ["randonneuring_intelligence", "randonneuring_intelligence.audax_india", "randonneuring_intelligence.lrm"]
|
|
47
|
+
|
|
48
|
+
[tool.setuptools.package-dir]
|
|
49
|
+
"randonneuring_intelligence" = "src/randonneuring_intelligence"
|
|
50
|
+
|
|
51
|
+
[tool.pytest.ini_options]
|
|
52
|
+
testpaths = ["tests"]
|
|
53
|
+
python_files = "test_*.py"
|
|
54
|
+
python_classes = "Test*"
|
|
55
|
+
python_functions = "test_*"
|
|
56
|
+
addopts = "-v --cov=src --cov-report=html --cov-report=term"
|
|
57
|
+
|
|
58
|
+
[tool.black]
|
|
59
|
+
line-length = 100
|
|
60
|
+
target-version = ['py38', 'py39', 'py310', 'py311']
|
|
61
|
+
|
|
62
|
+
[tool.mypy]
|
|
63
|
+
python_version = "3.8"
|
|
64
|
+
warn_return_any = true
|
|
65
|
+
warn_unused_configs = true
|
|
66
|
+
disallow_untyped_defs = true
|
|
67
|
+
|
|
68
|
+
[tool.coverage.run]
|
|
69
|
+
source = ["src"]
|
|
70
|
+
omit = ["*/tests/*", "*/__pycache__/*"]
|
|
71
|
+
|
|
72
|
+
[tool.coverage.report]
|
|
73
|
+
exclude_lines = [
|
|
74
|
+
"pragma: no cover",
|
|
75
|
+
"def __repr__",
|
|
76
|
+
"raise AssertionError",
|
|
77
|
+
"raise NotImplementedError",
|
|
78
|
+
"if __name__ == .__main__.:",
|
|
79
|
+
]
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: randonneuring-intelligence
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python libraries for processing and analyzing randonneuring cycling event data
|
|
5
|
+
Author-email: Prathap Pandian <mprathappandian@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/mprathappandian/randonneuring-intelligence
|
|
8
|
+
Project-URL: Repository, https://github.com/mprathappandian/randonneuring-intelligence
|
|
9
|
+
Project-URL: Documentation, https://github.com/mprathappandian/randonneuring-intelligence/blob/main/README.md
|
|
10
|
+
Keywords: randonneuring,cycling,audax,data-analysis,lrm
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Requires-Python: >=3.8
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest>=7.4.0; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
27
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
28
|
+
Requires-Dist: flake8>=6.0.0; extra == "dev"
|
|
29
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
30
|
+
Dynamic: license-file
|
|
31
|
+
|
|
32
|
+
# Randonneuring Intelligence
|
|
33
|
+
|
|
34
|
+
A comprehensive Python library for processing and analyzing randonneuring cycling event data from multiple sources.
|
|
35
|
+
|
|
36
|
+
## Overview
|
|
37
|
+
|
|
38
|
+
This library provides two main modules for working with randonneuring data:
|
|
39
|
+
|
|
40
|
+
- **audax_india**: Process and analyze Audax India event and participant data
|
|
41
|
+
- **lrm**: Process and analyze Long Randonnée Medal (LRM) results from worldwide events
|
|
42
|
+
|
|
43
|
+
## Features
|
|
44
|
+
|
|
45
|
+
### Audax India Module (32 functions)
|
|
46
|
+
- Load and merge event catalogs with detailed participant data
|
|
47
|
+
- Filter events by year, club, location, state, distance, status
|
|
48
|
+
- Filter participants by name, club, result status, medal, fee payment
|
|
49
|
+
- Statistical analysis: event stats, club stats, rider stats, completion rates
|
|
50
|
+
- Query functions for unique values across all dimensions
|
|
51
|
+
|
|
52
|
+
### LRM Module (21 functions)
|
|
53
|
+
- Load worldwide LRM result data
|
|
54
|
+
- Filter by year, rider, country, event, club, distance, gender, time
|
|
55
|
+
- Statistical analysis: rider stats, club stats, event stats, time analysis
|
|
56
|
+
- Gender distribution analysis
|
|
57
|
+
- Query functions for unique values
|
|
58
|
+
|
|
59
|
+
## Installation
|
|
60
|
+
|
|
61
|
+
### From source
|
|
62
|
+
```bash
|
|
63
|
+
cd intelligence
|
|
64
|
+
pip install -e .
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### With development dependencies
|
|
68
|
+
```bash
|
|
69
|
+
pip install -e ".[dev]"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Quick Start
|
|
73
|
+
|
|
74
|
+
### Audax India
|
|
75
|
+
```python
|
|
76
|
+
from randonneuring_intelligence.audax_india import (
|
|
77
|
+
load_events,
|
|
78
|
+
filter_events_by_year,
|
|
79
|
+
get_club_statistics
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
# Load data
|
|
83
|
+
events = load_events('data/audax_india/events.json')
|
|
84
|
+
|
|
85
|
+
# Filter 2023 events
|
|
86
|
+
events_2023 = filter_events_by_year(events, year=2023)
|
|
87
|
+
|
|
88
|
+
# Get club statistics
|
|
89
|
+
stats = get_club_statistics(events, "Pune Randonneurs")
|
|
90
|
+
print(f"Total events: {stats['total_events']}")
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### LRM
|
|
94
|
+
```python
|
|
95
|
+
from randonneuring_intelligence.lrm import (
|
|
96
|
+
load_data,
|
|
97
|
+
filter_by_year,
|
|
98
|
+
get_rider_stats
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
# Load data
|
|
102
|
+
records = load_data('data/lrm/results.json')
|
|
103
|
+
|
|
104
|
+
# Filter and analyze
|
|
105
|
+
records_2023 = filter_by_year(records, year=2023)
|
|
106
|
+
stats = get_rider_stats(records, "SMITH, John")
|
|
107
|
+
print(f"Total events: {stats['total_events']}")
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Project Structure
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
intelligence/
|
|
114
|
+
├── src/
|
|
115
|
+
│ └── randonneuring_intelligence/
|
|
116
|
+
│ ├── __init__.py
|
|
117
|
+
│ ├── audax_india/ # Audax India module
|
|
118
|
+
│ │ ├── __init__.py
|
|
119
|
+
│ │ ├── data_loader.py
|
|
120
|
+
│ │ ├── filters.py
|
|
121
|
+
│ │ ├── aggregations.py
|
|
122
|
+
│ │ └── queries.py
|
|
123
|
+
│ └── lrm/ # LRM module
|
|
124
|
+
│ ├── __init__.py
|
|
125
|
+
│ ├── data_loader.py
|
|
126
|
+
│ ├── filters.py
|
|
127
|
+
│ ├── aggregations.py
|
|
128
|
+
│ └── queries.py
|
|
129
|
+
├── tests/
|
|
130
|
+
│ ├── audax_india/
|
|
131
|
+
│ └── lrm/
|
|
132
|
+
├── docs/
|
|
133
|
+
│ ├── audax_india/
|
|
134
|
+
│ └── lrm/
|
|
135
|
+
├── data/ # Data files location
|
|
136
|
+
├── pyproject.toml # Project configuration
|
|
137
|
+
├── LICENSE
|
|
138
|
+
└── README.md
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Development
|
|
142
|
+
|
|
143
|
+
### Running Tests
|
|
144
|
+
```bash
|
|
145
|
+
# Run all tests
|
|
146
|
+
pytest
|
|
147
|
+
|
|
148
|
+
# Run with coverage
|
|
149
|
+
pytest --cov=src --cov-report=html
|
|
150
|
+
|
|
151
|
+
# Run specific module tests
|
|
152
|
+
pytest tests/audax_india/
|
|
153
|
+
pytest tests/lrm/
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Code Quality
|
|
157
|
+
```bash
|
|
158
|
+
# Format code
|
|
159
|
+
black src/ tests/
|
|
160
|
+
|
|
161
|
+
# Lint
|
|
162
|
+
flake8 src/ tests/
|
|
163
|
+
|
|
164
|
+
# Type checking
|
|
165
|
+
mypy src/
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Documentation
|
|
169
|
+
|
|
170
|
+
Detailed documentation for each module:
|
|
171
|
+
- [Audax India Documentation](docs/audax_india/README.md)
|
|
172
|
+
- [LRM Documentation](docs/lrm/README.md)
|
|
173
|
+
|
|
174
|
+
## Requirements
|
|
175
|
+
|
|
176
|
+
- Python >= 3.8
|
|
177
|
+
- No external runtime dependencies (pure Python standard library)
|
|
178
|
+
|
|
179
|
+
## License
|
|
180
|
+
|
|
181
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
182
|
+
|
|
183
|
+
## Contributing
|
|
184
|
+
|
|
185
|
+
Contributions are welcome! Please ensure:
|
|
186
|
+
1. All tests pass
|
|
187
|
+
2. Code is formatted with black
|
|
188
|
+
3. Type hints are included
|
|
189
|
+
4. Documentation is updated
|
|
190
|
+
|
|
191
|
+
## Authors
|
|
192
|
+
|
|
193
|
+
Randonneuring Intelligence Team
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
randonneuring_intelligence.egg-info/PKG-INFO
|
|
5
|
+
randonneuring_intelligence.egg-info/SOURCES.txt
|
|
6
|
+
randonneuring_intelligence.egg-info/dependency_links.txt
|
|
7
|
+
randonneuring_intelligence.egg-info/requires.txt
|
|
8
|
+
randonneuring_intelligence.egg-info/top_level.txt
|
|
9
|
+
src/randonneuring_intelligence/__init__.py
|
|
10
|
+
src/randonneuring_intelligence/audax_india/__init__.py
|
|
11
|
+
src/randonneuring_intelligence/audax_india/aggregations.py
|
|
12
|
+
src/randonneuring_intelligence/audax_india/data_loader.py
|
|
13
|
+
src/randonneuring_intelligence/audax_india/filters.py
|
|
14
|
+
src/randonneuring_intelligence/audax_india/queries.py
|
|
15
|
+
src/randonneuring_intelligence/lrm/__init__.py
|
|
16
|
+
src/randonneuring_intelligence/lrm/aggregations.py
|
|
17
|
+
src/randonneuring_intelligence/lrm/data_loader.py
|
|
18
|
+
src/randonneuring_intelligence/lrm/filters.py
|
|
19
|
+
src/randonneuring_intelligence/lrm/queries.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
randonneuring_intelligence
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""Randonneuring Intelligence - Data processing and analysis for randonneuring cycling events"""
|
|
2
|
+
|
|
3
|
+
__version__ = "0.1.0"
|
|
4
|
+
__author__ = "Randonneuring Intelligence Team"
|
|
5
|
+
|
|
6
|
+
from . import audax_india
|
|
7
|
+
from . import lrm
|
|
8
|
+
|
|
9
|
+
__all__ = ["audax_india", "lrm", "__version__"]
|