Closed GenevieveBuckley closed 9 months ago
ooh - sorry about this
I'm also on a mac and running tests with pytest
platform darwin -- Python 3.10.6, pytest-7.1.3, pluggy-1.0.0
PyQt5 5.15.7 -- Qt runtime 5.15.4 -- Qt compiled 5.15.4
rootdir: /Users/alisterburt/programming/napari-animation, configfile: setup.cfg
plugins: qt-4.1.0, napari-0.4.16, napari-plugin-engine-0.2.0, npe2-0.6.1
collected 97 items
...
=========================================================================== 97 passed in 64.85s (0:01:04) ===========================================================================
What is the error you're getting? How are you installing pytest-qt
?
agree that this would be great in a contributing guide and sorry for the false advertising in the readme - is leftover from when we were pushing hard on this and had grand plans π
I'm also on a mac and running tests with pytest
Can I see your (working) conda list? That might be helpful
First I tried this...
conda create -n napari-animation-dev python=3.10 pip ipython
conda activate napari-animation-dev
python -m pip install -e ".[dev]"
But that gave me an error installing pyqt.
I didn't think that was too unusual, I often find pyqt is difficult to install on an M1 mac. It works well now if you install with conda, but you used to need a special conda channel, and I still find problems with pip. So that's ok, I figured I'd just go through the dependency list and install them one by one.
Figured it out!
I needed to install pytest-qt
, which wasn't on the requirements list. I was too focused on trying to install qtbot
in different ways to think about that.
Without pytest-qt, I'd get errors like this, even after installing qtbot:
This worked! (needed to add pytest-qt and qtbot, which weren't listed in the setup.cfg)
conda create -n napari-animation-dev python=3.10 pip ipython
conda activate napari-animation-dev
# Install requirements
mamba install napari npe2 qtpy superqt
mamba install imageio imageio-ffmpeg
mamba install scipy tqdm
# Install development dependencies
mamba install pre-commit black flake8 check-manifest
mamba install pytest pytest-qt
python -m pip install qtbot
# Install development version
cd napari-animation
python -m pip install -e .
# Run pytest
pytest
@alisterburt how do you feel about shifting the PyQt requirement into its own optional dependency category?
Why is this line listed so specifically https://github.com/napari/napari-animation/blob/f5068324521be61bda6e89c333161d0e660cd4fc/setup.cfg#L51
Then you could have the contributing docs go something like this, and work for all operating systems:
conda create napari-animation-dev python=3.10 pip ipython
conda activate napari-animation-dev
git clone https://github.com/napari/napari-animation.git
cd napari-animation
python -m pip install -e .[dev]
So users can possibly have an optional choice of how and where to install pyqt/pyside (is pyside supported by napari-animation?)
python -m pip install -e .[pyqt]
# or
conda install pyqt
# etc.
So obviously contributing documentation is inadequate, but we still have some options to improve things:
.[testing, dev]
Anyone have any thoughts?
Edit: Wait a minute: https://github.com/napari/napari-animation/pull/169 already implemented the 2nd option. So we just need to clarify in the README!
I'm having trouble testing this package locally.
make_napari_viewer
fixture. I tried installing qtbot and giving things another go, but that didn't help.The README says "...a detailed contributing guide is coming soon.", so perhaps whatever the answer to this problem is could become part of the not-yet-existing developer contributing guide?