-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove requirements-dev.txt #504
Conversation
✅ Deploy Preview for conda-lock ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hm. Not sure why the windows tests are so unhappy:
The main environment installs OK, but this seems to fail when pytest is installing more stuff? |
OSX also failing on installing dependencies during pytest run:
|
Looks like all the tests are OK after being re-run, thanks @maresb. Marking this ready for review. I think we could change the Netlify build command from python -m pip install -r requirements-dev.txt \
&& python -m pip install . \
&& mkdocs build to: python -m pip install conda-lock \
&& conda-lock install environments/conda-lock.yml \
&& python -m pip install . \
&& mkdocs build or, if we don't want to use the lock file (now that I'm thinking about it, this PR needs to update the lockfile 😆): "${SHELL}" <(curl -L micro.mamba.pm/install.sh) \
&& micromamba install -f environments/dev-environment.yaml \
&& micromamba activate conda-lock-dev \
&& pip install . \
&& mkdocs build ☝️ I'm sure there are some mistakes in this. |
@mariusvniekerk, could you please help with Netlify? |
Netlify supports setting the build command in a config file these days. https://docs.netlify.com/configure-builds/file-based-configuration/#build-settings |
I'm confused about 5391eee ; shouldn't the lockfile be updated alongside the dev-environment.yml? |
9e75391
to
28b21aa
Compare
Looks like the best way to install from the conda spec on Netlify might be to install micromamba. I expected conda might be available, or we might be able to provide another docker image to run the build, but not so. I hoped to test locally, so I checked out the |
b5a34b1
to
b63484e
Compare
😅 wish GitHub would at least hide my shame in an accordion section! I got it working, but the command is far from pretty. |
@maresb ready for review! |
Nice @mfisher87!!! It looks like the tests are running with the correct Python versions, so I think this is all good. Also, GitHub collapsed things for me, so my view is clean. No worries.
I think he just did this to resolve a merge conflict. So yes, if you update the environment it should be relocked, but only in a separate commit at the end. You did everything right. Actually, apart from Is there a particular reason for including Shall I squash-merge this? Alternatively you could rebase it with something like (untested!): git checkout main
git pull
git checkout remove-pip-dev-requirements
git reset --hard main
git cherry-pick e3cf3052d4ad6493cdcd3e7a3684463d06576934
git cherry-pick b63484ed4086b908bda8bf2307960f2f2a80f2f6
git push --force By the way, it looks like we're missing |
I wish I remembered! It's been some time; I think the tests run faster by using the mamba solver when it's available? Happy to revert as well.
I think we may have had a conversation about this previously, but do you feel strongly about including Ruff there? Since pre-commit manages its own dependencies, I like how it shrinks my dev dependency lists :)
I'm real comfortable with interactive rebasing, I'll take care of that shortly :) |
b63484e
to
7b624c3
Compare
7b624c3
to
0223024
Compare
@maresb If we decide we don't need to add Ruff, I'd also propose removing Mypy, Black, isort from this file. isort should be removed either way, since we don't even use it with pre-commit anymore after #493 was merged. Woops! Once you share your thoughts on this and the mamba dev dependency I'll get these last bits tied up and ready for merge. If you prefer, can also squash down to 1 commit with a more detailed message. |
Looking at this freshly, I think we simply need Mamba in the test environment for when we test conda-lock+mamba.
I don't feel strongly. I'm still getting accustomed to it, so I've been playing around with the CLI lately, adding it as a dev dependency so I can do that. But Thanks for the rebase! Looks nice and tidy now.
Yes. But since we're talking multiple packages I'd be inclined to do this in a separate PR.
Two commits are good. I much prefer having more commits as long as they're not being undone. If the Windows test passes I think we could merge this now. Is it ready from your side? |
Add Ruff, remove isort
This agrees with my recollection! And I think the tests which are run by default are those ☝️ I felt it made sense to add Ruff and remove isort from the environment.yml (my justification is that both actions are fixing things that are out of sync with recent changes to our pre-commit config), and I re-locked.
We're good to go now! 🚀 |
Hmm, I'm worried about the failing Windows test. It's passing on other PRs. Rerunning... |
I haven't looked, but maybe one of the Windows tests needs to be marked as |
2c3e257
to
57588a3
Compare
Description
Follow-up from #485. It's a pain to keep pip and conda dev requirements files both up-to-date (they are currently out-of-sync), so @maresb felt it best to remove the pip one. There are more dependencies on this than expected: