Skip to content

Commit 147fcf6

Browse files
committed
Adding tracking data improvements
1 parent b1dd0e9 commit 147fcf6

10 files changed

+823
-59
lines changed

.github/workflows/packaging-and-releasing.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,22 @@ jobs:
1616
- name: Edit version
1717
run: sed -r -i 's/(.*)(version=.*)([0-9]+).([0-9]+).([0-9]+)(.*)/echo "\1\2\3.\4.$((\5+1))\6"/ge' setup.py
1818

19+
- name: Branch protection OFF
20+
uses: octokit/[email protected]
21+
with:
22+
route: PUT /repos/:repository/branches/1.0.0/protection
23+
repository: ${{ github.repository }}
24+
required_status_checks: |
25+
null
26+
enforce_admins: |
27+
null
28+
required_pull_request_reviews: |
29+
null
30+
restrictions: |
31+
null
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_REPO_ADMIN_TOKEN }}
34+
1935
- name: Commit changes
2036
uses: EndBug/add-and-commit@v7
2137
with:
@@ -29,6 +45,28 @@ jobs:
2945
with:
3046
node-version: '14'
3147

48+
- name: Branch protection ON
49+
uses: octokit/[email protected]
50+
with:
51+
route: PUT /repos/:repository/branches/1.0.0/protection
52+
repository: ${{ github.repository }}
53+
mediaType: |
54+
previews:
55+
- luke-cage
56+
required_status_checks: |
57+
strict: true
58+
contexts:
59+
- build
60+
enforce_admins: |
61+
null
62+
required_pull_request_reviews: |
63+
dismiss_stale_reviews: true
64+
required_approving_review_count: 1
65+
restrictions: |
66+
null
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_REPO_ADMIN_TOKEN }}
69+
3270
- name: Display setup.py
3371
run: cat setup.py
3472

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Python SkillCorner Client
2+
## Goal
3+
Skillcorner API retrieves football tracking data.
4+
5+
## Details
6+
SkillcornerClient uses HTTPBasicAuth to authenticate to https://skillcorner.com domain. Username and password
7+
can be passed as attributes while creating SkillcornerClient instance or set as environment variables
8+
(SKC_USERNAME, SKC_PASSWORD) and read automatically by SkillcornerClient class.
9+
10+
Methods of SkillcornerClient are generated automatically using metaclass _MethodsGenerator. This metaclass,
11+
basing on pre-prepared dictionaries, freezes particular arguments which cannot be changed and generates
12+
proper method signature.
13+
14+
## Project Structure
15+
client.py - contains SkillcornerClient class and all methods allowing to interact with Skillcorner API.
16+
17+
example.py - contains examples of usage SkillcornerClient methods.
18+
19+
tests - contains mock-based, unit tests allowing to verify if Skillcorner API client works properly.
20+
21+
## Installation
22+
Package can be installed using pip command: `pip install skillcorner`.
23+
24+
To install package with extra requirements for testing environment use: `pip install -e skillcorner[test]`.
25+
26+
To install package with extra requirements for physical visualisation in pandasgui use:
27+
`pip install -e skillcorner[physical_visualisation]`. To use this library make sure that all needed dependencies are
28+
installed in your environment:
29+
30+
`apt-get install -y libglib2.0-0 ffmpeg libsm6 libxext6 libnss3 libxcursor-dev
31+
libxcomposite-dev libxdamage-dev libxrandr-dev libxtst-dev libxss-dev libdbus-1-dev libevent-dev libfontconfig1-dev`
32+
33+
`apt-get install -y libxcb-xinerama0 libxcb-xkb-dev libxcb-render-util0 libxcb-keysyms1 libxcb-image0
34+
libxkbcommon-x11-0 libxcb-icccm4`

docks/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
requests>=2.20.0
2+
makefun>=1.10.0
3+
numpy>=1.18.4, <1.19.0
4+
pandas
5+
matplotlib>=3.5.0

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,21 @@
44
name='skillcorner',
55
version='1.0.4',
66
description='SkillCorner API client',
7+
long_description='SkillCorner API client',
78
author='SkillCorner',
89
author_email='[email protected]',
910
packages=['skillcorner'],
1011
python_requires='>=3.6',
1112
install_requires=[
1213
'requests>=2.20.0',
13-
'makefun>=1.10.0'
14+
'makefun>=1.10.0',
15+
'numpy>=1.18.4, <1.19.0',
16+
'pandas',
17+
'matplotlib>=3.5.0',
1418
],
1519
extras_require={
1620
'test': 'mock==4.0.3',
17-
'release': ['Sphinx==4.2.0', 'sphinx-rtd-theme==1.0.0']
21+
'release': ['Sphinx==4.2.0', 'sphinx-rtd-theme==1.0.0'],
22+
'physical_visualisation': 'pandasgui',
1823
}
1924
)

skillcorner/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from pkg_resources import get_distribution
2+
3+
__version__ = get_distribution('skillcorner').version

0 commit comments

Comments
 (0)