Skip to content

Commit

Permalink
Merge branch 'main' into include_basic_metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiggr committed Oct 12, 2023
2 parents 210bb70 + 063e4e0 commit bddeaf9
Show file tree
Hide file tree
Showing 150 changed files with 3,697 additions and 1,130 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,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
2 changes: 1 addition & 1 deletion .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,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
2 changes: 1 addition & 1 deletion .github/workflows/update_remote_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Trigger build and deploy of Plone 6 documentation
on:
push:
branches:
- "master"
- "main"
paths:
- "docs/*"

Expand Down
139 changes: 139 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,145 @@ Changelog
.. towncrier release notes start
9.0.0 (2023-09-23)
------------------

Breaking changes:


- Remove deprecated @unlock, @refresh-lock endpoints @avoinea (#1235)
- Remove `plone.tiles` and the `@tiles` endpoint. @tisto (#1308)
- Change the @linkintegrity endpoint to add `items_total`, the number of contained items which would be deleted. @davisagli, @danalvrz, @pgrunewald (#1636)
- The default branch was renamed from `master` to `main`. @tisto, @davisagli (#1695)
- Drop support for Python 3.7. Set python_requires to >= 3.8 @tisto (#1709)


New features:


- Add Spanish translation @macagua (#1684)
- Add support for getting the `/@querystring` endpoint in a specific context. @davisagli (#1704)


Bug fixes:


- Fix stored XSS (Cross Site Scripting) for SVG image in user portrait.
Done by forcing a download instead of displaying inline.
Normal accessing via an image tag is not affected and is safe.
See `security advisory <https://github.com/plone/plone.restapi/security/advisories/GHSA-hc5c-r8m5-2gfh>`_. @maurits (#1)
- Use incoming request to produce location for `@tus-upload`. @instification (#1570)
- Undeprecate comma separated expansion parameters (that were deprecated in plone.restapi 8) @tisto (#1696)
- Undeprecate token parameter from vocabularies endpoint @tisto (#1697)
- Improve RESOLVEUID_RE regexp to catch also paths generated by Link content-types. @cekk (#1699)


Internal:


- Upgrade buildout: Plone 6.0.6 -> 6.0.7 and Plone 5.2.12 -> 5.2.14 @tisto (#1706)


Documentation:


- Added translation code through expansion. @Akshat2Jain (#1374)
- Restores formatting and fixes some MyST syntax from #1689. @stevepiercy (#1691)
- Documentation fixes for #1599. @stevepiercy (#1692)
- Fix linkcheckbroken 301 redirect to https://www.4teamwork.ch/en. @stevepiercy (#1693)
- Polish docs for v9 release. @stevepiercy (#1698)


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)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
- Gauthier Bastien
- Katja Süss
- Jon Pentland
- Leonardo J. Caballero G.
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
17 changes: 9 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. 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=main
: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
.. image:: https://coveralls.io/repos/github/plone/plone.restapi/badge.svg?branch=main
:target: https://coveralls.io/github/plone/plone.restapi?branch=main

.. image:: https://readthedocs.org/projects/pip/badge
:target: https://plonerestapi.readthedocs.io/en/latest/
Expand Down Expand Up @@ -74,12 +74,13 @@ Install ``plone.restapi`` by adding it to your buildout.
Python / Plone Compatibility
============================

plone.restapi 8 requires Python 3 and works with Plone 5.2 and Plone 6.x.
plone.restapi 9 requires Python 3 and works with Plone 5.2 and Plone 6.x.

plone.restapi 8 does not officially support Python 3.6.
plone.restapi 8 entered "maintenance" mode with the release of plone.restapi 9 (September 2023).
It is not planned to backport any features to this version and we highly recommend to upgrade to plone.restapi 9.

Python versions that reached their `end-of-life <https://devguide.python.org/versions/>`_,
including Python 3.6, might still work, but the maintainers do not guarantee this in any way.
including Python 3.6 and Python 3.7 are not supported any longer.

Use plone.restapi 7 if you are running Python 2.7 or Plone versions below 5.2.

Expand Down Expand Up @@ -112,7 +113,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
6 changes: 3 additions & 3 deletions base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ parts =
dependencies
update-translations
find-untranslated
sphinxbuilder
sphinx-python
# sphinxbuilder
# sphinx-python
deploy-to-heroku
omelette
zpretty
Expand Down Expand Up @@ -156,7 +156,7 @@ interpreter = sphinxPython
recipe = collective.recipe.template
input = inline:
#!/bin/bash
git push heroku master
git push heroku main
output = ${buildout:directory}/bin/deploy-to-heroku
mode = 755

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
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def patch_pygments_to_highlight_jsonschema():
# Options for the linkcheck builder
# Ignore localhost
linkcheck_ignore = [
r"https://coveralls.io/repos/github/plone/plone.restapi/badge.svg\?branch=master", # plone.restapi
r"https://coveralls.io/repos/github/plone/plone.restapi/badge.svg\?branch=main", # plone.restapi
r"https://github.com/plone/plone.restapi/blob/dde57b88e0f1b5f5e9f04e6a21865bc0dde55b1c/src/plone/restapi/services/content/add.py#L35-L61", # plone.restapi
r"https://vhs-ehrenamtsportal.de/", # cert fix in progress
]
Expand Down
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
```
2 changes: 0 additions & 2 deletions docs/source/endpoints/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ copymove
database
email-notification
email-send
expansion
groups
history
linkintegrity
Expand All @@ -47,7 +46,6 @@ roles
searching
site
system
tiles
transactions
translations
tusupload
Expand Down
Loading

0 comments on commit bddeaf9

Please sign in to comment.