Skip to content

Commit

Permalink
DAG-2970: Lock pyyaml version (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
zamj committed Oct 18, 2023
1 parent bf4fc39 commit d7e0c4c
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 66 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,8 @@
# Changelog

## 5.0.0 - 2023-10-18
- Lock `pyyaml` to `6.0.1` to avoid cython issues.

## 4.0.0 - 2023-07-31
- Add `--display-variant-name` optional argument.

Expand Down
69 changes: 38 additions & 31 deletions evergreen.yml
Expand Up @@ -29,7 +29,7 @@ buildvariants:
- name: unit_tests_3.9

functions:
run_tests:
install_poetry:
- command: shell.exec
params:
working_dir: src
Expand All @@ -40,52 +40,59 @@ functions:
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
export PIPX_HOME="$PWD/pipx"
export PIPX_BIN_DIR="$PWD/pipx/bin"
if [ "Windows_NT" = "$OS" ]; then
export PIPX_HOME=$(cygpath -w "$PIPX_HOME")
export PIPX_BIN_DIR=$(cygpath -w "$PIPX_BIN_DIR")
PYTHON="/cygdrive/c/python/python${short_python_version}/python.exe"
"$PYTHON" -m venv venv
dos2unix "venv/Scripts/activate"
. "venv/Scripts/activate"
else
export PYENV_ROOT="$PWD/pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
git clone https://github.com/pyenv/pyenv.git pyenv
eval "$(pyenv init -)"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk MACOSX_DEPLOYMENT_TARGET=10.14 pyenv install ${python_version}
pyenv virtualenv ${python_version} venv-${python_version}
pyenv global venv-${python_version}
pip install --upgrade pip
fi
poetry run pytest --cov=src --junitxml=junit-test-output.xml
install_poetry:
export PATH="$PATH:$PIPX_BIN_DIR"
rm -rf "$PIPX_HOME"
pip install --disable-pip-version-check --quiet pipx==1.1.0
pipx install poetry==1.2.2
run_tests:
- command: shell.exec
params:
working_dir: src
script: |
set -o errexit
set -o verbose
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
echo $OS
export PIPX_BIN_DIR="$PWD/pipx/bin"
if [ "Windows_NT" = "$OS" ]; then
PYTHON="/cygdrive/c/python/python${short_python_version}/python.exe"
$PYTHON -m venv venv
dos2unix "venv/Scripts/activate"
. "venv/Scripts/activate"
$PYTHON -m ensurepip --upgrade
pip install poetry
else
git clone https://github.com/pyenv/pyenv.git pyenv
export PYENV_ROOT="$PWD/pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv init --path)"
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk MACOSX_DEPLOYMENT_TARGET=10.14 pyenv install ${python_version}
pyenv virtualenv ${python_version} venv-${python_version}
pyenv global venv-${python_version}
pip install --upgrade pip
pip install poetry
export PIPX_BIN_DIR=$(cygpath -w "$PIPX_BIN_DIR")
fi
export PATH="$PATH:$PIPX_BIN_DIR"
poetry install
poetry run pytest --cov=src --junitxml=junit-test-output.xml
check_version_update:
- command: shell.exec
Expand Down Expand Up @@ -126,24 +133,24 @@ tasks:
commands:
- func: install_poetry
vars:
python_version: "3.7.1"
short_python_version: "37"
python_version: 3.7.1
short_python_version: 37
- func: run_tests

- name: unit_tests_3.8
commands:
- func: install_poetry
vars:
python_version: "3.8.10"
short_python_version: "38"
python_version: 3.8.10
short_python_version: 38
- func: run_tests

- name: unit_tests_3.9
commands:
- func: install_poetry
vars:
python_version: "3.9.7"
short_python_version: "39"
python_version: 3.9.2
short_python_version: 39
- func: run_tests

- name: check_pypi_version
Expand Down
77 changes: 44 additions & 33 deletions poetry.lock

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

4 changes: 2 additions & 2 deletions pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "git-co-evg-base"
version = "4.0.0"
version = "5.0.0"
description = "Find a good commit to base your work on"
authors = ["David Bradford <david.bradford@mongodb.com>"]
readme = "README.md"
Expand All @@ -19,7 +19,7 @@ click = "^8"
plumbum = "^1.7.0"
Inject = "^4.3.1"
structlog = "^21.1.0"
PyYAML = "^5.4.1"
PyYAML = "^6.0.1"
xdg = "^5.1.1"
pydantic = "^1.8.2"
rich = "^10.9.0"
Expand Down

0 comments on commit d7e0c4c

Please sign in to comment.