Skip to content

Commit

Permalink
Merge branch 'master' into ajax-vocabulary-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tisto authored Aug 25, 2023
2 parents fa891b6 + dc2deb5 commit f7b8c27
Show file tree
Hide file tree
Showing 901 changed files with 50,232 additions and 21,089 deletions.
4 changes: 3 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[flake8]
# Recommend matching the black line length (default 88),
# rather than using the flake8 default of 79:
max-line-length = 88
max-line-length = 100000
extend-ignore =
# See https://github.com/PyCQA/pycodestyle/issues/373
E203,
per-file-ignores =
src/plone/restapi/bbb.py:F401
29 changes: 29 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Black
on: [push,pull_request]
jobs:
build:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.8]

steps:
# git checkout
- uses: actions/checkout@v3

# python setup
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip

# install black (with constraints)
- name: install black
run: pip install -c constraints.txt black

# run black
- name: run black
run: black src/ --check --diff
88 changes: 0 additions & 88 deletions .github/workflows/ci.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Flake 8
on: [push,pull_request]
jobs:
build:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.8]

steps:
# git checkout
- uses: actions/checkout@v3

# python setup
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip

# install flake8
- name: install flake8
run: pip install -c constraints.txt flake8

# run black
- name: run flake8
run: flake8 src/ setup.py
29 changes: 29 additions & 0 deletions .github/workflows/pyroma.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Pyroma
on: [push,pull_request]
jobs:
build:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.8]

steps:
# git checkout
- uses: actions/checkout@v3

# python setup
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip

# install pyroma
- name: install pyroma
run: pip install pyroma

# run pyroma
- name: run pyroma
run: pyroma -n 10 -d .
73 changes: 73 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Tests
on: [push,pull_request]
jobs:
build:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: '3.7'
plone-version: '5.2'
- python-version: '3.8'
plone-version: '5.2'
- python-version: '3.8'
plone-version: '6.0'
- python-version: '3.9'
plone-version: '6.0'
- python-version: '3.10'
plone-version: '6.0'
- python-version: '3.11'
plone-version: '6.0'

steps:
# git checkout
- uses: actions/checkout@v3

# python setup
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

# buildout eggs cache
- uses: actions/cache@v3
with:
path: eggs
key: ${{ runner.os }}-py${{ matrix.python-version }}-plone${{ matrix.plone-version }}-${{ hashFiles('*.cfg') }}
restore-keys: |
${{ runner.os }}-py${{ matrix.python-version }}-plone${{ matrix.plone-version }}-
${{ runner.os }}-py${{ matrix.python-version }}-
# python install
- run: pip install virtualenv
- run: pip install wheel
- name: pip install
run: pip install -r requirements-${{ matrix.plone-version }}.txt -r requirements-docs.txt

# buildout
- name: buildout
run: buildout -t 10 -c plone-${{ matrix.plone-version }}.x.cfg
env:
CI: true

# build sphinx
- name: sphinx
run: if [ "${{ matrix.plone-version }}" == "6.0" ] && [ ${{ matrix.python-version }} == '3.9' ]; then make docs-html; fi

# test
- name: test
run: bin/test

# test no uncommitted changes
- name: test no uncommitted changes
run: ./test-no-uncommitted-doc-changes
env:
PYTHON_VERSION: ${{ matrix.python-version }}
PLONE_VERSION: ${{ matrix.plone-version }}

# test for broken links
- name: linkcheck
run: if [ "${{ matrix.plone-version }}" == "6.0" ] && [ ${{ matrix.python-version }} == '3.9' ]; then make docs-linkcheckbroken; fi
19 changes: 19 additions & 0 deletions .github/workflows/update_remote_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Trigger build and deploy of Plone 6 documentation

on:
push:
branches:
- "master"
paths:
- "docs/*"

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- run: |
curl -X POST \
-H "Authorization: Bearer ${{secrets.DOCUMENTATION_BUILD_APPLICATION_KEY}}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/plone/documentation/actions/workflows/update_submodule.yml/dispatches \
-d '{"ref": "6-dev"}'
33 changes: 33 additions & 0 deletions .github/workflows/zpretty.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: zpretty
on: [push,pull_request]
jobs:
build:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.8]

steps:
# git checkout
- uses: actions/checkout@v3

# python setup
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip

# install zpretty
- name: install zpretty
run: pip install zpretty

# run zpretty
- name: run zpretty
run: find src/ -name *.zcml | xargs zpretty -i

# run git diff
- name: run git diff
run: git diff --exit-code
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,19 @@ docs/.DS_Store
/.installed.cfg
*.pyc
/.Python
/bin/
/include
/lib
/lib64
/local
/venv
/.mr.developer.cfg
*.mo
docs/_build
docs/plone.restapi.http-examples
docs/source/README.rst
docs/Makefile
docs/make.bat
docs/doctrees
docs/html
sphinx_build.log
htmlcov
npm-debug.log
Expand Down
1 change: 0 additions & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ force_alphabetical_sort = True
force_single_line = True
lines_after_imports = 2
line_length = 200
not_skip = __init__.py
29 changes: 29 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.9"
# You can also specify other tool versions:
# nodejs: "16"
# rust: "1.55"
# golang: "1.17"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
# - pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: requirements-docs.txt
Loading

0 comments on commit f7b8c27

Please sign in to comment.