Skip to content

Conversation

@mauritsvanrees
Copy link
Member

This contains commits from @laulaz, @boulch, @gotcha, @sgeulette, @jladage and me.

I only tried fixing bin/test, which fails at startup because of a problem that probably needs to be fixed in collective.celery. O, I just see that might be fixed in this commit. I am currently not interested in fixing Celery-related problems.

Lots of tests still fail locally, but that can also be because I don't have all the required OS level tools installed. I don't know if that has been arranged on GitHub Actions, but let's find out.

And let's have a PR so this work is more visible and other people can more easily help out.

laulaz and others added 11 commits June 11, 2024 15:17
use Plone 6.1
load multiple js
remove mockup pattern
- Update template to be more inline with Plone's album view
- rewrite group.js javascript for handling search queries
- Refactor group view subfolder card
- Refactor group view Collection support
- Update styling of search input to better match the new theme.
I get this on Plone 6.1 when running the tests:

```
$ bin/test
Running collective.documentviewer.testing.DocumentViewer:Functional tests:
  Set up plone.testing.zca.LayerCleanup in 0.000 seconds.
  Set up plone.testing.zope.Startup in 0.063 seconds.
  Set up plone.app.testing.layers.PloneFixture in 1.340 seconds.
  Set up collective.documentviewer.testing.DocumentViewer Traceback (most recent call last):
  File "/Users/maurits/shared-eggs/cp312/zope.configuration-6.0-py3.12.egg/zope/configuration/xmlconfig.py", line 448, in endElementNS
    self.context.end()
  File "/Users/maurits/shared-eggs/cp312/zope.configuration-6.0-py3.12.egg/zope/configuration/config.py", line 748, in end
    self.stack.pop().finish()
  File "/Users/maurits/shared-eggs/cp312/zope.configuration-6.0-py3.12.egg/zope/configuration/config.py", line 917, in finish
    args = toargs(context, *self.argdata)
  File "/Users/maurits/shared-eggs/cp312/zope.configuration-6.0-py3.12.egg/zope/configuration/config.py", line 1759, in toargs
    args[str(name)] = field.fromUnicode(s)
  File "/Users/maurits/shared-eggs/cp312/zope.configuration-6.0-py3.12.egg/zope/configuration/fields.py", line 174, in fromUnicode
    value = self.context.resolve(name)
  File "/Users/maurits/shared-eggs/cp312/zope.configuration-6.0-py3.12.egg/zope/configuration/config.py", line 220, in resolve
    __import__(mname)
  File "/Users/maurits/community/collective.documentviewer/collective/documentviewer/upgrades.py", line 8, in <module>
    from collective.documentviewer.async_utils import queueJob
  File "/Users/maurits/community/collective.documentviewer/collective/documentviewer/async_utils.py", line 40, in <module>
    @task()
  File "/Users/maurits/shared-eggs/cp312/collective.celery-1.1.4-py3.12-macosx-15.6-arm64.egg/collective/celery/__init__.py", line 37, in decorator
    return getCelery().task(base=AfterCommitTask, **task_kw)(new_func)
  File "/Users/maurits/shared-eggs/cp312/collective.celery-1.1.4-py3.12-macosx-15.6-arm64.egg/collective/celery/utils.py", line 98, in getCelery
    _local.celery = _getCelery()
  File "/Users/maurits/shared-eggs/cp312/collective.celery-1.1.4-py3.12-macosx-15.6-arm64.egg/collective/celery/utils.py", line 88, in _getCelery
    del(celery.backend)
  File "/Users/maurits/shared-eggs/cp312/celery-5.5.3-py3.12.egg/celery/local.py", line 155, in __delattr__
    delattr(self._get_current_object(), name)
AttributeError: property 'backend' of 'Celery' object has no deleter
```

Probably some changes in `collective.celery` are needed.
But for our current use case, Celery support is not really needed, so I don't want to look into that.
@mauritsvanrees
Copy link
Member Author

There is no GitHub Actions set up at all... Locally I have:

  Ran 32 tests with 12 failures, 7 errors, 0 skipped in 0.386 seconds.

First failure is this:

Failure in test test_auto_convert_powerpoint (collective.documentviewer.tests.test_convert.ConvertTest.test_auto_convert_powerpoint)
Traceback (most recent call last):
  File "/Users/maurits/.pyenv/versions/3.12.10/lib/python3.12/unittest/case.py", line 58, in testPartExecutor
    yield
  File "/Users/maurits/.pyenv/versions/3.12.10/lib/python3.12/unittest/case.py", line 634, in run
    self._callTestMethod(testMethod)
  File "/Users/maurits/.pyenv/versions/3.12.10/lib/python3.12/unittest/case.py", line 589, in _callTestMethod
    if method() is not None:
  File "/Users/maurits/community/collective.documentviewer/collective/documentviewer/tests/test_convert.py", line 54, in test_auto_convert_powerpoint
    self.assertEqual(settings.successfully_converted, True)
  File "/Users/maurits/.pyenv/versions/3.12.10/lib/python3.12/unittest/case.py", line 885, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/Users/maurits/.pyenv/versions/3.12.10/lib/python3.12/unittest/case.py", line 878, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: False != True

Maybe some of you already have all required OS tools installed and can try it?

@jladage
Copy link

jladage commented Aug 19, 2025

@mauritsvanrees on my machine all tests are passing. Thanks!

Ran 32 tests with 0 failures, 0 errors, 0 skipped in 1 minutes 27.256 seconds.
Tearing down left over layers:
Tear down collective.documentviewer.testing.DocumentViewer:Functional in 0.000 seconds.
Tear down collective.documentviewer.testing.DocumentViewer in 0.002 seconds.
Tear down plone.app.testing.layers.PloneFixture in 0.085 seconds.
Tear down plone.testing.zope.Startup in 0.008 seconds.
Tear down plone.testing.zca.LayerCleanup in 0.000 seconds.

@laulaz
Copy link
Member

laulaz commented Sep 12, 2025

Note for later: this is what we need in the GitHub Action to make tests pass (in addition to the usual steps) :

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: '3.4'
      - name: Setup Env
        run: |
          sudo apt-get update -qqy
          sudo apt-get install -qqy libjpeg8-dev libbz2-dev
          sudo apt-get install -qqy graphicsmagick ghostscript pdftk qpdf poppler-utils libreoffice
          sudo gem install docsplit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants