Skip to content

Commit

Permalink
chore: upgrade poetry to 1.7.1 and fix associated syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBredehoft committed Feb 8, 2024
1 parent b617740 commit b407733
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prepare_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry==1.2.2
python -m pip install poetry==1.7.1
make setup_env
# Make sure that the workflow has been triggered from a release branch if this is a patch
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_licenses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry==1.2.2
python -m pip install poetry==1.7.1
make setup_env
- name: Update licenses
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/weekly-pip-audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
which pip3
python -m pip install --upgrade pip
python -m pip install poetry
python -m pip install poetry==1.7.1
make setup_env
- name: Run pip-audit
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CONCRETE_PACKAGE_PATH=$(SRC_DIR)/concrete
COUNT?=1
RANDOMLY_SEED?=$$RANDOM
PYTEST_OPTIONS:=
POETRY_VERSION:=1.2.2
POETRY_VERSION:=1.7.1
APIDOCS_OUTPUT?="./docs/developer-guide/api"
OPEN_PR="true"

Expand All @@ -27,6 +27,10 @@ CONCRETE_PYTHON_VERSION="concrete-python==2.5.0"
# --pyproject-toml-file pyproject.toml \
# --get-pip-install-spec-for-dependency concrete-python)"

# At the end of the command, we currently need to force an 'import skorch' in Python in order to
# avoid an obscure bug that led to all pytest commands to fail when installing dependencies with
# Poetry >= 1.3. It is however not very clear how this import fixes the issue, as the bug was
# difficult to understand and reproduce, so the line might become obsolete in the future.
.PHONY: setup_env # Set up the environment
setup_env:
@# The keyring install is to allow pip to fetch credentials for our internal repo if needed
Expand All @@ -53,6 +57,8 @@ setup_env:
poetry run python -m pip install -U --pre "$(CONCRETE_PYTHON_VERSION)"
"$(MAKE)" fix_omp_issues_for_intel_mac

poetry run python -c "import skorch" # Details above

.PHONY: sync_env # Synchronise the environment
sync_env:
if [[ $$(poetry --version) != "Poetry (version $(POETRY_VERSION))" ]];then \
Expand Down
4 changes: 2 additions & 2 deletions script/make_utils/setup_os_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ if [[ "${OS_NAME}" == "Linux" ]]; then
wget && \
${CLEAR_APT_LISTS:+$CLEAR_APT_LISTS} \
python3 -m pip install --no-cache-dir --upgrade pip && \
python3 -m pip install --no-cache-dir --ignore-installed poetry==1.2.2 && \
python3 -m pip install --no-cache-dir --ignore-installed poetry==1.7.1 && \
linux_install_gitleaks && linux_install_actionlint && linux_install_github_cli"
fi
eval "${SETUP_CMD}"
Expand All @@ -151,7 +151,7 @@ elif [[ "${OS_NAME}" == "Darwin" ]]; then

brew install curl git git-lfs gitleaks graphviz jq make pandoc shellcheck openssl libomp actionlint unzip gh rsync
python3 -m pip install -U pip
python3 -m pip install poetry==1.2.2
python3 -m pip install poetry==1.7.1

echo "Make is currently installed as gmake"
echo 'If you need to use it as "make", you can add a "gnubin" directory to your PATH from your bashrc like:'
Expand Down

0 comments on commit b407733

Please sign in to comment.