-
Notifications
You must be signed in to change notification settings - Fork 27
Update dependencies #198
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
Update dependencies #198
Changes from all commits
ce0e665
9e25854
27ffc98
666a18b
aeeab52
ee99286
087b988
c44f460
9943867
4244d5e
fe70b64
5661358
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[flake8] | ||
exclude=.tox | ||
extend-ignore = E203 | ||
max-line-length=120 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
eemeli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
with: | ||
cache: pip | ||
cache-dependency-path: | | ||
dev-requirements.txt | ||
fluent.syntax/setup.py | ||
fluent.runtime/setup.py | ||
- run: python -m pip install -r dev-requirements.txt | ||
- run: python -m pip install ./fluent.syntax ./fluent.runtime | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess one consequence of merging the linting jobs on the GHA level is that if there is an error installing fluent.syntax you will not know if there would have also been an error in fluent.runtime. Previously being in separate workflows would have revealed this as they could run separately and in parallel. Does this have a performance impact on the CI run time as well? Have you considered a reusable action for setting up the environment that can then be shared across many jobs to allow centralizing configuration while still parallelizing execution? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Eh, sure, but at the cost of additional complexity and interdependency. I'm trying to keep these actions simple, and tbh I'm not too worried about one error potentially masking a later error, given that it'll be revealed after fixing the first one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would be super peaved if I spent a bunch of time fixing one error only to reveal another that could have been known before, but I understand there are tradeoffs. Just wondering if you thought about it. |
||
- run: python -m flake8 | ||
- run: python -m mypy fluent.syntax/fluent fluent.runtime/fluent | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8, 3.9, "3.10", 3.11, 3.12, pypy3.9, pypy3.10] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: pip | ||
cache-dependency-path: | | ||
fluent.syntax/setup.py | ||
fluent.runtime/setup.py | ||
- run: python -m pip install ./fluent.syntax ./fluent.runtime | ||
- run: python -m unittest discover -s fluent.syntax | ||
- run: python -m unittest discover -s fluent.runtime | ||
|
||
# Test compatibility with the oldest Python version we claim to support, | ||
# and for fluent.runtime's compatibility with a range of fluent.syntax versions. | ||
compatibility: | ||
runs-on: ubuntu-20.04 # https://github.com/actions/setup-python/issues/544 | ||
strategy: | ||
matrix: | ||
fluent-syntax: | ||
- ./fluent.syntax | ||
- fluent.syntax==0.19.0 | ||
- fluent.syntax==0.18.1 six | ||
- fluent.syntax==0.17.0 six | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you use setup-python@v5 here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dunno, didn't try. I intend to re-refactor this soon after landing this PR, by incrementing the minimum to around 3.9, which will let us get rid of this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
with: | ||
python-version: 3.6 | ||
- run: python -m pip install ${{ matrix.fluent-syntax }} | ||
- run: python -m pip install ./fluent.runtime | ||
- run: python -m unittest discover -s fluent.runtime |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
black ~= 24.0 | ||
flake8 ~= 7.0 | ||
isort ~= 5.0 | ||
mypy ~= 1.0 | ||
tox ~= 4.0 | ||
types-babel | ||
types-pytz |
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.
Seems like there are many python versions in use across the different jobs. If this is intentionally, adding a comment specifying an issue link or reason why a particular version is required will make someone (maybe you) reviewing this yaml file in 6 years very appreciative :)
If otherwise you don't need different versions you could pin the version using an environment variable and specifying this across the different jobs. This is just a suggestion.
Even in a scenario where you need specific versions per purpose, using a variable can also help encapsulate that purpose.
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.
Much of that range is due to inheriting a spread from before. The 3.12 for
lint
is just the current version and could probably be dropped to rely on the default provided byubuntu-latest
;baseline
uses 3.6 because we still claim compatibility with that, anddocumentation
's 3.9 is slightly arbitrary, but I'm loathe to spend many cycles on it given the doc build's complexity.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.
You explained it excellently just now. I Just wonder if pulling that information out of this comment thread into the action definition would be helpful for someone like myself reading the code for the first time without context. Just a light suggestion to do with what you think is best.