Skip to content

Commit

Permalink
Merge branch 'use_flit_for_packages' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jzohrab committed Dec 11, 2024
2 parents 03c5da9 + 94762c3 commit 51bf659
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 225 deletions.
46 changes: 31 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: ci

on:
push:
# A branch github-ci-updates can be created and used for ci
# A branch github-ci can be created and used for ci
# experiments and tweaks.
branches: [ "develop", "master", "github-ci", "windows", "pr_413_continued_plugins" ]
branches: [ "develop", "master", "github-ci", "windows" ]
pull_request:
branches: [ "develop", "master" ]

Expand All @@ -20,7 +20,7 @@ jobs:

strategy:
matrix:
python_version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
python_version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]

steps:

Expand All @@ -45,7 +45,12 @@ jobs:
python-version: ${{ matrix.python_version }}
cache: 'pip' # caching pip dependencies

- run: pip install -r requirements-dev.txt
- name: Install packages using flit
run: |
pip install flit
# --only-deps: Installs only the dependencies, not Lute itself
# --deps develop: both regular and optional dependencies.
flit install --only-deps --deps develop
- name: Setup config
run: |
Expand All @@ -63,7 +68,9 @@ jobs:
export MECAB_PATH=/lib/x86_64-linux-gnu/libmecab.so.2
pytest
# Skipping acceptance tests for 3.8, just to save some time.
- name: Acceptance testing
if: matrix.python_version != '3.8'
uses: nick-fields/retry@v3
with:
max_attempts: 3
Expand Down Expand Up @@ -130,7 +137,10 @@ jobs:
python-version: ${{ matrix.python_version }}
cache: 'pip' # caching pip dependencies

- run: pip install -r requirements-dev.txt
- name: Install packages using flit
run: |
pip install flit
flit install --only-deps --deps develop
- name: Setup config
run: |
Expand Down Expand Up @@ -192,14 +202,14 @@ jobs:
- name: test all plugins
run: |
for plugin in $(ls plugins); do
# Lute reqs, such as pytest.
pip install -r requirements-dev.txt
# Lute itself, via toml, so that it can be found
# by each plugin's own "pip install ."
pip install .
# Lute reqs, such as pytest.
# This also installs Lute itself,
# so that it can be found
# by each plugin's own "pip install ."
pip install flit
flit install --deps develop
for plugin in $(ls plugins); do
pushd plugins/$plugin
pip install .
# Note for future: some plugins may have extra reqs not covered by pip
Expand Down Expand Up @@ -237,7 +247,9 @@ jobs:
python-version: ${{ matrix.python_version }}
cache: 'pip' # caching pip dependencies

- run: pip install -r requirements-dev.txt
- run: |
pip install flit
flit install --only-deps --deps develop
- name: Lint
run: inv lint
Expand All @@ -261,7 +273,9 @@ jobs:
with:
python-version: 3.11
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements-dev.txt
- run: |
pip install flit
flit install --only-deps --deps develop
- name: Test docker build
run: |
docker build -f docker/Dockerfile --build-arg INSTALL_EVERYTHING=false -t lute3 .
Expand Down Expand Up @@ -310,7 +324,9 @@ jobs:
[System.IO.File]::WriteAllText("${{ github.workspace }}\lute\config\config.yml", $content)
Get-Content -Path "${{ github.workspace }}\lute\config\config.yml"
- run: pip install -r requirements-dev.txt
- run: |
pip install flit
flit install --only-deps --deps develop
# Can't get playwright to run reliably on Windows.
# - name: Playwright install
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ celerybeat.pid
*.sage.py

# Environments
.env
.venv
.env*
.venv*
env/
venv/
ENV/
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ dev = [
"pylint>=2.17.5,<3",
"pytest-bdd>=7.0.0,<8",
"pytest-splinter>=3.3.2,<4",
"playwright>=1.39.0,<2",
"pre-commit>=3.5.0,<4",
"black>=23.10.1,<24",
]
Expand Down
92 changes: 0 additions & 92 deletions requirements-all.txt

This file was deleted.

68 changes: 0 additions & 68 deletions requirements-dev.txt

This file was deleted.

48 changes: 0 additions & 48 deletions requirements.txt

This file was deleted.

9 changes: 9 additions & 0 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@
@task
def lint(c):
"Run pylint on lute/ and tests/."
# pylint is currently busted for some versions ... :-(
# ref https://github.com/pylint-dev/pylint/issues/10133
print("Starting lint")
pyversion = int(sys.version_info.minor)
if pyversion > 9:
print("WARNING: SKIPPING LINT for python version > 9", flush=True)
print("Ref https://github.com/pylint-dev/pylint/issues/10133", flush=True)
return

# Formats: https://pylint.pycqa.org/en/latest/user_guide/usage/output.html
msgfmt = [
"--ignore-patterns='zz_.*.py'",
Expand Down

0 comments on commit 51bf659

Please sign in to comment.