diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 46e0d93..e429b5e 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -5,39 +5,38 @@ name: Python Package on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] jobs: build: - runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9, '3.10', 3.11] + python-version: [3.7, 3.8, 3.9, "3.10", 3.11] steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install flake8 pytest - python -m pip install . - if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=221 --statistics --exclude tests - - name: Test with pytest - run: | - pytest - env: - STEAM_API_KEY: ${{ secrets.STEAM_API_KEY }} + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + python -m pip install . + if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=221 --statistics --exclude tests + - name: Test with pytest + run: | + pytest + env: + STEAM_API_KEY: ${{ secrets.STEAM_API_KEY }} diff --git a/docs/conf.py b/docs/conf.py index bacce40..64031b1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -8,27 +8,31 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -project = 'OpenGSQ Python' -copyright = '2024, OpenGSQ, BattlefieldDuck' -author = 'OpenGSQ, BattlefieldDuck' -release = '2.3.1' +project = "OpenGSQ Python" +copyright = "2024, OpenGSQ, BattlefieldDuck" +author = "OpenGSQ, BattlefieldDuck" +release = "2.3.1" # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -extensions = ['sphinx_rtd_theme', 'sphinx.ext.autodoc'] +extensions = ["sphinx_rtd_theme", "sphinx.ext.autodoc", "sphinx_docsearch"] -templates_path = ['_templates'] -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] -autodoc_member_order = 'bysource' +templates_path = ["_templates"] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] +autodoc_member_order = "bysource" + +docsearch_app_id = "Z4FH0B65P0" +docsearch_api_key = "703d26db3f2af38cbcb3b92d79a048bc" +docsearch_index_name = "python-opengsq" # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -html_theme = 'sphinx_rtd_theme' -html_favicon = 'favicon.ico' -html_static_path = ['_static'] +html_theme = "sphinx_rtd_theme" +html_favicon = "favicon.ico" +html_static_path = ["_static"] # Enabling the extension only when building on GitHub Actions if os.getenv("GITHUB_ACTIONS"): diff --git a/docs/requirements.txt b/docs/requirements.txt index e101d0b..af376c7 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,3 @@ sphinx-rtd-theme==2.0.0 sphinxcontrib-googleanalytics==0.4 +sphinx-docsearch==0.0.4 \ No newline at end of file