Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.

Commit

Permalink
Action Update: Bump actions/setup-python from 4 to 5 (#19)
Browse files Browse the repository at this point in the history
* Action Update: Bump actions/setup-python from 4 to 5

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix lint

* Add python 3.11 and 3.12

* Change release action

* Only have competitions with seasons

* Fix lint

* Try installing self seperately

* Don't install self

* Remove link self import

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Cyb3r-Jak3 <git@Cyberjake.xyz>
  • Loading branch information
dependabot[bot] and Cyb3r-Jak3 committed Mar 2, 2024
1 parent a752905 commit 788c822
Show file tree
Hide file tree
Showing 16 changed files with 3,676 additions and 3,468 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
jobs:
release:
name: Create Release Asset
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -31,7 +33,7 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v1
uses: crazy-max/ghaction-github-release@v2
if: startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, 3.9, '3.10']
python-version: [3.8, 3.9, '3.10', '3.11', '3.12', 'pypy3.9', 'pypy3.10']
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -61,9 +61,11 @@ jobs:
- name: Install Dependencies
run: |
pip install --upgrade pip wheel
pip install --upgrade pip wheel setuptools
pip install -r requirements-dev.txt
pip install .
# - name: Install self
# run: pip install .

- name: Lint
run: make lint
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:

- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.11'

- name: Install Dependencies
run: |
Expand Down
104 changes: 52 additions & 52 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
.PHONY: clean clean-build clean-pyc test docs

clean: clean-build clean-pyc

full-test: lint test

ifeq ($(OS),Windows_NT)
RM = del //Q //F
RRM = rmdir //Q //S
else
RM = rm -f
RRM = rm -f -r
endif

clean-build:
$(RM) -r build/
$(RM) -r dist/
$(RM) -r *.egg-info

clean-pyc:
find . -name '*.pyc' -exec $(RM) {} +
find . -name '*.pyo' -exec $(RM) {} +
find . -name '*~' -exec $(RM) {} +

build:
pip install --quiet wheel twine -r requirements.txt
pip install --quiet .
python setup.py sdist bdist_wheel

check-dist:
pip install wheel twine --quiet
python setup.py egg_info
python setup.py sdist bdist_wheel
twine check --strict dist/*

lint:
black --check premier_league_api
pylint --disable=invalid-name premier_league_api
flake8 --max-line-length 100 --ignore=F403,F401 --statistics --show-source --count premier_league_api
bandit -r premier_league_api

test:
py.test --cov premier_league_api tests/ -vv
black premier_league_api

gen_comps:
python -c "import premier_league_api; premier_league_api.create_competitions_file()"
black premier_league_api/competitions.py

docs:
sphinx-apidoc -f -o docs/ premier_league_api
$(MAKE) -C docs clean
.PHONY: clean clean-build clean-pyc test docs

clean: clean-build clean-pyc

full-test: lint test

ifeq ($(OS),Windows_NT)
RM = del //Q //F
RRM = rmdir //Q //S
else
RM = rm -f
RRM = rm -f -r
endif

clean-build:
$(RM) -r build/
$(RM) -r dist/
$(RM) -r *.egg-info

clean-pyc:
find . -name '*.pyc' -exec $(RM) {} +
find . -name '*.pyo' -exec $(RM) {} +
find . -name '*~' -exec $(RM) {} +

build:
pip install --quiet wheel twine -r requirements.txt
pip install --quiet .
python setup.py sdist bdist_wheel

check-dist:
pip install wheel twine --quiet
python setup.py egg_info
python setup.py sdist bdist_wheel
twine check --strict dist/*

lint:
black --check premier_league_api
pylint --disable=invalid-name premier_league_api
flake8 --max-line-length 100 --ignore=F403,F401,W503 --statistics --show-source --count premier_league_api
bandit -r premier_league_api

test:
py.test --cov premier_league_api tests/ -vv
black premier_league_api

gen_comps:
python -c "import premier_league_api; premier_league_api.create_competitions_file()"
black premier_league_api/competitions.py

docs:
sphinx-apidoc -f -o docs/ premier_league_api
$(MAKE) -C docs clean
$(MAKE) -C docs html
125 changes: 62 additions & 63 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,63 +1,62 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
from premier_league_api import __version__

sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'premier_league_api'
copyright = '2021, Cyb3r-Jak3'
author = 'Cyb3r-Jak3'

# The full version, including alpha/beta/rc tags
release = __version__


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx_rtd_theme",
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.intersphinx'
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys

sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'premier_league_api'
copyright = '2021-2024, Cyb3r-Jak3'
author = 'Cyb3r-Jak3'

# The full version, including alpha/beta/rc tags
release = "2.0.0"


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx_rtd_theme",
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.intersphinx'
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
19 changes: 10 additions & 9 deletions premier_league_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""API for calling premier league stats and possibly for more leagues"""
from .client import APIClient
from .meta_competitions import create_competitions_file
from .errors import EmptyResponse
from .competitions import *

__version__ = "2.0.0"

__all__ = ["APIClient", "__version__", "EmptyResponse", "create_competitions_file"]
"""API for calling premier league stats and possibly for more leagues"""

from .client import APIClient
from .meta_competitions import create_competitions_file
from .errors import EmptyResponse
from .competitions import *

__version__ = "2.0.0"

__all__ = ["APIClient", "__version__", "EmptyResponse", "create_competitions_file"]
Loading

0 comments on commit 788c822

Please sign in to comment.