-
Notifications
You must be signed in to change notification settings - Fork 142
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
Adjust CI scripts for package specific tasks #139
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checks-vizro-ai.yml needs to be updated for the changelog command - we changed it in checks-vizro-core.yml a few days ago
Why do we want this? Isn't it better to run linting just on the relevant vizro-core vs. vizro-ai directory? |
In principle yes, but there are a few complications:
Given that linting comes cheaply, and I have seen it cause bugs in mono-repos before (when only certain things are considered), I would prefer just to keep this general |
OK, fair enough. The situations I want to avoid are:
(plus the equivalent situations with vizro-core and vizro-ai swapped round, obviously) But so long as our linting is fast and we keep the pre-commit hook versions stable (so that random errors don't start popping up due to linter version changes) then the above situations shouldn't arise, so fine how you have it. |
|
||
- name: List dependencies | ||
run: hatch run all.py${{ matrix.python-version }}:pip freeze | ||
|
||
- name: Lint | ||
run: hatch run all.py${{ matrix.python-version }}:lint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since linting just requires pre-commit
actually we should probably make a new deatched=True
Hatch environment lint
for it that doesn't include all of the dev dependencies. This way we could just do hatch run lint:lint
on CI and it would be significantly faster. At the moment we install all the dependencies for all.py3.8
and then run pre-commit
that uses only one of those dependencies which is a bit silly.
Not a big deal though, so feel free to do in a separate PR another time if you prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm good idea, let me see if I can incorporate that quickly still
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the other hand, hatch run lint
is really used a lot, so would prefer not to have hatch run lint:lint
. Or do you mean to keep pre-commit
in the default environment as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's revisit in another PR if we still want to do changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maxschulz-COL yes, you're right - I originally put lint
in the default
environment precisely so that we don't have to write hatch run lint:lint
. But probably the right way to do it is to make the hatch run lint:lint
the "correct" command with a detached lint
environment and then put a script "lint" = ["hatch run lint:lint"]
in the default environment to just act as a shortcut so you can still do hatch run lint
.
Agreed, but since we most importantly do share the same pre-commit config (and hence linter version) the first should not arise. And the second should not really be a problem, we're still talking order of couple of seconds |
Description
This PR adjusts the CI such that:
src
folder of the relevant package (EDIT: this is reverted and not relevant anymore)Screenshot
Checklist
Types of changes
Notice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":