Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting OctoPrint 1.10 and Python 3.12 #258

Merged
merged 17 commits into from
Apr 24, 2024
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
19 changes: 14 additions & 5 deletions .github/workflows/CI.yaml
RobinTail marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,36 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
octoprint: [ "1.5", "1.6", "1.7", "1.8", "1.9" ]
python: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
RobinTail marked this conversation as resolved.
Show resolved Hide resolved
octoprint: [ "1.5", "1.6", "1.7", "1.8", "1.9", "1.10" ]
exclude:
# These versions are not compatible to each other:
- octoprint: 1.5
python: 3.10
- octoprint: 1.5
python: 3.11
- octoprint: 1.5
python: 3.12
- octoprint: 1.6
python: 3.10
- octoprint: 1.6
python: 3.11
- octoprint: 1.6
python: 3.12
- octoprint: 1.7
python: 3.10
- octoprint: 1.7
python: 3.11
- octoprint: 1.7
python: 3.12
- octoprint: 1.8
python: 3.10
- octoprint: 1.8
python: 3.11
- octoprint: 1.8
python: 3.12
- octoprint: 1.9
python: 3.12
steps:
- uses: actions/checkout@v4
- name: Install Python
Expand All @@ -90,20 +100,19 @@ jobs:
run: pip install octoprint~=${{ matrix.octoprint }}.0
RobinTail marked this conversation as resolved.
Show resolved Hide resolved
- name: Install Wheel
# see https://community.octoprint.org/t/setuptools-error-while-installing-plugin-octoklipper-on-manual-op-installation/51387
if: matrix.octoprint != '1.9'
run: pip install wheel
- name: Install OctoRelay
run: pip install -e .
- name: Prepare testing environment
run: pip install coverage pylint snapshottest mypy
run: pip install coverage pylint mypy
- name: Test
working-directory: tests
run: python -m coverage run -m unittest test*.py
- name: Report the coverage
working-directory: tests
run: |
python -m coverage lcov --omit=test*,_version*
python -m coverage report --show-missing --omit=test*,_version*,snap_*
python -m coverage report --show-missing --omit=test*,_version*
- name: Coveralls
uses: coverallsapp/github-action@v2
continue-on-error: true
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,26 +68,36 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
octoprint: [ "1.5", "1.6", "1.7", "1.8", "1.9" ]
python: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
octoprint: [ "1.5", "1.6", "1.7", "1.8", "1.9", "1.10" ]
exclude:
# These versions are not compatible to each other:
- octoprint: 1.5
python: 3.10
- octoprint: 1.5
python: 3.11
- octoprint: 1.5
python: 3.12
- octoprint: 1.6
python: 3.10
- octoprint: 1.6
python: 3.11
- octoprint: 1.6
python: 3.12
- octoprint: 1.7
python: 3.10
- octoprint: 1.7
python: 3.11
- octoprint: 1.7
python: 3.12
- octoprint: 1.8
python: 3.10
- octoprint: 1.8
python: 3.11
- octoprint: 1.8
python: 3.12
- octoprint: 1.9
python: 3.12
steps:
- name: Install Python
uses: actions/setup-python@v4
Expand All @@ -102,7 +112,6 @@ jobs:
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
if: matrix.octoprint != '1.9'
run: pip install wheel
- name: Install the distributed package
run: pip install dist/OctoRelay-*.zip
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/snapshot.yaml

This file was deleted.

9 changes: 6 additions & 3 deletions octoprint_octorelay/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def get_version(version_file=STATIC_VERSION_FILE):
if not version:
version = get_version_from_git_archive(version_info)
if not version:
version = Version("unknown", None, None)
# version = Version("unknown", None, None)
version = Version("0.0.0", None, None)
return pep440_format(version)
else:
return version
Expand Down Expand Up @@ -95,7 +96,8 @@ def get_version_from_git():
except ValueError: # No tags, only the git hash
# prepend 'g' to match with format returned by 'git describe'
git = "g{}".format(*description)
release = "unknown"
# release = "unknown"
release = "0.0.0"
dev = None

labels = []
Expand Down Expand Up @@ -141,7 +143,8 @@ def get_version_from_git_archive(version_info):
release, *_ = sorted(version_tags) # prefer e.g. "2.0" over "2.0rc1"
return Version(release, dev=None, labels=None)
else:
return Version("unknown", dev=None, labels=["g{}".format(git_hash)])
# return Version("unknown", dev=None, labels=["g{}".format(git_hash)])
return Version("0.0.0", dev=None, labels=["g{}".format(git_hash)])


__version__ = get_version()
Expand Down
Empty file removed tests/snapshots/__init__.py
Empty file.
Loading
Loading