cbrnr / mnelab

MNELAB – a GUI for MNE
BSD 3-Clause "New" or "Revised" License
239 stars 69 forks source link

Migrate setuptools to pyproject.toml #372

Closed cbrnr closed 1 year ago

cbrnr commented 1 year ago

According to https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html, setting up the build toolchain should now work with pyproject.toml.

cbrnr commented 1 year ago

@larsoner you have a lot of experience with issues related to running Qt tests on CI servers – do you happen to know what's going on here (https://github.com/cbrnr/mnelab/actions/runs/4766432481/jobs/8473493366?pr=372)?

larsoner commented 1 year ago

It's very likely you are missing some dependencies of the Qt libraries. To stay up to date for free I'd use pyvista/setup-headless-display-action with qt: true as in:

https://github.com/pyvista/pyvistaqt/blob/c1f45e98b7c9b6512559e4927a5a175a8da8d6b3/.github/workflows/ci.yml#L31-L34

To check you can try just creating a QApplication separately like:

https://github.com/mne-tools/mne-python/blob/4eb9ef04c50710dba840ceaac6dc4f69ffefdd31/azure-pipelines.yml#L131

Every few months it seems there is some new dependency the PyQt folks decide to no longer bundle and require at the system level. I plan to keep the setup-headless-display-action up to date with these requirements.

cbrnr commented 1 year ago

Thanks @larsoner, I'll try that action! This would be a relief!

cbrnr commented 1 year ago

Unfortunately, this doesn't work either 😢.

larsoner commented 1 year ago

To check you can try just creating a QApplication separately like:

Did you try this suggestion?

cbrnr commented 1 year ago

Did you try this suggestion?

Oops, sorry, missed that. Will try!

cbrnr commented 1 year ago

Not really sure what's going on. @larsoner do you know?

cbrnr commented 1 year ago

I decided to just install the missing package for now, but I might come back to your action in the future. I just don't want to use the main branch of an action, this seems a bit too cutting edge. Anyway, thanks for the help @larsoner!