Skip to content

Commit

Permalink
Merge branch 'master' into tus_location_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tisto authored Aug 25, 2023
2 parents bdfb754 + 8ed1247 commit 7513855
Show file tree
Hide file tree
Showing 145 changed files with 3,497 additions and 526 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Black
on: [push]
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
Expand All @@ -19,9 +20,9 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: pip

# install black (extract version from versions.cfg)
# install black (with constraints)
- name: install black
run: pip install click==$(awk '/^click =/{print $NF}' versions.cfg) black==$(awk '/^black =/{print $NF}' versions.cfg)
run: pip install -c constraints.txt black

# run black
- name: run black
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Flake 8
on: [push]
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
Expand All @@ -21,7 +22,7 @@ jobs:

# install flake8
- name: install flake8
run: pip install flake8==$(awk '/^flake8 =/{print $NF}' versions.cfg)
run: pip install -c constraints.txt flake8

# run black
- name: run flake8
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pyroma.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Pyroma
on: [push]
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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Tests
on: [push]
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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_remote_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
-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"}'
-d '{"ref": "6-dev"}'
3 changes: 2 additions & 1 deletion .github/workflows/zpretty.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: zpretty
on: [push]
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
Expand Down
125 changes: 125 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,131 @@ Changelog
.. towncrier release notes start
8.43.0 (2023-08-23)
-------------------

New features:


- Allow passing additional parameters to the delete users endpoint to request not to delete local roles and memberareas
[erral] (#1598)


8.42.1 (2023-08-23)
-------------------

Bug fixes:


- Fix broken relations info. @ksuess (#1673)


Internal:


- Fix test cleanup. @davisagli (#1680)


Documentation:


- Move expansion docs from endpoints to usage, and add a list of all expandable components. Fixes #1677. @stevepiercy (#1678)


8.42.0 (2023-07-17)
-------------------

New features:


- When serializing blocks, `image_scales` is now added to blocks that contain a resolveuid-based `url`.
When deserializing blocks, `image_scales` is removed. @davisagli (#1642)


Bug fixes:


- Remove the hard code dependency by plone.app.multilingual, use it conditionaly instead
[@folix-01] (#1639)
- Fix timezone of dates for revisions in the `@history` service. @davisagli (#1647)
- Fix types expander in root for Plone 5.2 (for non-Dexterity Plone Site Root) @sneridagh (#1669)


Internal:


- Updated package installation to use constraints.txt for black package, ensuring compatibility and consistent versions. @Akshat2Jain (#1671)
- Update Makefile and buildout to use Plone 6.0.6. @davisagli (#1672)


Documentation:


- added instruction to ensure consistent code formatting. @Akshat2Jain (#1664)


8.41.0 (2023-06-29)
-------------------

New features:


- Add `visit_blocks` util for finding all nested blocks. @davisagli (#1648)


Bug fixes:


- Fix path2uid method, to handle suffix with non-traversable objects. @cekk @mamico (#1649)


Internal:


- Allow GHA tests to run on PRs from forks. @Akshat2Jain (#1656)


Documentation:


- Fix html_meta tags, and remove stray spaces that prevented the glossary from rendering. @stevepiercy (#1663)


8.40.0 (2023-06-06)
-------------------

New features:


- Added `@site` and `@navroot` endpoints. @erral (#1464)


Bug fixes:


- Validate input to the `@querystring-search` service. Input which can't be processed now results in a 400 response instead of 500. @davisagli (#1653)


8.39.2 (2023-06-01)
-------------------

Bug fixes:


- Fix content serializer with an old version of an item that was renamed. @davisagli (#1651)


8.39.1 (2023-05-30)
-------------------

Bug fixes:


- Fix possible startup error by explicitly loading ``plone.app.contentrules`` zcml.
Also: only load code related to contentrules when this package is available.
[maurits] (#1644)


8.39.0 (2023-05-23)
-------------------

Expand Down
12 changes: 1 addition & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# keep in sync with: https://github.com/kitconcept/buildout/edit/master/Makefile
# update by running 'make update'
SHELL := /bin/bash
CURRENT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

Expand Down Expand Up @@ -31,20 +29,12 @@ all: build-plone-6.0
help: ## This help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

.PHONY: Update Makefile and Buildout
update: ## Update Make and Buildout
wget -O Makefile https://raw.githubusercontent.com/kitconcept/buildout/5.2/Makefile
wget -O requirements.txt https://raw.githubusercontent.com/kitconcept/buildout/5.2/requirements.txt
wget -O plone-5.2.x.cfg https://raw.githubusercontent.com/kitconcept/buildout/5.2/plone-5.2.x.cfg
wget -O ci.cfg https://raw.githubusercontent.com/kitconcept/buildout/5.2/ci.cfg
wget -O versions.cfg https://raw.githubusercontent.com/kitconcept/buildout/5.2/versions.cfg

.installed.cfg: bin/buildout *.cfg

bin/buildout: bin/pip
bin/pip install --upgrade pip
bin/pip install -r requirements-5.2.txt
bin/pip install black || true
bin/pip install -c constraints.txt black
@touch -c $@

bin/python bin/pip:
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. image:: https://github.com/plone/plone.restapi/workflows/Plone%20RESTAPI%20CI/badge.svg
:target: https://github.com/plone/plone.restapi/actions?query=workflow%3A%22Plone+RESTAPI+CI%22
.. image:: https://github.com/plone/plone.restapi/actions/workflows/tests.yml/badge.svg?branch=master
:target: https://github.com/plone/plone.restapi/actions/workflows/tests.yml

.. image:: https://coveralls.io/repos/github/plone/plone.restapi/badge.svg?branch=master
:target: https://coveralls.io/github/plone/plone.restapi?branch=master
Expand Down Expand Up @@ -112,7 +112,7 @@ If you are having issues, please let us know via the `issue tracker <https://git
If you require professional support, here is a list of Plone solution providers that contributed significantly to ``plone.restapi`` in the past.

- `kitconcept GmbH <https://kitconcept.com>`_ (Germany)
- `4teamwork <https://www.4teamwork.ch>`_ (Switzerland)
- `4teamwork <https://www.4teamwork.ch/en>`_ (Switzerland)
- `CodeSyntax <https://www.codesyntax.com/en>`_ (Spain)


Expand Down
7 changes: 0 additions & 7 deletions ci.cfg

This file was deleted.

2 changes: 2 additions & 0 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
black == 22.3.0
flake8 == 4.0.1
28 changes: 25 additions & 3 deletions docs/source/contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ myst:

# Contributing to `plone.restapi`

We use GNU `make` when developing `plone.restapi`.
To install this package, its dependencies, and its documentation, code formatting, and testing tools, run the following command in the root of the project.

```shell
make
```

## Generating documentation examples

Expand Down Expand Up @@ -37,7 +43,6 @@ Include them in the documentation using MyST syntax:
Build the documentation locally to test the rendering by running `./bin/sphinxbuilder`.
Alternatively, you can use Makefile targets:


`docs-clean`
: Clean current and legacy docs build directories, and Python virtual environment

Expand All @@ -58,9 +63,8 @@ Alternatively, you can use Makefile targets:

`docs`
: Build Docs

Make sure you add and commit the generated files in `http-examples`.

Make sure you add and commit the generated files in `http-examples`.

## Conventions

Expand All @@ -69,3 +73,21 @@ Make sure you add and commit the generated files in `http-examples`.
conventions
```

## Code formatting and testing

To ensure consistent code formatting, we use [Black](https://black.readthedocs.io/en/stable/index.html).
All pull requests must pass code formatting checks.
We recommend that you run Black locally.
You can use the following command to automatically format the code.

```shell
make black
```

To run tests locally and ensure your changes don't introduce any issues, use the following command.
This will execute the test suite and provide test feedback.

```shell
make test
```
3 changes: 2 additions & 1 deletion docs/source/endpoints/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ copymove
database
email-notification
email-send
expansion
groups
history
linkintegrity
locking
navigation
navroot
actions
portrait
principals
Expand All @@ -44,6 +44,7 @@ registry
relations
roles
searching
site
system
tiles
transactions
Expand Down
Loading

0 comments on commit 7513855

Please sign in to comment.