From 0df322c83e88e3eb33a6a3ff4cc8b0d0ab53bf7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alessandro=20Pezz=C3=A8?= Date: Tue, 7 May 2024 21:23:56 +0200 Subject: [PATCH] Use newer ditto/update python (#240) * feat: use newer ditto/update python * fix: use right executor * sec: fix deps --- .circleci/config.yml | 12 ++++++------ .github/workflows/{docker-build.yml => test.yml} | 0 requirements.txt | 11 ----------- updater/cmd.bash | 4 ++-- 4 files changed, 8 insertions(+), 19 deletions(-) rename .github/workflows/{docker-build.yml => test.yml} (100%) delete mode 100644 requirements.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index 0b7c720cc..438a78180 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,29 +1,29 @@ version: 2.1 executors: - python36: + python3: docker: - - image: cimg/python:3.6.15 + - image: cimg/python:3.12.3 commands: ditto-transform: description: Run Ditto in order to transform the BASE_URL instead of http://localhost steps: - run: - name: Install requirements.txt - command: pip install --user -r requirements.txt + name: Install Ditto + command: pip install --user 'pokeapi-ditto==1.0.2' - run: name: Transform api-data's JSON files to have the correct BASE_URL instead of http://localhost command: bash -x scripts/transform.sh jobs: test: - executor: python36 + executor: python3 steps: - checkout - ditto-transform build-and-deploy: - executor: python36 + executor: python3 steps: - checkout - ditto-transform diff --git a/.github/workflows/docker-build.yml b/.github/workflows/test.yml similarity index 100% rename from .github/workflows/docker-build.yml rename to .github/workflows/test.yml diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index f49c103c5..000000000 --- a/requirements.txt +++ /dev/null @@ -1,11 +0,0 @@ -certifi==2018.8.24 -chardet==3.0.4 -genson==1.0.1 -idna==2.7 -multidict==4.4.2 -odictliteral==1.0.0 -pokeapi-ditto==0.6.1 -requests==2.20.0 -tqdm==4.26.0 -urllib3==1.24.2 -yarl==1.2.6 diff --git a/updater/cmd.bash b/updater/cmd.bash index 10542b094..2fe553f37 100644 --- a/updater/cmd.bash +++ b/updater/cmd.bash @@ -34,8 +34,8 @@ git branch -D "$BRANCH_NAME" || true git branch "$BRANCH_NAME" git checkout "$BRANCH_NAME" -pip install -r requirements.txt -rm -r ./data +pip install 'pokeapi-ditto==1.0.2' +rm -rf ./data ditto clone --src-url http://localhost/ --dest-dir ./data # (╯°□°)╯ *always* assume magikarp failed and grab it again #clowntown ditto clone --src-url http://localhost/ --dest-dir ./data --select pokemon/129