valdpy 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.
- valdpy-0.1.0/CONTRIBUTING.md +283 -0
- valdpy-0.1.0/LICENSE +21 -0
- valdpy-0.1.0/MANIFEST.in +6 -0
- valdpy-0.1.0/PKG-INFO +410 -0
- valdpy-0.1.0/README.md +366 -0
- valdpy-0.1.0/docs/getting_started.md +111 -0
- valdpy-0.1.0/docs/index.md +41 -0
- valdpy-0.1.0/examples/Vald_Dynamo_Example.ipynb +1033 -0
- valdpy-0.1.0/examples/Vald_Nordbord_Example.ipynb +974 -0
- valdpy-0.1.0/examples/Vald_Smartspeed_Example.ipynb +464 -0
- valdpy-0.1.0/examples/Vald_forceDecks_Example.ipynb +1076 -0
- valdpy-0.1.0/examples/Vald_forceFrame_Example.ipynb +749 -0
- valdpy-0.1.0/pyproject.toml +69 -0
- valdpy-0.1.0/requirements.txt +2 -0
- valdpy-0.1.0/setup.cfg +4 -0
- valdpy-0.1.0/setup.py +42 -0
- valdpy-0.1.0/valdpy/__init__.py +28 -0
- valdpy-0.1.0/valdpy/api/__init__.py +17 -0
- valdpy-0.1.0/valdpy/api/auth.py +252 -0
- valdpy-0.1.0/valdpy/api/dynamo.py +137 -0
- valdpy-0.1.0/valdpy/api/forcedecks.py +274 -0
- valdpy-0.1.0/valdpy/api/forceframe.py +97 -0
- valdpy-0.1.0/valdpy/api/nordbord.py +97 -0
- valdpy-0.1.0/valdpy/api/smartspeed.py +97 -0
- valdpy-0.1.0/valdpy/utils.py +166 -0
- valdpy-0.1.0/valdpy.egg-info/PKG-INFO +410 -0
- valdpy-0.1.0/valdpy.egg-info/SOURCES.txt +28 -0
- valdpy-0.1.0/valdpy.egg-info/dependency_links.txt +1 -0
- valdpy-0.1.0/valdpy.egg-info/requires.txt +14 -0
- valdpy-0.1.0/valdpy.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
# Contributing to VALDPY
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to VALDPY! This document provides guidelines for contributing to the project.
|
|
4
|
+
|
|
5
|
+
## Code of Conduct
|
|
6
|
+
|
|
7
|
+
- Be respectful and professional in all interactions
|
|
8
|
+
- Provide constructive feedback
|
|
9
|
+
- Focus on the issue, not the person
|
|
10
|
+
|
|
11
|
+
## Getting Started
|
|
12
|
+
|
|
13
|
+
1. Fork the repository
|
|
14
|
+
2. Clone your fork: `git clone https://github.com/YOUR_USERNAME/Valdpy.git`
|
|
15
|
+
3. Create a virtual environment: `python -m venv venv`
|
|
16
|
+
4. Activate it: `source venv/bin/activate` (or `venv\Scripts\activate` on Windows)
|
|
17
|
+
5. Install development dependencies: `pip install -e ".[dev]"`
|
|
18
|
+
|
|
19
|
+
## Development Workflow
|
|
20
|
+
|
|
21
|
+
### Before You Start
|
|
22
|
+
- Check [Issues](https://github.com/dgaytanjenkins/Valdpy/issues) to see if someone is already working on it
|
|
23
|
+
- Create an issue to discuss major changes before starting
|
|
24
|
+
|
|
25
|
+
### Making Changes
|
|
26
|
+
|
|
27
|
+
1. Create a feature branch: `git checkout -b feature/your-feature-name`
|
|
28
|
+
2. Make your changes following the code style guidelines below
|
|
29
|
+
3. Add tests for new functionality
|
|
30
|
+
4. Update documentation as needed
|
|
31
|
+
5. Ensure all tests pass: `pytest`
|
|
32
|
+
|
|
33
|
+
### Code Style
|
|
34
|
+
|
|
35
|
+
This project uses:
|
|
36
|
+
- **Black** for code formatting (line length: 100)
|
|
37
|
+
- **isort** for import ordering
|
|
38
|
+
- **MyPy** for type hints (where practical)
|
|
39
|
+
- **Flake8** for linting
|
|
40
|
+
|
|
41
|
+
Format your code before committing:
|
|
42
|
+
```bash
|
|
43
|
+
black valdpy/
|
|
44
|
+
isort valdpy/
|
|
45
|
+
flake8 valdpy/
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Type Hints
|
|
49
|
+
|
|
50
|
+
Use type hints for function signatures:
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
def get_tests(
|
|
54
|
+
self,
|
|
55
|
+
date: str | datetime,
|
|
56
|
+
profile_id: Optional[str] = None
|
|
57
|
+
) -> pd.DataFrame:
|
|
58
|
+
"""Get tests from a specific date."""
|
|
59
|
+
pass
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Docstring Style
|
|
63
|
+
|
|
64
|
+
Use NumPy docstring format:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
def my_function(param1: str, param2: int) -> bool:
|
|
68
|
+
"""
|
|
69
|
+
Short description.
|
|
70
|
+
|
|
71
|
+
Longer description with more details about what
|
|
72
|
+
the function does and how to use it.
|
|
73
|
+
|
|
74
|
+
Parameters
|
|
75
|
+
----------
|
|
76
|
+
param1 : str
|
|
77
|
+
Description of param1
|
|
78
|
+
param2 : int
|
|
79
|
+
Description of param2
|
|
80
|
+
|
|
81
|
+
Returns
|
|
82
|
+
-------
|
|
83
|
+
bool
|
|
84
|
+
Description of return value
|
|
85
|
+
|
|
86
|
+
Raises
|
|
87
|
+
------
|
|
88
|
+
ValueError
|
|
89
|
+
Description of when this is raised
|
|
90
|
+
|
|
91
|
+
Examples
|
|
92
|
+
--------
|
|
93
|
+
>>> result = my_function("hello", 42)
|
|
94
|
+
>>> result
|
|
95
|
+
True
|
|
96
|
+
"""
|
|
97
|
+
pass
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Testing
|
|
101
|
+
|
|
102
|
+
### Write Tests
|
|
103
|
+
```python
|
|
104
|
+
# tests/test_auth.py
|
|
105
|
+
import pytest
|
|
106
|
+
from valdpy import ValdAuth
|
|
107
|
+
|
|
108
|
+
def test_auth_initialization():
|
|
109
|
+
auth = ValdAuth("client_id", "client_secret")
|
|
110
|
+
assert auth.client_id == "client_id"
|
|
111
|
+
|
|
112
|
+
def test_invalid_region():
|
|
113
|
+
with pytest.raises(ValueError):
|
|
114
|
+
ValdAuth("id", "secret", region="Invalid")
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Run Tests
|
|
118
|
+
```bash
|
|
119
|
+
# Run all tests
|
|
120
|
+
pytest
|
|
121
|
+
|
|
122
|
+
# Run with coverage
|
|
123
|
+
pytest --cov=valdpy
|
|
124
|
+
|
|
125
|
+
# Run specific test file
|
|
126
|
+
pytest tests/test_auth.py
|
|
127
|
+
|
|
128
|
+
# Run specific test
|
|
129
|
+
pytest tests/test_auth.py::test_auth_initialization
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Commit Messages
|
|
133
|
+
|
|
134
|
+
Use clear, descriptive commit messages:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
Add: New feature description
|
|
138
|
+
Fix: Bug fix description
|
|
139
|
+
Refactor: Code refactoring description
|
|
140
|
+
Docs: Documentation update description
|
|
141
|
+
Tests: Test update description
|
|
142
|
+
|
|
143
|
+
[OPTIONAL: Longer description explaining why this change
|
|
144
|
+
was necessary, what problem it solves, etc.]
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Example:
|
|
148
|
+
```
|
|
149
|
+
Add: ForceFrame API data pagination support
|
|
150
|
+
|
|
151
|
+
Implements automatic pagination for ForceFrame API
|
|
152
|
+
to handle datasets larger than the single request limit.
|
|
153
|
+
Adds get_tests() method with automatic continuation
|
|
154
|
+
token handling.
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Pull Request Process
|
|
158
|
+
|
|
159
|
+
1. Update [CHANGELOG.md](CHANGELOG.md) with your changes
|
|
160
|
+
2. Ensure all tests pass: `pytest`
|
|
161
|
+
3. Update documentation if needed
|
|
162
|
+
4. Submit PR with clear description of changes
|
|
163
|
+
5. Respond to review feedback promptly
|
|
164
|
+
|
|
165
|
+
### PR Title Format
|
|
166
|
+
```
|
|
167
|
+
[Type]: Brief description
|
|
168
|
+
|
|
169
|
+
Types: Feature, Fix, Refactor, Docs, Tests, CI
|
|
170
|
+
Example: [Feature]: Add automatic pagination for ForceFrame API
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### PR Description Template
|
|
174
|
+
```markdown
|
|
175
|
+
## Description
|
|
176
|
+
Brief explanation of what this PR does.
|
|
177
|
+
|
|
178
|
+
## Type of Change
|
|
179
|
+
- [ ] Bug fix
|
|
180
|
+
- [ ] New feature
|
|
181
|
+
- [ ] Breaking change
|
|
182
|
+
- [ ] Documentation update
|
|
183
|
+
|
|
184
|
+
## Related Issues
|
|
185
|
+
Fixes #123
|
|
186
|
+
|
|
187
|
+
## Testing
|
|
188
|
+
Describe how you tested these changes.
|
|
189
|
+
|
|
190
|
+
## Checklist
|
|
191
|
+
- [ ] Tests added/updated
|
|
192
|
+
- [ ] Documentation updated
|
|
193
|
+
- [ ] Code formatted with Black
|
|
194
|
+
- [ ] All tests passing
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Reporting Bugs
|
|
198
|
+
|
|
199
|
+
Use the [Issue Template](https://github.com/dgaytanjenkins/Valdpy/issues/new) and include:
|
|
200
|
+
|
|
201
|
+
1. **Description**: What is the bug?
|
|
202
|
+
2. **Expected Behavior**: What should happen?
|
|
203
|
+
3. **Actual Behavior**: What actually happens?
|
|
204
|
+
4. **Steps to Reproduce**: How can someone reproduce this?
|
|
205
|
+
5. **Environment**: Python version, OS, VALDPY version
|
|
206
|
+
6. **Error Message**: Full traceback if applicable
|
|
207
|
+
|
|
208
|
+
Example:
|
|
209
|
+
```markdown
|
|
210
|
+
## Description
|
|
211
|
+
API returns empty DataFrame when filtering by profile_id
|
|
212
|
+
|
|
213
|
+
## Expected Behavior
|
|
214
|
+
Should return DataFrame with tests for that profile
|
|
215
|
+
|
|
216
|
+
## Actual Behavior
|
|
217
|
+
Returns empty DataFrame with message "No data found"
|
|
218
|
+
|
|
219
|
+
## Steps to Reproduce
|
|
220
|
+
1. Initialize ForeDecksAPI
|
|
221
|
+
2. Call get_tests_info('01/01/2025', profile_id='123')
|
|
222
|
+
3. Observe empty result
|
|
223
|
+
|
|
224
|
+
## Environment
|
|
225
|
+
- Python 3.9
|
|
226
|
+
- VALDPY 0.1.0
|
|
227
|
+
- Windows 10
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## Feature Requests
|
|
231
|
+
|
|
232
|
+
Suggest new features by [creating an issue](https://github.com/dgaytanjenkins/Valdpy/issues) with:
|
|
233
|
+
|
|
234
|
+
1. **Use Case**: Why is this feature needed?
|
|
235
|
+
2. **Proposed Solution**: How should it work?
|
|
236
|
+
3. **Alternatives**: Are there other ways to solve this?
|
|
237
|
+
|
|
238
|
+
## Documentation
|
|
239
|
+
|
|
240
|
+
Contributions to documentation are welcome:
|
|
241
|
+
|
|
242
|
+
- Fix typos and clarify explanations
|
|
243
|
+
- Add examples and use cases
|
|
244
|
+
- Improve API documentation
|
|
245
|
+
- Create tutorials
|
|
246
|
+
|
|
247
|
+
Documentation files:
|
|
248
|
+
- Main docs: `docs/*.md`
|
|
249
|
+
- API reference: `docs/api_reference/*.md`
|
|
250
|
+
- Examples: `examples/*.ipynb`
|
|
251
|
+
|
|
252
|
+
## Project Structure
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
valdpy/
|
|
256
|
+
├── api/ # API client implementations
|
|
257
|
+
├── utils.py # Utility functions
|
|
258
|
+
└── __init__.py # Package initialization
|
|
259
|
+
|
|
260
|
+
docs/ # Documentation
|
|
261
|
+
examples/ # Jupyter notebook examples
|
|
262
|
+
tests/ # Test suite
|
|
263
|
+
|
|
264
|
+
setup.py
|
|
265
|
+
pyproject.toml
|
|
266
|
+
README.md
|
|
267
|
+
LICENSE
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
## Questions?
|
|
271
|
+
|
|
272
|
+
- Check [FAQ](docs/faq.md)
|
|
273
|
+
- Open a [Discussion](https://github.com/dgaytanjenkins/Valdpy/discussions)
|
|
274
|
+
- Email: dgaytanj@uoregon.edu
|
|
275
|
+
|
|
276
|
+
## Recognition
|
|
277
|
+
|
|
278
|
+
All contributors will be recognized in:
|
|
279
|
+
- CHANGELOG.md
|
|
280
|
+
- README.md (Contributors section)
|
|
281
|
+
- GitHub contributors page
|
|
282
|
+
|
|
283
|
+
Thank you for contributing to VALDPY! 🎉
|
valdpy-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Danny Gaytan-Jenkins
|
|
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.
|
valdpy-0.1.0/MANIFEST.in
ADDED
valdpy-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: valdpy
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python SDK for VALD Performance APIs
|
|
5
|
+
Home-page: https://github.com/dgaytanjenkins/Valdpy
|
|
6
|
+
Author: Danny Gaytan-Jenkins
|
|
7
|
+
Author-email: Danny Gaytan-Jenkins <dgaytanj@uoregon.edu>
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Homepage, https://github.com/dgaytanjenkins/Valdpy
|
|
10
|
+
Project-URL: Bug Reports, https://github.com/dgaytanjenkins/Valdpy/issues
|
|
11
|
+
Project-URL: Documentation, https://github.com/dgaytanjenkins/Valdpy#readme
|
|
12
|
+
Project-URL: Source Code, https://github.com/dgaytanjenkins/Valdpy
|
|
13
|
+
Keywords: vald,performance,forcedecks,dynamo,testing
|
|
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: License :: OSI Approved :: MIT License
|
|
20
|
+
Classifier: Operating System :: OS Independent
|
|
21
|
+
Classifier: Intended Audience :: Developers
|
|
22
|
+
Classifier: Intended Audience :: Science/Research
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering
|
|
24
|
+
Classifier: Development Status :: 3 - Alpha
|
|
25
|
+
Requires-Python: >=3.8
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: requests>=2.28.0
|
|
29
|
+
Requires-Dist: pandas>=1.3.0
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
32
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
33
|
+
Requires-Dist: black>=22.0; extra == "dev"
|
|
34
|
+
Requires-Dist: flake8>=4.0; extra == "dev"
|
|
35
|
+
Requires-Dist: mypy>=0.950; extra == "dev"
|
|
36
|
+
Requires-Dist: sphinx>=4.0; extra == "dev"
|
|
37
|
+
Provides-Extra: docs
|
|
38
|
+
Requires-Dist: sphinx>=4.0; extra == "docs"
|
|
39
|
+
Requires-Dist: sphinx-rtd-theme>=1.0; extra == "docs"
|
|
40
|
+
Dynamic: author
|
|
41
|
+
Dynamic: home-page
|
|
42
|
+
Dynamic: license-file
|
|
43
|
+
Dynamic: requires-python
|
|
44
|
+
|
|
45
|
+
# VALDPY - Python SDK for VALD Performance APIs
|
|
46
|
+
|
|
47
|
+
A comprehensive Python wrapper for **VALD Performance** APIs, providing easy access to data from ForceDecks, Dynamo, ForceFrame, NordBord, and SmartSpeed testing platforms.
|
|
48
|
+
|
|
49
|
+

|
|
50
|
+

|
|
51
|
+

|
|
52
|
+
|
|
53
|
+
## Overview
|
|
54
|
+
|
|
55
|
+
VALDPY simplifies integration with VALD Performance's test data APIs. Whether you're analyzing jump performance, force production, sprint times, or strength metrics, this SDK provides a clean, Pythonic interface for authentication, data retrieval, and processing.
|
|
56
|
+
|
|
57
|
+
Built on the [VALD API Documentation](https://support.vald.com/hc/en-au/articles/23415335574553-How-to-integrate-with-VALD-APIs), this package handles:
|
|
58
|
+
- OAuth 2.0 authentication
|
|
59
|
+
- Multi-region API access (USA, Australia, Europe)
|
|
60
|
+
- Test data retrieval across all VALD platforms
|
|
61
|
+
- Automatic pagination for large datasets
|
|
62
|
+
- Data parsing into pandas DataFrames
|
|
63
|
+
|
|
64
|
+
## Installation
|
|
65
|
+
|
|
66
|
+
### From PyPI (Coming Soon)
|
|
67
|
+
```bash
|
|
68
|
+
pip install valdpy
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### From Source
|
|
72
|
+
```bash
|
|
73
|
+
git clone https://github.com/dgaytanjenkins/Valdpy.git
|
|
74
|
+
cd Valdpy
|
|
75
|
+
pip install -e .
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Development Installation
|
|
79
|
+
```bash
|
|
80
|
+
pip install -e ".[dev]"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Quick Start
|
|
84
|
+
|
|
85
|
+
### 1. Setup Credentials
|
|
86
|
+
|
|
87
|
+
Create a JSON credentials file (`vald_api_cred.txt`):
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"client_id": "your_client_id",
|
|
91
|
+
"client_secret": "your_client_secret",
|
|
92
|
+
"tenant_id": "your_tenant_id"
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 2. Basic Usage
|
|
97
|
+
|
|
98
|
+
```python
|
|
99
|
+
from valdpy import ValdAuth, ForeDecksAPI
|
|
100
|
+
from valdpy.utils import read_credentials
|
|
101
|
+
|
|
102
|
+
# Load credentials
|
|
103
|
+
creds = read_credentials('vald_api_cred.txt')
|
|
104
|
+
|
|
105
|
+
# Initialize authentication
|
|
106
|
+
auth = ValdAuth(
|
|
107
|
+
client_id=creds['client_id'],
|
|
108
|
+
client_secret=creds['client_secret'],
|
|
109
|
+
tenant_id=creds['tenant_id'],
|
|
110
|
+
region='USA'
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
# Get access token
|
|
114
|
+
auth.get_token()
|
|
115
|
+
|
|
116
|
+
# Initialize ForceDecks API
|
|
117
|
+
fd = ForeDecksAPI(
|
|
118
|
+
tenant_id=auth.tenant_id,
|
|
119
|
+
header=auth.header,
|
|
120
|
+
region='USA'
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
# Retrieve tests from a specific date
|
|
124
|
+
tests_df = fd.get_tests_info('01/01/2025')
|
|
125
|
+
print(tests_df.head())
|
|
126
|
+
|
|
127
|
+
# Get results for a specific test
|
|
128
|
+
test_id = tests_df['id'].iloc[0]
|
|
129
|
+
results_df = fd.get_test_results(test_id)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Supported Platforms
|
|
133
|
+
|
|
134
|
+
### ForceDecks
|
|
135
|
+
Force plate testing for power, landing mechanics, and injury risk assessment.
|
|
136
|
+
|
|
137
|
+
```python
|
|
138
|
+
from valdpy import ForeDecksAPI
|
|
139
|
+
|
|
140
|
+
fd = ForeDecksAPI(tenant_id, header, region='USA')
|
|
141
|
+
tests_df = fd.get_tests_info('01/01/2025')
|
|
142
|
+
results_df = fd.get_test_results(test_id)
|
|
143
|
+
force_trace = fd.get_force_trace(test_id) # Raw force data
|
|
144
|
+
recording_details = fd.get_recording_details(test_id)
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Dynamo
|
|
148
|
+
Jump and power testing platform for assessing lower body power production.
|
|
149
|
+
|
|
150
|
+
```python
|
|
151
|
+
from valdpy import DynamoAPI
|
|
152
|
+
|
|
153
|
+
dynamo = DynamoAPI(tenant_id, header)
|
|
154
|
+
tests_df = dynamo.get_tests('01/01/2025', '31/01/2025')
|
|
155
|
+
results_df = dynamo.get_test_results(test_id)
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### ForceFrame
|
|
159
|
+
Advanced force measurement system for detailed biomechanical analysis.
|
|
160
|
+
|
|
161
|
+
```python
|
|
162
|
+
from valdpy import ForceFrameAPI
|
|
163
|
+
|
|
164
|
+
ff = ForceFrameAPI(tenant_id, header)
|
|
165
|
+
tests_df = ff.get_tests_info('01/01/2025')
|
|
166
|
+
results_df = ff.get_test_results(test_id)
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### NordBord
|
|
170
|
+
Leg press strength testing platform for lower body strength assessment.
|
|
171
|
+
|
|
172
|
+
```python
|
|
173
|
+
from valdpy import NordBordAPI
|
|
174
|
+
|
|
175
|
+
nb = NordBordAPI(tenant_id, header)
|
|
176
|
+
tests_df = nb.get_tests_info('01/01/2025')
|
|
177
|
+
results_df = nb.get_test_results(test_id)
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### SmartSpeed
|
|
181
|
+
Timing gate system for sprint, agility, and acceleration testing.
|
|
182
|
+
|
|
183
|
+
```python
|
|
184
|
+
from valdpy import SmartSpeedAPI
|
|
185
|
+
|
|
186
|
+
ss = SmartSpeedAPI(tenant_id, header)
|
|
187
|
+
tests_df = ss.get_tests_info('01/01/2025')
|
|
188
|
+
results_df = ss.get_test_results(test_id)
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## API Reference
|
|
192
|
+
|
|
193
|
+
### ValdAuth
|
|
194
|
+
Main authentication class for VALD APIs.
|
|
195
|
+
|
|
196
|
+
**Methods:**
|
|
197
|
+
- `get_token()` - Obtain OAuth 2.0 access token
|
|
198
|
+
- `get_all_tenants()` - List all accessible tenants
|
|
199
|
+
- `get_tenant_info(tenant_id)` - Get specific tenant details
|
|
200
|
+
- `get_tenant_categories()` - List categories (e.g., Team, Injured)
|
|
201
|
+
- `get_tenant_groups()` - List all groups in tenant
|
|
202
|
+
- `get_group_profiles(group_name, category_name)` - List profiles in a group
|
|
203
|
+
- `assign_groups(profile_id, group_ids)` - Assign groups to a profile
|
|
204
|
+
|
|
205
|
+
### Utility Functions
|
|
206
|
+
Located in `valdpy.utils`:
|
|
207
|
+
|
|
208
|
+
- `read_credentials(filepath)` - Load credentials from JSON file
|
|
209
|
+
- `convert_ticks_to_datetime(ticks)` - Convert .NET ticks to datetime
|
|
210
|
+
- `format_date_to_iso8601(date)` - Format datetime to ISO 8601
|
|
211
|
+
- `get_call()` - Make GET requests to API
|
|
212
|
+
- `post_call()` - Make POST requests to API
|
|
213
|
+
- `put_call()` - Make PUT requests to API
|
|
214
|
+
|
|
215
|
+
## Examples
|
|
216
|
+
|
|
217
|
+
Complete example notebooks are available in the `examples/` directory:
|
|
218
|
+
|
|
219
|
+
- [ForceDecks Example](examples/Vald_forceDecks_Example.ipynb)
|
|
220
|
+
- [Dynamo Example](examples/Vald_Dynamo_Example.ipynb)
|
|
221
|
+
- [ForceFrame Example](examples/Vald_forceFrame_Example.ipynb)
|
|
222
|
+
- [NordBord Example](examples/Vald_Nordbord_Example.ipynb)
|
|
223
|
+
- [SmartSpeed Example](examples/Vald_Smartspeed_Example.ipynb)
|
|
224
|
+
|
|
225
|
+
## Data Processing Examples
|
|
226
|
+
|
|
227
|
+
### Filter tests by date range
|
|
228
|
+
```python
|
|
229
|
+
from datetime import datetime
|
|
230
|
+
import pandas as pd
|
|
231
|
+
|
|
232
|
+
# Get tests for January 2025
|
|
233
|
+
start = '01/01/2025'
|
|
234
|
+
end = '31/01/2025'
|
|
235
|
+
tests_df = dynamo.get_tests(start, end)
|
|
236
|
+
|
|
237
|
+
# Filter by specific profile
|
|
238
|
+
specific_profile = tests_df[tests_df['profileId'] == 'profile_123']
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Combine results across multiple tests
|
|
242
|
+
```python
|
|
243
|
+
all_results = []
|
|
244
|
+
|
|
245
|
+
for test_id in tests_df['id'].head(10):
|
|
246
|
+
results = fd.get_test_results(test_id)
|
|
247
|
+
all_results.append(results)
|
|
248
|
+
|
|
249
|
+
combined_df = pd.concat(all_results, ignore_index=True)
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Export to CSV
|
|
253
|
+
```python
|
|
254
|
+
tests_df.to_csv('forcedecks_tests.csv', index=False)
|
|
255
|
+
results_df.to_csv('test_results.csv', index=False)
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## Regional Endpoints
|
|
259
|
+
|
|
260
|
+
VALDPY supports three regional endpoints:
|
|
261
|
+
|
|
262
|
+
- **USA**: Primary US endpoint
|
|
263
|
+
- **Australia**: AU/NZ endpoint
|
|
264
|
+
- **Europe**: European endpoint
|
|
265
|
+
|
|
266
|
+
Specify region when initializing clients:
|
|
267
|
+
|
|
268
|
+
```python
|
|
269
|
+
auth = ValdAuth(..., region='Australia')
|
|
270
|
+
fd = ForeDecksAPI(..., region='Europe')
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Configuration
|
|
274
|
+
|
|
275
|
+
Environment variables can override defaults:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
export VALD_REGION=USA
|
|
279
|
+
export VALD_CREDENTIALS_PATH=/path/to/credentials.json
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
## Testing
|
|
283
|
+
|
|
284
|
+
Run the test suite:
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
pytest
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
With coverage:
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
pytest --cov=valdpy
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
## Development
|
|
297
|
+
|
|
298
|
+
### Project Structure
|
|
299
|
+
```
|
|
300
|
+
valdpy/
|
|
301
|
+
├── api/ # API client implementations
|
|
302
|
+
│ ├── __init__.py
|
|
303
|
+
│ ├── auth.py # Authentication
|
|
304
|
+
│ ├── dynamo.py # Dynamo API
|
|
305
|
+
│ ├── forcedecks.py # ForceDecks API
|
|
306
|
+
│ ├── forceframe.py # ForceFrame API
|
|
307
|
+
│ ├── nordbord.py # NordBord API
|
|
308
|
+
│ └── smartspeed.py # SmartSpeed API
|
|
309
|
+
├── utils.py # Utility functions
|
|
310
|
+
└── __init__.py # Package initialization
|
|
311
|
+
|
|
312
|
+
examples/ # Jupyter notebook examples
|
|
313
|
+
docs/ # Documentation
|
|
314
|
+
tests/ # Test suite
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### Contributing
|
|
318
|
+
|
|
319
|
+
Contributions are welcome! Please:
|
|
320
|
+
|
|
321
|
+
1. Fork the repository
|
|
322
|
+
2. Create a feature branch (`git checkout -b feature/AmazingFeature`)
|
|
323
|
+
3. Commit your changes (`git commit -m 'Add AmazingFeature'`)
|
|
324
|
+
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
|
325
|
+
5. Open a Pull Request
|
|
326
|
+
|
|
327
|
+
### Code Style
|
|
328
|
+
|
|
329
|
+
This project uses:
|
|
330
|
+
- **Black** for code formatting
|
|
331
|
+
- **isort** for import sorting
|
|
332
|
+
- **MyPy** for type checking
|
|
333
|
+
- **Flake8** for linting
|
|
334
|
+
|
|
335
|
+
Run formatters:
|
|
336
|
+
```bash
|
|
337
|
+
black valdpy/
|
|
338
|
+
isort valdpy/
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
## Documentation
|
|
342
|
+
|
|
343
|
+
Full API documentation is available in [docs/](docs/).
|
|
344
|
+
|
|
345
|
+
### Building Documentation Locally
|
|
346
|
+
```bash
|
|
347
|
+
pip install -e ".[docs]"
|
|
348
|
+
cd docs
|
|
349
|
+
make html
|
|
350
|
+
open _build/html/index.html
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
## Troubleshooting
|
|
354
|
+
|
|
355
|
+
### Authentication Fails
|
|
356
|
+
- Verify credentials in `vald_api_cred.txt`
|
|
357
|
+
- Check that client credentials have appropriate permissions
|
|
358
|
+
- Ensure credentials are valid and not expired
|
|
359
|
+
|
|
360
|
+
### No Data Returned
|
|
361
|
+
- Verify date range (max 180 days for some endpoints)
|
|
362
|
+
- Check that tenant_id and profile_id are correct
|
|
363
|
+
- Ensure modified dates are in ISO 8601 format
|
|
364
|
+
|
|
365
|
+
### Network Errors
|
|
366
|
+
- Verify API region is correct
|
|
367
|
+
- Check internet connectivity
|
|
368
|
+
- Review VALD API status page
|
|
369
|
+
|
|
370
|
+
## Changelog
|
|
371
|
+
|
|
372
|
+
### Version 0.1.0 (2025-05-25)
|
|
373
|
+
- Initial release
|
|
374
|
+
- Support for all five VALD platforms
|
|
375
|
+
- OAuth 2.0 authentication
|
|
376
|
+
- Multi-region support
|
|
377
|
+
- Pandas DataFrame outputs
|
|
378
|
+
|
|
379
|
+
## License
|
|
380
|
+
|
|
381
|
+
This project is licensed under the MIT License - see [LICENSE](LICENSE) file for details.
|
|
382
|
+
|
|
383
|
+
## Citation
|
|
384
|
+
|
|
385
|
+
If you use VALDPY in your research, please cite:
|
|
386
|
+
|
|
387
|
+
```bibtex
|
|
388
|
+
@software{gaytan_jenkins_2025_valdpy,
|
|
389
|
+
title={VALDPY: Python SDK for VALD Performance APIs},
|
|
390
|
+
author={Gaytan-Jenkins, Danny},
|
|
391
|
+
year={2025},
|
|
392
|
+
url={https://github.com/dgaytanjenkins/Valdpy}
|
|
393
|
+
}
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
## Support
|
|
397
|
+
|
|
398
|
+
- 📖 [VALD API Documentation](https://support.vald.com/hc/en-au/articles/23415335574553-How-to-integrate-with-VALD-APIs)
|
|
399
|
+
- 🐛 [Report Issues](https://github.com/dgaytanjenkins/Valdpy/issues)
|
|
400
|
+
- 💬 [Discussions](https://github.com/dgaytanjenkins/Valdpy/discussions)
|
|
401
|
+
|
|
402
|
+
## Disclaimer
|
|
403
|
+
|
|
404
|
+
This package is provided as-is and is not officially affiliated with VALD Performance. Users are responsible for complying with VALD's API terms of service and any applicable licensing agreements.
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
**Built by:** Danny Gaytan-Jenkins
|
|
409
|
+
**Email:** dgaytanj@uoregon.edu
|
|
410
|
+
**Last Updated:** May 25, 2025
|