Skip to content

Commit

Permalink
Adding tracking data improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jpatacz committed Jun 2, 2022
1 parent b1dd0e9 commit d0247f9
Show file tree
Hide file tree
Showing 10 changed files with 823 additions and 59 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/packaging-and-releasing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down
34 changes: 34 additions & 0 deletions README.md
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`
5 changes: 5 additions & 0 deletions docks/requirements.txt
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
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}
)
3 changes: 3 additions & 0 deletions skillcorner/__init__.py
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
Loading

0 comments on commit d0247f9

Please sign in to comment.