-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add support for Python 3.8 #1168
Open
bonjourmauko
wants to merge
39
commits into
master
Choose a base branch
from
test-python-3-matrix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
e1d4514
Add matrix
bonjourmauko edcf671
Add Python 3.8
bonjourmauko 26c2307
Drop support for 3.8
bonjourmauko fefe25c
Fix typo in matrix.os
bonjourmauko 8448784
Remove leftover check-numpy
bonjourmauko 3c0cdd7
Fix matrix def
bonjourmauko 4cb61a4
Fix doctest in Holder
bonjourmauko 5739948
Fix cache in Windows
bonjourmauko 7e0fede
Do not test country-package in Windows
bonjourmauko eac6784
Skip failing tests on Windows
bonjourmauko ebda8aa
Optimise cache
bonjourmauko 5d99c4f
Fix dependency conflict
bonjourmauko 8a3d63c
Reduce cache size
bonjourmauko b932925
Fix lint
bonjourmauko 675c4a6
Fix tests
bonjourmauko 713ae39
Collect tests
bonjourmauko 4c7b4df
Fix core tests path
bonjourmauko c3489f1
Run template tests on Windows
bonjourmauko 050a268
Cache openfisca bin
bonjourmauko 5b333bf
Use virtualenv
bonjourmauko 1cc90e8
Apply suggestions from code review
bonjourmauko 5809252
Refactor git tag into Makefile
bonjourmauko 3c9de5c
Update README.md
bonjourmauko 046f7f9
Document dependencies inclusion change
MattiSG 67ec505
Refactor the deps action
bonjourmauko 6563f1f
Fix typo in 'input'
bonjourmauko b497e69
Fix typo in 'input' (2/2)
bonjourmauko 68171eb
Refactor the build action
bonjourmauko f5897e1
Fix dependency in job
bonjourmauko 5669775
Refactor test & lint actions
bonjourmauko 467198b
Fix jobs dependencies
bonjourmauko 0bce283
Fix typo in lint-style
bonjourmauko c5c016d
Add web trigger
bonjourmauko 319d015
Fix deploy in Github Actions
bonjourmauko 1fce7fb
Rename workflows
bonjourmauko 51272c3
Remove spurious newline
bonjourmauko b8434b0
Skip web workflow for now
bonjourmauko 76856d6
Sync Conda deps with PyPi
benoit-cty 51272ee
Bump version
bonjourmauko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: Setup package | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: true | ||
type: string | ||
|
||
numpy: | ||
required: true | ||
type: string | ||
|
||
python: | ||
required: true | ||
type: string | ||
|
||
activate_command: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
deps: | ||
runs-on: ${{ inputs.os }} | ||
name: deps-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }} | ||
env: | ||
TERM: xterm-256color # To colorize output of make tasks. | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python }} | ||
|
||
- name: Use zstd for faster cache restore (windows) | ||
if: ${{ startsWith(inputs.os, 'windows') }} | ||
shell: cmd | ||
run: echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%" | ||
|
||
- name: Cache dependencies | ||
id: restore-deps | ||
uses: actions/cache@v3 | ||
with: | ||
path: venv | ||
key: deps-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}-${{ hashFiles('setup.py') }} | ||
restore-keys: deps-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}- | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m venv venv | ||
${{ inputs.activate_command }} | ||
make install-deps install-dist | ||
|
||
build: | ||
runs-on: ${{ inputs.os }} | ||
needs: [ deps ] | ||
name: build-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }} | ||
env: | ||
TERM: xterm-256color # To colorize output of make tasks. | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python }} | ||
|
||
- name: Use zstd for faster cache restore (windows) | ||
if: ${{ startsWith(inputs.os, 'windows') }} | ||
shell: cmd | ||
run: echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: venv | ||
key: deps-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}-${{ hashFiles('setup.py') }} | ||
|
||
- name: Cache build | ||
uses: actions/cache@v3 | ||
with: | ||
path: venv/**/[Oo]pen[Ff]isca* | ||
key: build-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}-${{ hashFiles('setup.py') }}-${{ github.sha }} | ||
restore-keys: | | ||
build-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}-${{ hashFiles('setup.py') }}- | ||
build-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}- | ||
|
||
- name: Cache release | ||
uses: actions/cache@v3 | ||
with: | ||
path: dist | ||
key: release-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}-${{ hashFiles('setup.py') }}-${{ github.sha }} | ||
|
||
- name: Build package | ||
run: | | ||
${{ inputs.activate_command }} | ||
make install-test clean build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Lint package | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: true | ||
type: string | ||
|
||
numpy: | ||
required: true | ||
type: string | ||
|
||
python: | ||
required: true | ||
type: string | ||
|
||
activate_command: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
lint: | ||
runs-on: ${{ inputs.os }} | ||
name: lint-doc-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }} | ||
env: | ||
TERM: xterm-256color # To colorize output of make tasks. | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python }} | ||
|
||
- name: Use zstd for faster cache restore (windows) | ||
if: ${{ startsWith(inputs.os, 'windows') }} | ||
shell: cmd | ||
run: echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: venv | ||
key: deps-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}-${{ hashFiles('setup.py') }} | ||
|
||
- name: Lint doc | ||
run: | | ||
${{ inputs.activate_command }} | ||
make clean compile lint-doc | ||
|
||
- name: Lint styles | ||
run: | | ||
${{ inputs.activate_command }} | ||
make clean compile lint-style | ||
|
||
- name: Lint typing | ||
run: | | ||
${{ inputs.activate_command }} | ||
make clean compile lint-typing lint-typing-strict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Test package | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: true | ||
type: string | ||
|
||
numpy: | ||
required: true | ||
type: string | ||
|
||
python: | ||
required: true | ||
type: string | ||
|
||
activate_command: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ inputs.os }} | ||
name: test-core-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TERM: xterm-256color # To colorize output of make tasks. | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python }} | ||
|
||
- name: Use zstd for faster cache restore (windows) | ||
bonjourmauko marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if: ${{ startsWith(inputs.os, 'windows') }} | ||
shell: cmd | ||
run: echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: venv | ||
key: deps-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}-${{ hashFiles('setup.py') }} | ||
|
||
- name: Cache build | ||
uses: actions/cache@v3 | ||
with: | ||
path: venv/**/[Oo]pen[Ff]isca* | ||
key: build-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}-${{ hashFiles('setup.py') }}-${{ github.sha }} | ||
|
||
- name: Run Openfisca Core tests | ||
run: | | ||
${{ inputs.activate_command }} | ||
make test-core | ||
python -m coveralls --service=github | ||
|
||
- name: Run Country Template tests | ||
if: ${{ startsWith(inputs.os, 'ubuntu') }} | ||
run: | | ||
${{ inputs.activate_command }} | ||
make test-country | ||
|
||
- name: Run Extension Template tests | ||
if: ${{ startsWith(inputs.os, 'ubuntu') }} | ||
run: | | ||
${{ inputs.activate_command }} | ||
make test-extension |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I don't see how setting GITHUB_PATH make the cache use zstd ?
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.
This a recipe that comes straight from the doc. When we tested in actually worked.
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.
Which doc are you referring to ? I don't find anything on the relationship between GITHUB_PATH and zstd.
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.
I meant the Github Doc, however I do not find that piece of code anymore https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows . I suspect it is because of this particular version of windoes as with new python versions they use a new one, as with ubuntu.