Skip to content

Commit

Permalink
Updates release.md and verification scripts. (#4417)
Browse files Browse the repository at this point in the history
Script changes and general tidying from our 0.12.0 release @balopat .
  • Loading branch information
MichaelBroughton authored Aug 11, 2021
1 parent db1b310 commit eb42d4a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 5 additions & 7 deletions dev_tools/packaging/verify-published-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,25 @@ for PYTHON_VERSION in python3; do
# Prepare.
CORE_DEPS_FILE="${REPO_ROOT}/cirq-core/requirements.txt"
GOOGLE_DEPS_FILE="${REPO_ROOT}/cirq-google/requirements.txt"
CONTRIB_DEPS_FILE="${REPO_ROOT}/cirq-core/cirq/contrib/contrib-requirements.txt"
CONTRIB_DEPS_FILE="${REPO_ROOT}/cirq-core/cirq/contrib/requirements.txt"
DEV_DEPS_FILE="${REPO_ROOT}/dev_tools/requirements/deps/dev-tools.txt"

echo -e "\n\033[32m${PYTHON_VERSION}\033[0m"
echo "Working in a fresh virtualenv at ${tmp_dir}/${PYTHON_VERSION}"
virtualenv --quiet "--python=/usr/bin/${PYTHON_VERSION}" "${tmp_dir}/${PYTHON_VERSION}"

# Install package.
if [ "${PYPI_REPO_NAME}" == "TEST" ]; then
echo "Pre-installing dependencies since they don't all exist in TEST pypi"
"${tmp_dir}/${PYTHON_VERSION}/bin/pip" install --quiet -r "${CORE_DEPS_FILE}" -r "${GOOGLE_DEPS_FILE}" -r "${DEV_DEPS_FILE}"
fi
echo Installing "${PYPI_PROJECT_NAME}==${PROJECT_VERSION} from ${PYPI_REPO_NAME} pypi"
"${tmp_dir}/${PYTHON_VERSION}/bin/pip" install --quiet ${PIP_FLAGS} "${PYPI_PROJECT_NAME}==${PROJECT_VERSION}"
"${tmp_dir}/${PYTHON_VERSION}/bin/pip" install --quiet ${PIP_FLAGS} "${PYPI_PROJECT_NAME}==${PROJECT_VERSION}" --extra-index-url https://pypi.python.org/simple

# Check that code runs without dev deps.
echo Checking that code executes
"${tmp_dir}/${PYTHON_VERSION}/bin/python" -c "import cirq; print(cirq.google.Foxtail)"
"${tmp_dir}/${PYTHON_VERSION}/bin/python" -c "import cirq_google; print(cirq_google.Foxtail)"
"${tmp_dir}/${PYTHON_VERSION}/bin/python" -c "import cirq; print(cirq.Circuit(cirq.CZ(*cirq.LineQubit.range(2))))"

# Install pytest + dev deps.
"${tmp_dir}/${PYTHON_VERSION}/bin/pip" install -r ${DEV_DEPS_FILE}

# Run tests.
PY_VER=$(ls "${tmp_dir}/${PYTHON_VERSION}/lib")
echo Running cirq tests
Expand Down
6 changes: 4 additions & 2 deletions release.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,10 @@ Retrieve all commits since the last release with:
```git log "--pretty=%h %s"```.

You can get the changes to the top-level objects and protocols by
checking the history of the
[init file](https://github.com/quantumlib/Cirq/blob/master/cirq/__init__.py)
checking the history of the init files. `git diff <previous version>..HEAD cirq-core/cirq/__init__.py`

You can get the contributing authors for the release by running:
`git log <previous version>..HEAD --pretty="%an" | sort | uniq | sed ':a;N;$!ba;s/\n/, /g'`


### Release to prod pypi
Expand Down

0 comments on commit eb42d4a

Please sign in to comment.