Skip to content
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
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
"features": {
//"ghcr.io/devcontainers-extra/features/poetry:2": {}
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": ["charliermarsh.ruff", "-ms-python.vscode-pylance"]
}
},

"postAttachCommand": "python -m pip install --upgrade pip && python -m pip install poetry==2.1.1 && python -m poetry install"

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8]
poetry-version: [1.1.4]
python-version: [3.11,3.12]
poetry-version: [2.1.1]

runs-on: ubuntu-latest

Expand Down Expand Up @@ -42,9 +42,9 @@ jobs:
run: |
python -m poetry run python -m pytest -v tests

- name: Lint with flake8
- name: Lint with ruff
run: |
python -m poetry run python -m flake8 .
python -m poetry run ruff check



Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,5 @@ dmypy.json

# Visual Studio Code
.vscode
.direnv
.ruff_cache
4 changes: 2 additions & 2 deletions integration_tests/test_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from python_picnic_api import PicnicAPI
from python_picnic_api2 import PicnicAPI
from dotenv import load_dotenv
import os

Expand Down Expand Up @@ -48,7 +48,7 @@ def test_get_article_with_category_name():
assert response["name"] == "Douwe Egberts aroma rood filterkoffie"
assert "category_name" in response.keys()
assert response["category_name"] == "Koffie & thee"


def test_get_lists():
response_1 = picnic.get_lists()
Expand Down
3 changes: 2 additions & 1 deletion integration_tests/test_helper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from python_picnic_api.helper import get_image, get_recipe_image
from python_picnic_api2.helper import get_image, get_recipe_image
import requests


def test_get_image():
id = "8560e1f1c2d2811dfefbbb2342ef0d95250533f2131416aca459bde35d73e901"
size = "tile-medium"
Expand Down
6 changes: 3 additions & 3 deletions integration_tests/test_session.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from python_picnic_api.session import PicnicAPISession, PicnicAuthError
from python_picnic_api.helper import _url_generator
from python_picnic_api2.session import PicnicAPISession, PicnicAuthError
from python_picnic_api2.helper import _url_generator
from requests import Session
from dotenv import load_dotenv
import os
Expand Down Expand Up @@ -31,7 +31,7 @@ def test_login_auth_error():

try:
session = PicnicAPISession()
session.login('username', 'password', base_url)
session.login("username", "password", base_url)
except PicnicAuthError:
assert True
else:
Expand Down
Loading