Skip to content

Commit

Permalink
Support Python 1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquev6 committed Oct 9, 2024
1 parent 47186c3 commit 8d8cbec
Show file tree
Hide file tree
Showing 10 changed files with 116 additions and 19 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-test-gha-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python_version: ['3.8', '3.12']
python_version: ['3.8', '3.13']
steps:
- name: Install Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
runs-on: windows-2019
strategy:
matrix:
python_version: ['3.8', '3.12']
python_version: ['3.8', '3.13']
steps:
- name: Install Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
runs-on: macos-12
strategy:
matrix:
python_version: ['3.8', '3.12']
python_version: ['3.8', '3.13']
env:
MACOSX_DEPLOYMENT_TARGET: 12.0
steps:
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
- macos-12
- macos-13
# No macos-14: we don't support M1 chips
python_version: ['3.8', '3.12']
python_version: ['3.8', '3.13']
steps:
- name: Install Python
uses: actions/setup-python@v5
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/distribute-pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- make-source-dist
strategy:
matrix:
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- name: Install Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
- make-source-dist
strategy:
matrix:
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- name: Install Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
- make-source-dist
strategy:
matrix:
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
env:
MACOSX_DEPLOYMENT_TARGET: 12.0
steps:
Expand Down Expand Up @@ -277,7 +277,7 @@ jobs:
- macos-12
- macos-13
# No macos-14: we don't support M1 chips
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- name: Install Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -338,7 +338,7 @@ jobs:
- name: Download the wheels from GitHub Actions artifacts
uses: actions/download-artifact@v4
with:
name: wheel-dist-3.10-linux
name: wheel-dist-3.13-linux
path: docker
- name: Build the Docker image
run: docker build --pull --no-cache --build-arg lincs_version=$(echo ${{ github.ref_name }} | sed 's/^v//') --tag jacquev6/lincs:$(echo ${{ github.ref_name }} | sed 's/^v//') docker
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/distribute-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- make-source-dist
strategy:
matrix:
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- name: Install Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
- make-source-dist
strategy:
matrix:
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- name: Install Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
- make-source-dist
strategy:
matrix:
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
env:
MACOSX_DEPLOYMENT_TARGET: 12.0
steps:
Expand Down Expand Up @@ -275,7 +275,7 @@ jobs:
- macos-12
- macos-13
# No macos-14: we don't support M1 chips
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python_version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- name: Install Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -336,7 +336,7 @@ jobs:
- name: Download the wheels from GitHub Actions artifacts
uses: actions/download-artifact@v4
with:
name: wheel-dist-3.10-linux
name: wheel-dist-3.13-linux
path: docker
- name: Build the Docker image
run: docker build --pull --no-cache --build-arg lincs_version=$(echo ${{ github.ref_name }} | sed 's/^v//') --tag jacquev6/lincs:$(echo ${{ github.ref_name }} | sed 's/^v//') docker
Expand Down
4 changes: 2 additions & 2 deletions development/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
sudo

# Python versions
ENV LINCS_DEV_PYTHON_VERSIONS="3.8 3.9 3.10 3.11 3.12"
ENV LINCS_DEV_PYTHON_VERSIONS="3.8 3.9 3.10 3.11 3.12 3.13"
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=bind,from=download-get-pip,source=/download,target=/download \
Expand All @@ -101,7 +101,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends \
$(for python_version in $non_default_python_versions; do echo "python$python_version-dev python$python_version-distutils python$python_version-venv"; done) \
$(for python_version in $non_default_python_versions; do echo python$python_version-dev; echo python$python_version-distutils; echo python$python_version-venv; done | grep -v python3.13-distutils) \
&& for python_version in $non_default_python_versions $default_python_version; do python$python_version /download/get-pip.py || exit 1; done

# Boost
Expand Down
2 changes: 1 addition & 1 deletion doc-sources/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Changelog
Version 2.0.0 (2024-XX-YY)
==========================

- Support Python 3.12
- Support Python 3.12 and 3.13

- Drop support for macOS 11 (`not supported by GitHub Actions anymore <https://github.blog/changelog/2024-05-20-actions-upcoming-changes-to-github-hosted-macos-runners/>`_)

Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM python:3.10-slim AS dist
FROM python:3.13-slim AS dist
RUN mkdir /dist
ARG lincs_version
COPY lincs-$lincs_version-cp310-cp310-manylinux_2_31_x86_64.whl /dist

FROM python:3.10-slim
FROM python:3.13-slim
ARG lincs_version
RUN --mount=type=bind,from=dist,source=/dist,target=/dist pip install --find-links /dist --only-binary lincs lincs==$lincs_version
CMD ["bash"]
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,38 @@
"\n",
"name,\"Physics grade\",\"Literature grade\",category\n",
"Alice,11,12,Good\n",
"Bob,9,11,Bad\n",
"Python 3.13\n",
"kind: classification-problem\n",
"format_version: 1\n",
"criteria:\n",
" - name: Physics grade\n",
" value_type: real\n",
" preference_direction: increasing\n",
" min_value: 0\n",
" max_value: 20\n",
" - name: Literature grade\n",
" value_type: real\n",
" preference_direction: increasing\n",
" min_value: 0\n",
" max_value: 20\n",
"ordered_categories:\n",
" - name: Bad\n",
" - name: Good\n",
"\n",
"kind: ncs-classification-model\n",
"format_version: 1\n",
"accepted_values:\n",
" - kind: thresholds\n",
" thresholds: [10]\n",
" - kind: thresholds\n",
" thresholds: [10]\n",
"sufficient_coalitions:\n",
" - kind: weights\n",
" criterion_weights: [0.400000006, 0.699999988]\n",
"\n",
"name,\"Physics grade\",\"Literature grade\",category\n",
"Alice,11,12,Good\n",
"Bob,9,11,Bad\n"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,35 @@
"ordered_categories:\n",
" - name: Worst category\n",
" - name: Intermediate category 1\n",
" - name: Best category\n",
"Python 3.13\n",
"# Reproduction command (with lincs version 2.0.0a3.dev0): lincs generate classification-problem 4 3 --random-seed 208978669\n",
"kind: classification-problem\n",
"format_version: 1\n",
"criteria:\n",
" - name: Criterion 1\n",
" value_type: real\n",
" preference_direction: increasing\n",
" min_value: 0\n",
" max_value: 1\n",
" - name: Criterion 2\n",
" value_type: real\n",
" preference_direction: increasing\n",
" min_value: 0\n",
" max_value: 1\n",
" - name: Criterion 3\n",
" value_type: real\n",
" preference_direction: increasing\n",
" min_value: 0\n",
" max_value: 1\n",
" - name: Criterion 4\n",
" value_type: real\n",
" preference_direction: increasing\n",
" min_value: 0\n",
" max_value: 1\n",
"ordered_categories:\n",
" - name: Worst category\n",
" - name: Intermediate category 1\n",
" - name: Best category\n"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,38 @@
"\n",
"name,\"Physics grade\",\"Literature grade\",category\n",
"Alice,11,12,Good\n",
"Bob,9,11,Bad\n",
"Python 3.13\n",
"kind: classification-problem\n",
"format_version: 1\n",
"criteria:\n",
" - name: Physics grade\n",
" value_type: real\n",
" preference_direction: increasing\n",
" min_value: 0\n",
" max_value: 20\n",
" - name: Literature grade\n",
" value_type: real\n",
" preference_direction: increasing\n",
" min_value: 0\n",
" max_value: 20\n",
"ordered_categories:\n",
" - name: Bad\n",
" - name: Good\n",
"\n",
"kind: ncs-classification-model\n",
"format_version: 1\n",
"accepted_values:\n",
" - kind: thresholds\n",
" thresholds: [10]\n",
" - kind: thresholds\n",
" thresholds: [10]\n",
"sufficient_coalitions:\n",
" - kind: weights\n",
" criterion_weights: [0.400000006, 0.699999988]\n",
"\n",
"name,\"Physics grade\",\"Literature grade\",category\n",
"Alice,11,12,Good\n",
"Bob,9,11,Bad\n"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
"Python 3.12\n",
"/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':\n",
"(.text+0x24): undefined reference to `main'\n",
"collect2: error: ld returned 1 exit status\n",
"Python 3.13\n",
"/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':\n",
"(.text+0x24): undefined reference to `main'\n",
"collect2: error: ld returned 1 exit status\n"
]
}
Expand Down

0 comments on commit 8d8cbec

Please sign in to comment.