Skip to content

Commit

Permalink
Merge branch 'staging/maintenance'
Browse files Browse the repository at this point in the history
  • Loading branch information
foosel committed Apr 24, 2024
2 parents acf9510 + b21acfa commit d386414
Show file tree
Hide file tree
Showing 216 changed files with 10,446 additions and 6,879 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ src/octoprint/static/less/bootstrap/* linguist-vendored
src/octoprint/static/less/font-awesome.less linguist-vendored
src/octoprint/static/less/mixins.less linguist-vendored
src/octoprint/static/less/variables.less linguist-vendored
versioneer.py linguist-vendored

docs/* linguist-documentation
95 changes: 74 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,25 @@ jobs:
- name: 🏗 Install build dependencies
run: |
python -m pip install wheel --user
- name: 🔨 Build a binary wheel and a source tarball
- name: 🔨 Build a binary wheel, an sdist tarball and a source tarball
run: |
python setup.py sdist bdist_wheel
# rename sdist .tar.gz to .sdist.tar.gz
sdist=$(ls dist/OctoPrint-*.tar.gz)
mv "$sdist" "${sdist/.tar.gz/.sdist.tar.gz}"
# create source tarball
prefix=$(basename ${sdist%.tar.gz})
git archive --prefix $prefix/ HEAD --output dist/$prefix.source.tar.gz
- name: 🔨 Create sha512sums of dist files
run: |
cd dist
sha512sum OctoPrint-*-py2.py3-none-any.whl > sha512sums.txt
sha512sum OctoPrint-*.sdist.tar.gz >> sha512sums.txt
sha512sum OctoPrint-*.source.tar.gz >> sha512sums.txt
- name: ⬆ Upload build result
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
Expand All @@ -50,7 +64,7 @@ jobs:
name: 🧪 Unit tests
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -73,7 +87,7 @@ jobs:
- uses: actions/checkout@v4
- name: 🏗 Set up test dependencies
run: |
npm -g install node-qunit-puppeteer@2.1.0
npm -g install node-qunit-puppeteer@2.1.2
- name: 🚀 Run helpers.js test suite
run: |
node-qunit-puppeteer tests/static/js/test-helpers.html
Expand All @@ -84,12 +98,12 @@ jobs:
needs: build
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
installable: ["wheel", "sdist"]
runs-on: ubuntu-latest
steps:
- name: ⬇ Download build result
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist
path: dist
Expand All @@ -104,26 +118,29 @@ jobs:
- name: 🚀 Install source tarball
if: matrix.installable == 'sdist'
run: |
pip install dist/OctoPrint-*.tar.gz
pip install dist/OctoPrint-*.sdist.tar.gz
test-e2e:
name: 🧪 E2E tests
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.7", "3.12"]
steps:
- name: ⬇ Checkout code
uses: actions/checkout@v4

- name: ⬇ Download build result
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist
path: dist

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

- name: 🏗 Install OctoPrint build
run: |
Expand Down Expand Up @@ -179,21 +196,21 @@ jobs:
fi
- name: ⬆ Upload Playwright report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
name: playwright-report-py${{ matrix.python }}
path: tests/playwright/playwright-report

- name: ⬆ Upload OctoPrint logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: octoprint-logs
name: octoprint-logs-py${{ matrix.python }}
path: ${{ github.workspace }}/e2econfig/logs

publish-on-testpypi:
name: 📦 Publish on TestPyPI
publish-on-release:
name: 📦 Publish build & source on GitHub release
if: github.event_name == 'release' && github.repository == 'OctoPrint/OctoPrint'
needs:
- pre-commit
Expand All @@ -204,16 +221,48 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: ⬇ Download build result
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: 📦 Publish to index

- name: ⬆ Upload to release
run: |
UPLOAD_URL="https://uploads.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}/assets"
for file in dist/*; do
[ -e "$file" ] || exit 1
echo "Uploading $file..."
response=$(curl -s -XPOST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: $(file -b --mime-type $file)" \
--data-binary @$file \
"$UPLOAD_URL?name=$(basename $file)")
echo "$response" | jq -e '.errors' >/dev/null && echo "Error uploading $file to release: $response" && exit 1 || true
done
publish-on-testpypi:
name: 📦 Publish on TestPyPI
if: github.event_name == 'release' && github.repository == 'OctoPrint/OctoPrint'
needs:
- publish-on-release
runs-on: ubuntu-latest
steps:
- name: ⬇ Download build result
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: 🧹 Remove some stuff that won't make it through twine check
run: |
rm dist/OctoPrint-*.source.tar.gz
rm dist/sha512sums.txt
- name: ⬆ Upload to index
uses: pypa/gh-action-pypi-publish@release/v1
continue-on-error: true
with:
password: ${{ secrets.testpypi_password }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/

publish-on-pypi:
name: 📦 Publish tagged releases to PyPI
Expand All @@ -222,11 +271,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: ⬇ Download build result
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: 📦 Publish to index
- name: 🧹 Remove some stuff that won't make it through twine check
run: |
rm dist/OctoPrint-*.source.tar.gz
rm dist/sha512sums.txt
- name: ⬆ Publish to index
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_password }}
Expand Down
6 changes: 2 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ repos:
- id: check-merge-conflict
- id: fix-encoding-pragma
args: ["--remove"]
exclude: "setup.py|versioneer.py|src/octoprint_setuptools/__init__.py"
exclude: "setup.py|src/octoprint_setuptools/__init__.py"
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args: ["--py37-plus"]
exclude: "setup.py|versioneer.py|src/octoprint_setuptools/__init__.py"
exclude: "setup.py|src/octoprint_setuptools/__init__.py"
- repo: https://github.com/OctoPrint/codemods
rev: "0.6.3"
hooks:
Expand All @@ -36,8 +36,6 @@ repos:
"--ignore",
"setup.py",
"--ignore",
"versioneer.py",
"--ignore",
"src/octoprint_setuptools/__init__.py"
]
- repo: https://github.com/pre-commit/mirrors-isort
Expand Down
2 changes: 1 addition & 1 deletion .tx/config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com

[octoprint.messages]
[o:octoprint:p:octoprint:r:messages]
file_filter = translations/<lang>/LC_MESSAGES/messages.po
source_file = translations/messages.pot
source_lang = en
41 changes: 0 additions & 41 deletions .versioneer-lookup

This file was deleted.

6 changes: 6 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,13 @@ date of first contribution):
* [Moiz Rasheed](https://github.com/msrasheed)
* [Scott Martin](https://github.com/smartin015)
* [Shyam Sunder](https://github.com/sgsunder)
* [Conny Rasch](https://github.com/CMR-DEV)
* [Christopher Perrin](https://github.com/cperrin88)
* [Jatin Saini](https://github.com/jatin-47)
* [Martin Bartsch](https://github.com/kaenguruhs)
* [Matthias Weis](https://github.com/mad73923)
* [Rob Emery](https://github.com/mintsoft)
* [Jacopo Tediosi](https://github.com/jacopotediosi)

OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
[Daid Braam](https://github.com/daid). Parts of its communication layer and
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ existing ticket**:
<!--
READ THE FOLLOWING FIRST:
If not already done, please read the the Contribution Guidelines that
If not already done, please read the Contribution Guidelines that
are linked to the right under "Helpful resources" > "Contributing".
Also read the FAQ: https://faq.octoprint.org
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ recursive-include src/octoprint/templates *
recursive-include src/octoprint/plugins *
recursive-include src/octoprint/translations *
include src/octoprint/util/piptestballoon/setup.py
include versioneer.py
include src/octoprint/_version.py
include src/octoprint/_static_version.py
include requirements.txt
include *.md
exclude CODE_OF_CONDUCT.md
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ access control as necessary.
OctoPrint depends on a few python modules to do its job. Those are automatically installed when installing
OctoPrint via `pip`.

OctoPrint currently supports Python 3.7, 3.8, 3.9, 3.10 and 3.11.
OctoPrint currently supports Python 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12.

## Usage

Expand Down

0 comments on commit d386414

Please sign in to comment.