Revise setup instructions for macOS - #1348
Conversation
|
Running through these commands fixed the problems I was experiencing with the previous setup for MacOS instructions on a clean machine,. In the long run I think it would be nicer to use poetry to keep it consistent between OS's. Tested with a few of the notebooks. When trying to build the docs, two dependencies were missing, fixed by running:
|
|
Thanks Katie, really appreciate you giving it a go on a clean machine, great to see it hold up there too! Good tip on the docs package, and agreed, Poetry would be nicer in the long run. |
|
Thanks @moylstmed360, @kebarr. Would you mind taking a look at the previous PR (#1205) that addresses some of these issues, and incorporating anything from it into this updated version (inc. @kebarr's notes on the extra dependecies)? We can then close the older one, and merge this one after review. |
|
I tested the previous PR (#1205) in a clean environment and couldn't get the tests or docs to run, unsure if this is due to other parts of the code base that have changed since then. Have discussed with @moylstmed360, and he will work based on his PR to ensure: sphinx-design are included. |
|
Thanks @kebarr for testing #1205 and confirming what was missing. Folded it into this PR, so #1205 can be closed. pyproject.toml, added a [project] table with dependencies and the dev, test and docs groups. #1205 had the groups but no dependencies, so pip installed the tooling and not the runtime stack, and the docs build failed on ModuleNotFoundError: MACOS_SETUP.md, the install step is now Verified in a clean venv: Worth flagging: runtime dependencies are now declared twice in |
|
Testing in a clean env got same issues with running tests as the other PR. Can you please run:
And attach the results so I can see where our setups differ. I double checked that poetry setup isn't impacted by any of the changes and it isn't. Mine are attached, but.I also get the attached stdout. I think this could be (or at least is being made worse by) the combination of using conda and pip for dependency management. It is possible that soomething like this could be useful as it comes with integrated pip support and supports pyproject.toml-managed packages. I get the following error, which is currently being discussed in the python-pytest-cases repo, when running the tests: In my normal dev environment, I have pytest version pytest 8.4.2, whereas when building in a new conda environment with pip I get pytest version 9.1.1. Fixing the pytest version to |
|
Thanks @kebarr, I get the same failure on my Mac. A new conda environment with pip install -e ".[dev,test]" installs pytest 9.1.1. pytest-cases doesn't support pytest 9.1.1, so pytest crashes on startup. I've capped pytest below 9 in pyproject.toml, for both the pip extras and the Poetry test group, so both routes now resolve pytest 8.4.2. I created a conda environment with Python 3.11 and installed with pip, as you did, to reproduce the failure. After the pin, pip installs pytest 8.4.2 and pytest -v tests/anoph/test_base.py passes, 44 tests. I've attached the environment, Python 3.11 with pytest 8.4.2 and pytest-cases 3.10.1, so you can compare it with yours. Worth flagging: this also downgrades CI's pytest from 9.0.1 to 8.4.2. The conda-lock suggestion could be picked up in a separate issue. |
|
Tested new version- test, docs, and basic commands from an interpreter run. I think this is ready to be merged. |
ahernank
left a comment
There was a problem hiding this comment.
Thanks for the updates and the thorough testing @kebarr, @moylstmed360 - this is great!
Three fixes found while working through MACOS_SETUP.md on a fresh machine.
pip install -e ".[dev]"no longer works, the dev, test and docs dependencies are now Poetry groups rather than extras, and pip does not understand groups. The"pytest<9"cap is needed today: pytest 9.1.1 with pytest-cases 3.10.1 raisesIdMaker.__init__() takes 7 positional arguments but 8 were given. Happy to drop it if you would rather not pin in the docs.