Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,26 @@ jobs:
UI:
runs-on: ubuntu-latest
steps:
- name: Get yarn cache dir
id: yarnCache
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v5
with:
package_json_file: ui/package.json
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Cache node modules
uses: actions/cache@v4
with:
path: ${{ steps.yarnCache.outputs.dir }}
key: ${{ runner.os }}-build-cache-yarn-${{ hashFiles('**/yarn.lock') }}
node-version: 22.x
cache: pnpm
cache-dependency-path: ui/pnpm-lock.yaml
- name: Install dependencies
working-directory: ui
run: yarn install
run: pnpm install
- name: Lint
working-directory: ui
run: yarn lint
run: pnpm lint
- name: Test
working-directory: ui
run: yarn test
run: pnpm test
- name: Coveralls
uses: coverallsapp/github-action@v2
continue-on-error: true
Expand All @@ -44,7 +41,7 @@ jobs:
parallel: true
- name: Build UI
working-directory: ui
run: yarn build
run: pnpm build

Python:
name: Python ${{ matrix.python }}, OctoPrint ${{ matrix.octoprint }}
Expand Down Expand Up @@ -107,15 +104,15 @@ jobs:
with:
path: ${{ steps.pipCache.outputs.dir }}
key: ${{ runner.os }}-build-cache-pip-python-${{ matrix.python }}-octoprint-${{ matrix.octoprint}}
- name: Install setuptools 81
# https://github.com/pypa/setuptools/issues/3085
run: pip install 'setuptools>=81.0.0,<82.0.0'
- name: Install OctoPrint
# see https://stackoverflow.com/questions/49854628/how-do-i-pip-install-the-latest-patch-number-of-a-package
run: pip install octoprint~=${{ matrix.octoprint }}.0
- name: Install Wheel
# see https://community.octoprint.org/t/setuptools-error-while-installing-plugin-octoklipper-on-manual-op-installation/51387
run: pip install wheel
- name: Fixed setuptools
# see https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html
run: pip install "setuptools~=79.0.0"
- name: Make liblgpio.so
if: ${{ matrix.python == '3.13' }}
# see https://github.com/borisbu/OctoRelay/issues/346#issuecomment-2849009685
Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,28 @@ jobs:
name: Build the distribution
runs-on: ubuntu-latest
env:
NODE_VERSION: 20.x
NODE_VERSION: 22.x
PYTHON_VERSION: 3.11
OCTOPRINT_VERSION: 1.9
OCTOPRINT_VERSION: 1.11
steps:
### UI
- name: Get yarn cache dir
id: yarnCache
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v5
with:
package_json_file: ui/package.json
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache node modules
uses: actions/cache@v4
with:
path: ${{ steps.yarnCache.outputs.dir }}
key: ${{ runner.os }}-release-cache-yarn-${{ hashFiles('**/yarn.lock') }}
cache: pnpm
cache-dependency-path: ui/pnpm-lock.yaml
- name: Install UI dependencies
working-directory: ui
run: yarn install
run: pnpm install
- name: Build UI
working-directory: ui
run: yarn build
run: pnpm build
### Python
- name: Install Python
uses: actions/setup-python@v5
Expand Down
4 changes: 2 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ source-roots=

# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes
# suggestion-mode=yes

# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
Expand Down Expand Up @@ -193,7 +193,7 @@ good-names=Run

# Good variable names regexes, separated by a comma. If names match any regex,
# they will always be accepted
good-names-rgxs=^v\d+$
good-names-rgxs=^v\d+$,.*Mock$

# Include a hint for the correct naming format with invalid-name.
include-naming-hint=no
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Version 5

### 5.3.0

- Adds `pyproject.toml` file to the distribution:
- See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
- The bundler changed from `tsup` to `tsdown`;
- Upgrades to UI and dev dependencies.

### 5.2.0

- Switched from SASS to LESS;
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include README.md
include CHANGELOG.md
include pyproject.toml
recursive-include octoprint_octorelay/templates *
recursive-include octoprint_octorelay/translations *
recursive-include octoprint_octorelay/static *
Expand Down
6 changes: 3 additions & 3 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
[mypy]
check_untyped_defs = True
exclude = (?x)(
_version\.py$
)

[mypy-octoprint.*]
ignore_missing_imports = True
Expand All @@ -12,3 +9,6 @@ ignore_missing_imports = True

[mypy-flask.*]
ignore_missing_imports = True

[mypy-octoprint_octorelay._version]
ignore_errors = True
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[build-system]
requires = [
"setuptools",
"wheel",
"octoprint",
]
build-backend = "setuptools.build_meta"
Loading
Loading