Skip to content

Commit

Permalink
Merge pull request #27 from python-discord/3.11
Browse files Browse the repository at this point in the history
Bump to Python 3.11 & Bump all dependencies
  • Loading branch information
jb3 committed Sep 12, 2023
2 parents a9f15f7 + 485e23d commit 10072b0
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 92 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Python Dependencies
uses: HassanAbouelela/actions/setup-python@setup-python_v1.4.2
with:
python_version: '3.9'
python_version: '3.11'

# Run flake8 and have it format the linting errors in the format of
# the GitHub Workflow command to register error annotations. This
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Python Dependencies
uses: HassanAbouelela/actions/setup-python@setup-python_v1.4.2
with:
python_version: '3.9'
python_version: '3.11'

- name: Build package using poetry
run: poetry build
Expand Down
27 changes: 8 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
FROM python:3.9-slim

# Set pip to have cleaner logs and no saved cache
ENV PIP_NO_CACHE_DIR=false \
POETRY_VIRTUALENVS_CREATE=false

# Install Poetry and add it to the path
RUN pip install --user poetry
ENV PATH="${PATH}:/root/.local/bin"

WORKDIR /olli

# Copy dependencies and lockfile
COPY pyproject.toml poetry.lock /olli/

# Install dependencies and lockfile, excluding development
# dependencies,
RUN poetry install --no-dev --no-interaction --no-ansi
FROM --platform=linux/amd64 ghcr.io/owl-corp/python-poetry-base:3.11-slim

# Set SHA build argument
ARG git_sha="development"
ENV GIT_SHA=$git_sha

# Install dependencies and lockfile, excluding development dependencies
WORKDIR /olli
COPY pyproject.toml poetry.lock /olli/
RUN poetry install --without dev

# Copy the rest of the project code
COPY . .

# Start Olli
CMD ["python", "-m", "olli"]
ENTRYPOINT ["poetry"]
CMD ["run", "python", "-m", "olli"]
85 changes: 21 additions & 64 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ classifiers = [
]

[tool.poetry.dependencies]
python = "^3.9"
httpx = ">=0.17.1,<0.24.0"
toml = "^0.10.2"
pydantic = "^1.8.1"
schedule = "^1.0.0"
python-dotenv = "^0.16.0"
loguru = "^0.5.3"
python = "3.11.*"

httpx = "0.25.0"
pydantic = "1.10.12"
schedule = "1.2.0"
python-dotenv = "1.0.0"
loguru = "0.7.2"

[tool.poetry.dev-dependencies]
flake8 = "^3.9.0"
Expand Down

0 comments on commit 10072b0

Please sign in to comment.