Skip to content

Commit

Permalink
Merge pull request #12426 from PennyDreadfulMTG/python-3.12
Browse files Browse the repository at this point in the history
Upgrade to Python 3.12
  • Loading branch information
mergify[bot] committed May 3, 2024
2 parents 358e4e9 + 4684aef commit e7a1170
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 141 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.10.6'
python-version: '3.12'
cache: 'pipenv'
- uses: PennyDreadfulMTG/setup-linters@main
- name: Install dependencies
Expand All @@ -26,10 +26,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12'
cache: 'pipenv'
- uses: PennyDreadfulMTG/setup-linters@main
- name: Install dependencies
Expand All @@ -51,10 +51,10 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12'
cache: 'pipenv'
- uses: getong/mariadb-action@v1.1
with:
Expand Down Expand Up @@ -82,10 +82,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12'
cache: 'pipenv'
- name: Setup Node.js environment
uses: actions/setup-node@v4.0.2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/isort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12'
cache: 'pipenv'
- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/repip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12'
cache: 'pipenv'
- name: Install dependencies
run: |
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
FROM nikolaik/python-nodejs:python3.10-nodejs12 AS python
FROM nikolaik/python-nodejs:python3.12-nodejs22 AS python

WORKDIR /pdm
RUN pip install pipenv
COPY Pipfile Pipfile.lock ./
RUN pipenv sync
CMD ["/bin/bash"]

FROM nikolaik/python-nodejs:python3.10-nodejs12 AS js
FROM nikolaik/python-nodejs:python3.12-nodejs22 AS js

WORKDIR /restore
COPY package*.json ./
RUN npm ci --verbose

FROM nikolaik/python-nodejs:python3.10-nodejs12
FROM nikolaik/python-nodejs:python3.12-nodejs22

COPY --from=python /usr/local/lib/python3.10/site-packages/ /usr/local/lib/python3.10/site-packages/
COPY --from=python /usr/local/lib/python3.12/site-packages/ /usr/local/lib/python3.12/site-packages/
COPY --from=python /root/.local/share/virtualenvs/ /root/.local/share/virtualenvs/
COPY --from=js /restore/node_modules /pdm/node_modules

Expand Down
3 changes: 1 addition & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ init-cards = "python run.py init-cards"
flake8 = "==7.0.0"
flake8-quotes = "*"
flake8-bugbear = "*"
flake8-commas = "*"
flake8-import-graph = "*"
flake8-raise = "*"
flake8-deprecated = "*"
Expand Down Expand Up @@ -110,4 +109,4 @@ discord-typings = "*"
anyascii = "*"

[requires]
python_version = "3.10"
python_version = "3.12"
182 changes: 62 additions & 120 deletions Pipfile.lock

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Contributions are very welcome. Please join the Discord at <https://pennydreadfu
- docker-compose up

If you plan on running things outside of the containers (eg: dev.py or logsite):
- Install python 3.10
- Install python 3.12
- Install pipenv
- Install npm
- git clone <https://github.com/PennyDreadfulMTG/Penny-Dreadful-Tools.git>
Expand All @@ -69,7 +69,7 @@ If you plan on running things outside of the containers (eg: dev.py or logsite):
## Manual Development Environment Setup (Non-docker instructions)

- Install MariaDB 10.0+
- Install python 3.10
- Install python 3.12
- Install pipenv
- Install npm
- git clone <https://github.com/PennyDreadfulMTG/Penny-Dreadful-Tools.git>
Expand Down Expand Up @@ -116,5 +116,4 @@ Check the dev.py source code for the full set of options including `unit`, `type

## Working on React components

- Run logsite
- pipenv run python dev.py watch # Builds bundle.js after every file change.

0 comments on commit e7a1170

Please sign in to comment.