Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release process for Vizro AI #158

Merged
merged 28 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
48e0eb9
Fix for linting in hatch run prep release
maxschulz-COL Nov 10, 2023
496738f
Test first things
maxschulz-COL Nov 10, 2023
335ed9c
Allow vizro-ai in release process
maxschulz-COL Nov 10, 2023
63c0b84
TBR release of vizro_ai
maxschulz-COL Nov 10, 2023
34daf1b
Add draft and latest
maxschulz-COL Nov 10, 2023
6f75e60
change tokens to test pypi
maxschulz-COL Nov 10, 2023
448c27b
Merge branch 'main' of github.com:mckinsey/vizro into fix/adjust_rele…
maxschulz-COL Nov 10, 2023
e9e0392
stringify boolean
maxschulz-COL Nov 10, 2023
5795be6
Fix
maxschulz-COL Nov 10, 2023
d1b8b83
Fix
maxschulz-COL Nov 10, 2023
683bca1
Add test pypi
maxschulz-COL Nov 10, 2023
6387db5
Revert "TBR release of vizro_ai"
maxschulz-COL Nov 10, 2023
9c8b427
Fix to low version
maxschulz-COL Nov 10, 2023
fea08e3
Lint
maxschulz-COL Nov 10, 2023
8f7a445
TBR fake release
maxschulz-COL Nov 10, 2023
93df9b6
Actually release to test-pypi
maxschulz-COL Nov 10, 2023
daf95d1
check tagging
maxschulz-COL Nov 10, 2023
dc76496
Revert "TBR fake release"
maxschulz-COL Nov 10, 2023
ca9b525
Dev version
maxschulz-COL Nov 10, 2023
7769acf
Reactivate everything
maxschulz-COL Nov 10, 2023
3a18d34
Revert things to final
maxschulz-COL Nov 10, 2023
3a29157
changelog
maxschulz-COL Nov 10, 2023
81144d4
CHangelog
maxschulz-COL Nov 10, 2023
62bfbc7
Remove PR bit
maxschulz-COL Nov 10, 2023
214d4e4
address comments
lingyielia Nov 13, 2023
d687512
make package name variable consistent
lingyielia Nov 13, 2023
1b347db
Merge branch 'main' of github.com:mckinsey/vizro into fix/adjust_rele…
lingyielia Nov 13, 2023
5045eeb
Merge branch 'main' of github.com:mckinsey/vizro into fix/adjust_rele…
lingyielia Nov 13, 2023
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
12 changes: 7 additions & 5 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ jobs:
hatch build
- name: Set PyPI token
run: |
if [ "${{ needs.check-version.outputs.PACKAGE_NAME }}" == "vizro-core" ]; then
echo 'PYPI_TOKEN=${{ secrets.VIZRO_PYPI_TOKEN }}' >> $GITHUB_ENV
if [ "${{ needs.check-version.outputs.package_name }}" == "vizro-core" ]; then
echo 'PYPI_TOKEN=${{ secrets.VIZRO_PYPI_TOKEN }}' >> $GITHUB_ENV
elif [ "${{ needs.check-version.outputs.package_name }}" == "vizro-ai" ]; then
echo 'PYPI_TOKEN=${{ secrets.VIZRO_AI_PYPI_TOKEN }}' >> $GITHUB_ENV
fi
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand All @@ -80,10 +82,10 @@ jobs:
- name: Check correct package uploaded to PyPI
lingyielia marked this conversation as resolved.
Show resolved Hide resolved
run: |
cd "${{ needs.check-version.outputs.package_name }}/dist"
local=$(md5sum vizro-${{needs.check-version.outputs.package_version}}-py3-none-any.whl)
local=$(md5sum ${{ needs.check-version.outputs.package_name }}-${{needs.check-version.outputs.package_version}}-py3-none-any.whl)
cd ..
pip download vizro==${{needs.check-version.outputs.package_version}} -d . --no-deps --timeout 300
pypi=$(md5sum vizro-${{needs.check-version.outputs.package_version}}-py3-none-any.whl)
pip download ${{ needs.check-version.outputs.package_name }}==${{needs.check-version.outputs.package_version}} -d . --no-deps --timeout 300
pypi=$(md5sum ${{ needs.check-version.outputs.package_name }}-${{needs.check-version.outputs.package_version}}-py3-none-any.whl)
if [[ $local = $pypi ]]; then echo "md5 hash is the same"; else echo "md5 hash is not the same"; exit 1; fi

version-bump:
Expand Down
2 changes: 1 addition & 1 deletion tools/check_package_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import requests

AVAILABLE_PACKAGES = ["vizro-core"]
AVAILABLE_PACKAGES = ["vizro-core", "vizro-ai"]
VERSION_MATCHSTR = r'\s*__version__\s*=\s*"(\d+\.\d+\.\d+)"'
RESPONSE_ERROR = 404

Expand Down
15 changes: 13 additions & 2 deletions tools/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,23 @@ GITHUB_ENDPOINT="https://api.github.com/repos/${GITHUB_USER}/${GITHUB_REPO}/rele

BODY=$(jq -Rs . < "$BODY_PATH")

if [ "$PACKAGE" = "vizro-core" ]; then
TAG_NAME="${VERSION}"
MAKE_LATEST=true
else
TAG_NAME="${PACKAGE}-${VERSION}"
MAKE_LATEST=false
fi

PAYLOAD=$(cat <<-END
{
"tag_name": "${VERSION}",
"tag_name": "${TAG_NAME}",
"target_commitish": "main",
"name": "${PACKAGE}-${VERSION}",
"body": ${BODY},
"draft": false,
"prerelease": false
"prerelease": false,
"make_latest": "${MAKE_LATEST}"
}
END
)
Expand All @@ -32,3 +41,5 @@ STATUS=$(curl -L \
-H "X-GitHub-Api-Version: 2022-11-28" \
${GITHUB_ENDPOINT} \
-d "${PAYLOAD}")

echo "${STATUS}"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Uncomment the section that is right (remove the HTML comment wrapper).

### Highlights ✨

- Initial release of vizro-ai package. Vizro-AI is a tool for generating data visualizations. ([#138](https://github.com/mckinsey/vizro/pull/138))
- Initial release of `vizro-ai` package. Vizro-AI is a tool for generating data visualizations. ([#138](https://github.com/mckinsey/vizro/pull/138))

<!--
### Removed
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
A new scriv changelog fragment.

Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨

- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Removed

- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Added

- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Changed

- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Deprecated

- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Fixed

- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Security

- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
4 changes: 2 additions & 2 deletions vizro-ai/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ python = ["3.9", "3.10", "3.11"]
[envs.changelog]
dependencies = ["scriv"]
detached = true
scripts = {add = "scriv create --add"}
scripts = {add = "scriv create --add", collect = ["scriv collect --add", "- hatch run lint:lint --files=CHANGELOG.md > /dev/null"]}

[envs.default]
dependencies = [
Expand All @@ -33,7 +33,7 @@ cov-report = [
lint = "hatch run lint:lint {args:--all-files}"
prep-release = [
"hatch version release",
"hatch run changelog:scriv collect --add",
"hatch run changelog:collect",
"hatch run changelog:add",
'echo "Now raise a PR to merge into main with title: Release of vizro-ai $(hatch version)"'
]
Expand Down
2 changes: 1 addition & 1 deletion vizro-ai/src/vizro_ai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

__all__ = ["VizroAI"]

__version__ = "0.1.0.dev2"
__version__ = "0.1.0.dev3"

logging.basicConfig(level=os.getenv("VIZRO_AI_LOG_LEVEL", "INFO"))
Loading