-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
823 additions
and
59 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 |
---|---|---|
|
@@ -16,6 +16,22 @@ jobs: | |
- name: Edit version | ||
run: sed -r -i 's/(.*)(version=.*)([0-9]+).([0-9]+).([0-9]+)(.*)/echo "\1\2\3.\4.$((\5+1))\6"/ge' setup.py | ||
|
||
- name: Branch protection OFF | ||
uses: octokit/[email protected] | ||
with: | ||
route: PUT /repos/:repository/branches/1.0.0/protection | ||
repository: ${{ github.repository }} | ||
required_status_checks: | | ||
null | ||
enforce_admins: | | ||
null | ||
required_pull_request_reviews: | | ||
null | ||
restrictions: | | ||
null | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_REPO_ADMIN_TOKEN }} | ||
|
||
- name: Commit changes | ||
uses: EndBug/add-and-commit@v7 | ||
with: | ||
|
@@ -29,6 +45,28 @@ jobs: | |
with: | ||
node-version: '14' | ||
|
||
- name: Branch protection ON | ||
uses: octokit/[email protected] | ||
with: | ||
route: PUT /repos/:repository/branches/1.0.0/protection | ||
repository: ${{ github.repository }} | ||
mediaType: | | ||
previews: | ||
- luke-cage | ||
required_status_checks: | | ||
strict: true | ||
contexts: | ||
- build | ||
enforce_admins: | | ||
null | ||
required_pull_request_reviews: | | ||
dismiss_stale_reviews: true | ||
required_approving_review_count: 1 | ||
restrictions: | | ||
null | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_REPO_ADMIN_TOKEN }} | ||
|
||
- name: Display setup.py | ||
run: cat setup.py | ||
|
||
|
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,34 @@ | ||
# Python SkillCorner Client | ||
## Goal | ||
Skillcorner API retrieves football tracking data. | ||
|
||
## Details | ||
SkillcornerClient uses HTTPBasicAuth to authenticate to https://skillcorner.com domain. Username and password | ||
can be passed as attributes while creating SkillcornerClient instance or set as environment variables | ||
(SKC_USERNAME, SKC_PASSWORD) and read automatically by SkillcornerClient class. | ||
|
||
Methods of SkillcornerClient are generated automatically using metaclass _MethodsGenerator. This metaclass, | ||
basing on pre-prepared dictionaries, freezes particular arguments which cannot be changed and generates | ||
proper method signature. | ||
|
||
## Project Structure | ||
client.py - contains SkillcornerClient class and all methods allowing to interact with Skillcorner API. | ||
|
||
example.py - contains examples of usage SkillcornerClient methods. | ||
|
||
tests - contains mock-based, unit tests allowing to verify if Skillcorner API client works properly. | ||
|
||
## Installation | ||
Package can be installed using pip command: `pip install skillcorner`. | ||
|
||
To install package with extra requirements for testing environment use: `pip install -e skillcorner[test]`. | ||
|
||
To install package with extra requirements for physical visualisation in pandasgui use: | ||
`pip install -e skillcorner[physical_visualisation]`. To use this library make sure that all needed dependencies are | ||
installed in your environment (mainly tested with Ubuntu): | ||
|
||
`apt-get install libglib2.0-0 ffmpeg libsm6 libxext6 libnss3 libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libxtst-dev libxss-dev libdbus-1-dev libevent-dev libfontconfig1-dev libxcb-xinerama0 libxcb-xkb-dev libxcb-render-util0 libxcb-keysyms1 libxcb-image0 libxkbcommon-x11-0 libxcb-icccm4` | ||
|
||
If you are on Debian you may also need to run: | ||
|
||
`ln -s /usr/lib/x86_64-linux-gnu/libxcb-util.so.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1` |
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,5 @@ | ||
requests>=2.20.0 | ||
makefun>=1.10.0 | ||
numpy>=1.18.4, <1.19.0 | ||
pandas | ||
matplotlib>=3.5.0 |
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 |
---|---|---|
|
@@ -4,16 +4,21 @@ | |
name='skillcorner', | ||
version='1.0.4', | ||
description='SkillCorner API client', | ||
long_description='SkillCorner API client', | ||
author='SkillCorner', | ||
author_email='[email protected]', | ||
packages=['skillcorner'], | ||
python_requires='>=3.6', | ||
install_requires=[ | ||
'requests>=2.20.0', | ||
'makefun>=1.10.0' | ||
'makefun>=1.10.0', | ||
'numpy>=1.18.4, <1.19.0', | ||
'pandas', | ||
'matplotlib>=3.5.0', | ||
], | ||
extras_require={ | ||
'test': 'mock==4.0.3', | ||
'release': ['Sphinx==4.2.0', 'sphinx-rtd-theme==1.0.0'] | ||
'release': ['Sphinx==4.2.0', 'sphinx-rtd-theme==1.0.0'], | ||
'physical_visualisation': 'pandasgui', | ||
} | ||
) |
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,3 @@ | ||
from pkg_resources import get_distribution | ||
|
||
__version__ = get_distribution('skillcorner').version |
Oops, something went wrong.