Skip to content

Commit

Permalink
Merge pull request #158 from collective/plone52and6
Browse files Browse the repository at this point in the history
Remove Plone 5.0 and 5.1 support
  • Loading branch information
jensens committed Mar 24, 2022
2 parents 507c386 + 89ae168 commit 4736d22
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 144 deletions.
125 changes: 40 additions & 85 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,31 @@ jobs:
fail-fast: false
matrix:
plone-version:
- '5.0'
- '5.1'
- '5.2'
python-version: ['2.7', '3.6', '3.7', '3.8']
- '6.0'
python-version:
- '2.7'
- '3.7'
- '3.8'
- '3.9'
# see testing.py for layer names
layer:
- Portlet_AjaxDisabled
- Portlet_AjaxEnabled
- Tile
- unit
coverage: ['no_coverage', 'coverage']
- 'IntegrationTesting'
- 'AcceptanceTestingPortlet_AjaxDisabled'
- 'AcceptanceTestingPortlet_AjaxEnabled'
- 'AcceptanceTesting_Tiles'
exclude:
- plone-version: 5.0
layer: Tile # standardtiles 2.3.2 does support using the request to query. embed might still be possible
- plone-version: 5.0
layer: Portlet_AjaxEnabled # passes but meaningless as it skips all the tests
# Only 5.2+ runs on py3
- plone-version: 5.0
python-version: 3.6
- plone-version: 5.0
python-version: 3.7
- plone-version: 5.0
python-version: 3.8
- plone-version: 5.1
python-version: 3.6
- plone-version: 5.1
python-version: 3.7
- plone-version: 5.1
python-version: 3.8
# Save some time by not running all the robot tests
- python-version: 3.6
layer: Portlet_AjaxDisabled
- python-version: 3.7
layer: Portlet_AjaxDisabled
- python-version: 3.6
layer: Tile
- python-version: 3.7
layer: Tile
# save some time only running coverage on the 5.2 tests
- plone-version: 5.0
coverage: coverage
- plone-version: 5.1
coverage: coverage
- plone-version: 5.2
coverage: no_coverage

- plone-version: '5.2'
python-version: '3.9'
- plone-version: '6.0'
python-version: '2.7'
# robot tests need rewrite for plone 6!
- plone-version: '6.0'
layer: 'AcceptanceTestingPortlet_AjaxDisabled'
- plone-version: '6.0'
layer: 'AcceptanceTestingPortlet_AjaxEnabled'
- plone-version: '6.0'
layer: 'AcceptanceTesting_Tiles'
steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand Down Expand Up @@ -94,75 +74,50 @@ jobs:
echo "[buildout]" > $HOME/.buildout/default.cfg
echo "download-cache = $HOME/buildout-cache/downloads" >> $HOME/.buildout/default.cfg
echo "eggs-directory = $HOME/buildout-cache/eggs" >> $HOME/.buildout/default.cfg
- name: bootstrap buildout
- name: bootstrap buildout py2
if: ${{ matrix.python-version == '2.7'}}
run: |
./bootstrap.sh test-${{ matrix.plone-version }}.x.cfg
ls -al
virtualenv .
bin/pip install -r requirements-${{ matrix.plone-version }}.x.txt
- name: bootstrap buildout py3
if: ${{ matrix.python-version != '2.7'}}
run: |
python -m venv .
bin/pip install -r requirements-${{ matrix.plone-version }}.x.txt
- name: buildout
run: |
bin/buildout -t 10 -Nc test-${{ matrix.plone-version }}.x.cfg
bin/pip install zest.pocompile
bin/pocompile src
- name: test robot
if: ${{ matrix.coverage != 'coverage' && matrix.layer != 'unit' }}
- name: code-analysis
if: ${{ matrix.plone-version == '5.2' }}
run: bin/code-analysis
- name: test
run: |
export DISPLAY=:99.0
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
sleep 3
bin/test --all --layer ${{ matrix.layer }} --list-tests
bin/test --all --layer ${{ matrix.layer }}
- name: test unit
if: ${{ matrix.coverage != 'coverage' && matrix.layer == 'unit' }}
run: |
bin/test --unit --list-tests
bin/test --unit
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
sleep 2
bin/test --all --layer ${{ matrix.layer }}
- name: createcoverage
if: ${{ matrix.coverage == 'coverage' && matrix.layer != 'unit' }}
run: |
export DISPLAY=:99.0
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
sleep 3
bin/test --all --layer ${{ matrix.layer }} --list-tests
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
sleep 2
bin/createcoverage -t '--all --layer ${{ matrix.layer }}'
bin/coverage json -i
- name: createcoverage
if: ${{ matrix.coverage == 'coverage' && matrix.layer == 'unit' }}
run: |
bin/test --unit --list-tests
bin/createcoverage -t '--unit'
bin/coverage json -i
- name: Coveralls
if: ${{ matrix.coverage == 'coverage' }}
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: ${{ matrix.plone-version }}-${{ matrix.python-version }}-${{ matrix.layer }}
- name: code-analysis
if: always()
run: echo "${{ matrix.plone-version }}" | grep 5.1 || bin/code-analysis
- name: black
if: ${{ matrix.python-version == '3.8' }}
run: |
pip install black
black --check src
- name: Artifact Robot Test Report
if: failure()
uses: actions/upload-artifact@v1
with:
name: test_results-${{ matrix.python-version }}-${{ matrix.plone-version }}-${{ matrix.layer }}
path: ./parts/test
- uses: actions/setup-python@v2
if: failure()
with:
python-version: 2.7
- name: Robottest report
continue-on-error: true
if: failure()
run: |
pip2.7 install popt || pip2.7 install --user popt
grep --include=output.xml -Rl FAIL parts/test | xargs --no-run-if-empty -n 1 popt

coveralls_finish:
needs: build
Expand Down
7 changes: 6 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ Changelog

Breaking Change:

- Add idx parameter to display_modifier call, so that we can use the index name to resolve the correct translated taxonomy titles in collective.taxonomy. This means that the display_modifier method in the groupby_modifier adapters needs to expect this parameter too!
- Remove Plone 5.0 and 5.1 support.
[petschki]

- Add idx parameter to display_modifier call, so that we can use the index name to resolve the correct translated
taxonomy titles in collective.taxonomy. This means that the display_modifier method in the groupby_modifier adapters
needs to expect this parameter too!
[MrTango]

Bug Fixes:
Expand Down
12 changes: 5 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@ collective.collectionfilter

|CI| |Coverage|

|Workflows|

.. |CI| image:: https://github.com/collective/collective.collectionfilter/workflows/CI/badge.svg
:target: https://github.com/collective/collective.collectionfilter/actions
.. |Coverage| image:: https://coveralls.io/repos/github/collective/collective.collectionfilter/badge.svg
:target: https://coveralls.io/github/collective/collective.collectionfilter
.. |Workflows| image:: http://github-actions.40ants.com/collective/collective.collectionfilter/matrix.svg
:target: https://github.com/collective/collective.collectionfilter/actions


Faceted navigation filter for collection or contentlisting tiles.

This Plone 5 addon allows you to filter listing results for fields which are indexed in the catalog
This Plone 5 addon allows you to filter listing results for fields which are indexed in the catalog
(Plones internal search tool).
For example, you can add a subject filter, but also a filter for authors or portal types.

Expand Down Expand Up @@ -63,7 +59,7 @@ Use the package extra to install the required dependencies::

The three tiles can be added within the Mosaic editor multiple times. Just select them in the ``Insert`` menu
and assign a collection to it. To show the results of the collection simply add a
``Content Listing`` tile.
``Content Listing`` tile.

It's possible to use multiple content listings and multiple filters on the same page by specifying additional unique classes in
the listing tiles settings and then adding these classes to the ``Content Selector`` setting of the filter tile.
Expand Down Expand Up @@ -165,7 +161,9 @@ Your adapter is called by ``collective.collectionfilter.vocabularies.GroupByCrit
Compatibility
-------------

This package is compatible with Plone 5 and above. Note that in 5.0 some functionality is reduced such as AJAX loading of search results.
Version 4.x is compatible with Plone 5.2+ and 6.x
Version 3.x is compatible with Plone 5.0.x and 5.1.x

If your theme doesn't work well with AJAX loading this can be overridden in the registery or via diazo.

Author
Expand Down
6 changes: 0 additions & 6 deletions bootstrap.sh

This file was deleted.

4 changes: 2 additions & 2 deletions buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

[buildout]
extends =
test-5.2.x.cfg
test-6.0.x.cfg

parts +=
releaser
Expand Down Expand Up @@ -66,4 +66,4 @@ scripts =


[instance]
eggs+= plone.staticresources
eggs+= plone.staticresources
1 change: 1 addition & 0 deletions requirements-5.2.x.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-r https://dist.plone.org/release/5.2-latest/requirements.txt
1 change: 1 addition & 0 deletions requirements-6.0.x.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-r https://dist.plone.org/release/6.0-latest/requirements.txt
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os


version = "3.6.dev0"
version = "4.0.dev0"


def read(*rnames):
Expand All @@ -23,14 +23,15 @@ def read(*rnames):
),
classifiers=[
"Framework :: Plone",
"Framework :: Plone :: 5.0",
"Framework :: Plone :: 5.1",
"Framework :: Plone :: 5.2",
"Framework :: Plone :: 6.0",
"Framework :: Plone :: Addon",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Software Development :: Libraries :: Python Modules",
],
keywords="plone collection filter faceted tagcloud tags",
Expand All @@ -48,7 +49,7 @@ def read(*rnames):
install_requires=[
"setuptools",
"plone.api >= 1.5.1",
"Products.CMFPlone >= 5.0",
"Products.CMFPlone >= 5.2",
"plone.app.contenttypes",
],
extras_require={
Expand Down
30 changes: 0 additions & 30 deletions test-5.0.x.cfg

This file was deleted.

14 changes: 5 additions & 9 deletions test-5.1.x.cfg → test-6.0.x.cfg
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
[buildout]
extends =
https://raw.githubusercontent.com/collective/buildout.plonetest/master/test-5.1.x.cfg
https://raw.githubusercontent.com/collective/buildout.plonetest/master/test-6.0.x.cfg
https://raw.githubusercontent.com/collective/buildout.plonetest/master/qa.cfg
base.cfg

parts +=
test
code-analysis
createcoverage

parts -=
code-analysis

package-name = collective.collectionfilter
package-extras = [test]
test-eggs =

[versions]
setuptools =
zc.buildout =
configparser = 3.8.1


plone.formwidget.geolocation = < 2.2.2 # Introduced a dep on CMFPlone 5.2

coverage = >=3.7

0 comments on commit 4736d22

Please sign in to comment.