Skip to content
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

Python311 #182

Merged
merged 9 commits into from
Mar 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
pip install -Ur requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]

steps:
- uses: actions/checkout@v3
Expand All @@ -28,7 +28,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9" ] # pip install requirements fail on 3.10
python-version: [ "3.7", "3.8", "3.9" ] # pip install requirements fail on 3.10 and 3.11 because of Fasttext

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,3 +296,5 @@
- Fixed tags converter bug with data processor.

## dev

- Add Python 3.11
10 changes: 5 additions & 5 deletions codecov_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# To run using ZSH: zsh -i ./codecov_push.sh
# To run using bash: bash -i ./codecov_push.sh

# We do test on Python 3.10
# We do test on Python 3.11 (latest Python version)

# Create a new Python env for Deepparse tests and activate it
conda create --name deepparse_pytest_3_10 python=3.10 -y --force
conda activate deepparse_pytest_3_10
conda create --name deepparse_pytest_3_11 python=3.11 -y --force
conda activate deepparse_pytest_3_11

# Install dependencies
pip install -Ur tests/requirements.txt
Expand All @@ -15,12 +15,12 @@ pip install -Ur requirements.txt
# Run pytest from conda env
echo "*****Running test in Conda*****"
# --live-stream is to remove the Conda capture of the stream
conda run -n deepparse_pytest_3_10 --live-stream pytest --cov ./deepparse --cov-report html --cov-report xml --cov-config=.coveragerc
conda run -n deepparse_pytest_3_11 --live-stream pytest --cov ./deepparse --cov-report html --cov-report xml --cov-config=.coveragerc

# Push the coverage file
./codecov -f coverage.xml -n unittest-integrationtest -t $CODECOVKEYDEEPPARSE

# close conda env
conda deactivate

conda env remove -n deepparse_pytest_3_10
conda env remove -n deepparse_pytest_3_11
37 changes: 34 additions & 3 deletions run_tests_python_envs.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/sh
# To run using ZSH: zsh -i ./codecov_push.sh
# To run using bash: bash -i ./codecov_push.sh

# We test on Deepparse supported Python versions, namely, 3.7, 3.8, 3.9 and 3.10
echo "*****Starting of testing Deepparse on Python version 3.7, 3.8, 3.9, 3.10*****"
# We test on Deepparse supported Python versions, namely, 3.7, 3.8, 3.9, 3.10 and 3.11
echo "*****Starting of testing Deepparse on Python version 3.7, 3.8, 3.9, 3.10, 3.11*****"

# We export the reports into a directory. But to do so, we need to move into that directory
# and run pytest from there
Expand Down Expand Up @@ -94,7 +96,29 @@ fi
conda deactivate

# Cleanup the conda env
conda env remove -n deepparse_pytest_3_10
conda env remove -n deepparse_pytest_3_11

# Create a new Python env 3.11
conda create --name deepparse_pytest_3_11 python=3.11 -y --force
conda activate deepparse_pytest_3_11

# Install dependencies
pip install -Ur ../tests/requirements.txt
pip install -Ur ../requirements.txt

# Run pytest from conda env
echo "*****Running test in Conda Python version 3.11*****"
conda run -n deepparse_pytest_3_11 --live-stream pytest --cov ../deepparse --cov-report html:html_report_3_11 --cov-report xml:export_xml_report_3_11.xml --cov-config=.coveragerc ../tests

if [ $? -eq 0 ]; then
python3_11_tests_res=1
fi

# close conda env
conda deactivate

# Cleanup the conda env
conda env remove -n deepparse_pytest_3_11

# All tests env print
echo "*****The results of the tests are:"
Expand Down Expand Up @@ -128,6 +152,13 @@ else
echo "Fail for Python 3.10"
fi

if [ $python3_11_tests_res -eq 1 ]; then
echo "Success for Python 3.11"
else
return_status=1
echo "Fail for Python 3.11"
fi

if [ $return_status -eq 1 ]; then
exit 1
else
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def main():
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering",
Expand Down