-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hdforce v1.1.2 w/ updated test types to include TS test names and IDs
- Loading branch information
1 parent
52d5637
commit 56f0540
Showing
46 changed files
with
1,283 additions
and
302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ name: Test Package and TestPyPI | |
on: | ||
push: | ||
branches: | ||
- dev_env | ||
- '*' | ||
|
||
jobs: | ||
test-package: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Update README Badges | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
update-readme: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Update README badges | ||
run: | | ||
sed -i "s|branch=.*)](https://github.com/HawkinDynamics/hawkinPy/actions/workflows/push-test.yml)|branch=${GITHUB_REF#refs/heads/})](https://github.com/HawkinDynamics/hawkinPy/actions/workflows/push-test.yml)|" README.md | ||
sed -i "s|hawkinPy/.*)](https://img.shields.io/github/last-commit/HawkinDynamics/hawkinPy/)|hawkinPy/${GITHUB_REF#refs/heads/})](https://img.shields.io/github/last-commit/HawkinDynamics/hawkinPy/)|" README.md | ||
- name: Commit and push changes | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git add README.md | ||
git commit -m "Update README badges with branch ${GITHUB_REF#refs/heads/}" | ||
git push | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
__`CreateAthletes(athletes: List[NewAthletes])`__ | ||
|
||
### Description | ||
Create athletes for your account. Up to 500 at one time. | ||
|
||
### Parameters | ||
`athletes`: (_list_) A list of Athletes with class of `NewAthlete`, which requires a "name". If other parameters are left, they will assume default values. | ||
|
||
### Classes | ||
`NewAthlete`: (_class_) | ||
**REQUIRED** | ||
* name: _str_ | ||
* active: _str_ | ||
*Optional* | ||
* teams: _list_ | ||
* groups: _list_ | ||
* external: _dict_ {externalName1 : externalValue1, externalName2 : externalValue2} | ||
|
||
### Returns | ||
A list of AthleteResult objects indicating the success or failure of each athlete creation. | ||
|
||
* __successful__: list of names of athletes added successfully | ||
* __failures__: list of athletes that failed in execution, grouped by their reason for failure. | ||
|
||
### Raises | ||
**Exception** | ||
|
||
* No Access Token Found. | ||
* If the HTTP response status is not 200, indicating an unsuccessful API request, or if there is a failure in parsing the JSON response. | ||
|
||
|
||
### Example | ||
|
||
``` Python | ||
from hdforce import CreateAthletes, NewAthlete | ||
|
||
# Create list of athletes to add using NewAthlete class | ||
players = [ | ||
NewAthlete(name= "New Guy", active=False, teams=[], groups=[], external={"Title": "Younger Brother"}), | ||
NewAthlete(name= "Old Guy", active=False, teams=[], groups=[], external={"Title": "Older Brother"}) | ||
] | ||
|
||
# Create players | ||
newRoster = CreateAthletes(athletes = players) | ||
|
||
# Print lgCreation Response | ||
print(newRoster) | ||
``` | ||
|
||
_output_ | ||
|
||
{ | ||
"successful": ["New Guy", "Old Guy"], | ||
"failures": [] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.