-
Notifications
You must be signed in to change notification settings - Fork 941
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
[MAINT] Drop Python3.8 support #1056
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3f72c69
Drop support for Python3.8
adam2392 8abb862
Drop support for Python3.8
adam2392 ea2bcfa
Remove fluff
adam2392 d8f6bad
Fix ci
adam2392 c689b85
Merge branch 'main' into python
adam2392 fdbf400
Fix CIs
adam2392 2bdb01a
Try again
adam2392 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 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 |
---|---|---|
|
@@ -6,57 +6,58 @@ on: | |
push: | ||
branches: [main] | ||
paths: | ||
- '.github/workflows/ci-install.yml' | ||
- 'dowhy/**' | ||
- 'tests/**' | ||
- 'pyproject.toml' | ||
- 'poetry.lock' | ||
- ".github/workflows/ci-install.yml" | ||
- "dowhy/**" | ||
- "tests/**" | ||
- "pyproject.toml" | ||
- "poetry.lock" | ||
|
||
pull_request: | ||
branches: [main] | ||
paths: | ||
- '.github/workflows/ci-install.yml' | ||
- 'dowhy/**' | ||
- 'tests/**' | ||
- 'pyproject.toml' | ||
- 'poetry.lock' | ||
- ".github/workflows/ci-install.yml" | ||
- "dowhy/**" | ||
- "tests/**" | ||
- "pyproject.toml" | ||
- "poetry.lock" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8, 3.9, "3.10", "3.11"] | ||
# TODO: Enable "3.12" when packages are updated | ||
python-version: [3.9, "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install graphviz | ||
run: | | ||
sudo apt install graphviz libgraphviz-dev graphviz-dev pkg-config | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
echo "HEAD_REPO='$HEAD_REPO'" | ||
echo "HEAD_BRANCH='$HEAD_BRANCH'" | ||
echo "GITHUB_CONTEXT='$GITHUB_CONTEXT'" | ||
pip install git+https://github.com/${HEAD_REPO}@${HEAD_BRANCH:-main} | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | ||
HEAD_BRANCH: ${{ github.event.pull_request.head.ref || github.head_ref || 'main' }} | ||
|
||
- name: Notify Discord | ||
if: failure() && github.ref == 'refs/heads/main' | ||
uses: th0th/[email protected] | ||
env: | ||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }} | ||
GITHUB_ACTOR: ${{ github.actor }} | ||
GITHUB_JOB_NAME: CI Install Check Failed on Main | ||
GITHUB_JOB_STATUS: ${{ job.status }} | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install graphviz | ||
run: | | ||
sudo apt install graphviz libgraphviz-dev graphviz-dev pkg-config | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
echo "HEAD_REPO='$HEAD_REPO'" | ||
echo "HEAD_BRANCH='$HEAD_BRANCH'" | ||
echo "GITHUB_CONTEXT='$GITHUB_CONTEXT'" | ||
pip install git+https://github.com/${HEAD_REPO}@${HEAD_BRANCH:-main} | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | ||
HEAD_BRANCH: ${{ github.event.pull_request.head.ref || github.head_ref || 'main' }} | ||
|
||
- name: Notify Discord | ||
if: failure() && github.ref == 'refs/heads/main' | ||
uses: th0th/[email protected] | ||
env: | ||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }} | ||
GITHUB_ACTOR: ${{ github.actor }} | ||
GITHUB_JOB_NAME: CI Install Check Failed on Main | ||
GITHUB_JOB_STATUS: ${{ job.status }} |
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 |
---|---|---|
|
@@ -6,83 +6,84 @@ on: | |
push: | ||
branches: [main] | ||
paths: | ||
- '.github/workflows/ci.yml' | ||
- 'dowhy/**' | ||
- 'tests/**' | ||
- 'docs/source/example_notebooks/**' | ||
- 'pyproject.toml' | ||
- 'poetry.lock' | ||
- ".github/workflows/ci.yml" | ||
- "dowhy/**" | ||
- "tests/**" | ||
- "docs/source/example_notebooks/**" | ||
- "pyproject.toml" | ||
- "poetry.lock" | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- '.github/workflows/ci.yml' | ||
- 'dowhy/**' | ||
- 'tests/**' | ||
- 'docs/source/example_notebooks/**' | ||
- 'pyproject.toml' | ||
- 'poetry.lock' | ||
- ".github/workflows/ci.yml" | ||
- "dowhy/**" | ||
- "tests/**" | ||
- "docs/source/example_notebooks/**" | ||
- "pyproject.toml" | ||
- "poetry.lock" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8, 3.9, "3.10", "3.11"] | ||
# TODO: Enable "3.12" when packages are updated | ||
python-version: [3.9, "3.10", "3.11"] | ||
poetry-version: [1.5.1] | ||
test-group: [1, 2, 3, 4, 5, 6] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Poetry ${{ matrix.poetry-version }} | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
- name: Install Poetry ${{ matrix.poetry-version }} | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
|
||
- name: Install graphviz | ||
run: | | ||
sudo apt install graphviz libgraphviz-dev graphviz-dev pkg-config | ||
- name: Install graphviz | ||
run: | | ||
sudo apt install graphviz libgraphviz-dev graphviz-dev pkg-config | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
echo "installing poetry dependencies" | ||
poetry install -E plotting -E pygraphviz | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
echo "installing poetry dependencies" | ||
poetry install -E plotting -E pygraphviz | ||
|
||
- name: Lint | ||
run: poetry run poe lint | ||
- name: Lint | ||
run: poetry run poe lint | ||
|
||
- name: Check Formatting | ||
run: poetry run poe format_check | ||
- name: Check Formatting | ||
run: poetry run poe format_check | ||
|
||
- name: Test | ||
run: poetry run poe test --splits 6 --group ${{ matrix.test-group }} | ||
- name: Test | ||
run: poetry run poe test --splits 6 --group ${{ matrix.test-group }} | ||
|
||
- name: Install EconML dependency | ||
run: | | ||
poetry install -E plotting -E pygraphviz -E econml | ||
- name: Install EconML dependency | ||
run: | | ||
poetry install -E plotting -E pygraphviz -E econml | ||
|
||
- name: Test EconML based functionality | ||
run: poetry run poe test_econml | ||
- name: Test EconML based functionality | ||
run: poetry run poe test_econml | ||
|
||
- name: Test README errors for PyPI | ||
run: | | ||
pip install poetry-dynamic-versioning | ||
pip install twine | ||
poetry-dynamic-versioning | ||
poetry build | ||
twine check dist/* | ||
- name: Test README errors for PyPI | ||
run: | | ||
pip install poetry-dynamic-versioning | ||
pip install twine | ||
poetry-dynamic-versioning | ||
poetry build | ||
twine check dist/* | ||
|
||
- name: Notify Discord | ||
if: failure() && github.ref == 'refs/heads/main' | ||
uses: th0th/[email protected] | ||
env: | ||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }} | ||
GITHUB_ACTOR: ${{ github.actor }} | ||
GITHUB_JOB_NAME: CI Failed on Main | ||
GITHUB_JOB_STATUS: ${{ job.status }} | ||
- name: Notify Discord | ||
if: failure() && github.ref == 'refs/heads/main' | ||
uses: th0th/[email protected] | ||
env: | ||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }} | ||
GITHUB_ACTOR: ${{ github.actor }} | ||
GITHUB_JOB_NAME: CI Failed on Main | ||
GITHUB_JOB_STATUS: ${{ job.status }} |
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 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 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 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 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 |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
*.DS_Store | ||
*.vscode | ||
|
||
# Distribution / packaging | ||
.Python | ||
|
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 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
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.
Note whoever is the owner of
"ghcr.io/${{ github.repository_owner }}/dowhy-docs-generation:latest"
needs to update the container to use Python3.8+Preferably Python3.11, since that will future proof the CI and it's just doc building.
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.
Thanks. @petergtz I remember you had set this up? can you update the python version as Adam suggests?
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.
@adam2392 @amit-sharma Hey guys, the image referred to by Adam is built using the build-docker-image-docs.yml workflow. The Dockerfile it refers to is docs/Dockerfile.
This Dockerfile builds on top of another Docker image (
ghcr.io/py-why/dowhy-example-notebooks-deps
) where the actual installation of packages happens. You can find its Dockerfile in py-why/dowhy-example-notebooks-deps-dockerfile.If you want to bump the Python version, it should probably happen there. I wouldn't know from the top of my mind how to do it though, as we're never explicitly specifying the Python version. Maybe using a newer Ubuntu base image could do, but unsure. Also have a look at the README, it says that the R dependencies are really difficult to control. Maybe you can delete all these dependencies now, because there is no R code anymore. Otherwise, you'll probably have to go through some trial and error.