Skip to content

Commit

Permalink
Merge branch 'develop' into fix/remove-C416-rule
Browse files Browse the repository at this point in the history
  • Loading branch information
ooooo-create authored Mar 5, 2024
2 parents cec2bd2 + 5e88011 commit 60830e9
Show file tree
Hide file tree
Showing 28 changed files with 219 additions and 251 deletions.
171 changes: 0 additions & 171 deletions .github/workflows/build-and-release-prod.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
name: Build a dev version for all packages and release them
name: Build all taipy packages and release them

on:
workflow_dispatch:
inputs:
publish_on_pypi:
description: "Should the packages be published on Pypi?"
internal_dep_on_pypi:
description: "Point taipy internal dependencies to Pypi? If false it will point to the github .tar.gz release file"
default: "false"
required: true
release_type:
description: "The type of release to be made (dev or production)"
default: "dev"
required: true
target_version:
description: "The version of the package to be released"
required: true

jobs:
fetch-versions:
Expand All @@ -21,12 +28,17 @@ jobs:
NEW_VERSION: ${{ steps.version-setup.outputs.NEW_VERSION }}
steps:
- uses: actions/checkout@v4
- name: Setup Dev Version
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch

- name: Setup Version
id: version-setup
run: |
python tools/release/setup_version.py ALL dev >> $GITHUB_OUTPUT
python tools/release/setup_version.py ALL ${{ github.event.inputs.release_type }} ${{ github.event.inputs.target_version }} ${{ steps.extract_branch.outputs.branch }} >> $GITHUB_OUTPUT
build-and-release-taipy-dev-packages:
build-and-release-taipy-packages:
needs: [fetch-versions]
timeout-minutes: 20
runs-on: ubuntu-latest
Expand Down Expand Up @@ -89,7 +101,7 @@ jobs:
${{needs.fetch-versions.outputs.gui_VERSION}} \
${{needs.fetch-versions.outputs.rest_VERSION}} \
${{needs.fetch-versions.outputs.templates_VERSION}} \
${{ github.event.inputs.publish_on_pypi }}
${{ github.event.inputs.internal_dep_on_pypi }}
- name: Copy tools
run: |
Expand All @@ -98,7 +110,40 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build wheel
pip install build wheel pipenv mypy black isort
- name: Install GUI dependencies
if: matrix.package == 'gui'
run: |
pipenv install --dev
- name: Generate GUI pyi file
if: matrix.package == 'gui'
run: |
cp tools/gui/generate_pyi.py pyi_temp.py && pipenv run python pyi_temp.py && rm pyi_temp.py
- name: Build frontends
if: matrix.package == 'gui'
run: |
python tools/frontend/bundle_build.py
- name: Copy files from tools
run: |
cp -r tools/packages/taipy-${{matrix.package}}/. ${{ steps.set-variables.outputs.package_dir }}
- name: Build Package Structure
working-directory: ${{ steps.set-variables.outputs.package_dir }}
run: |
python tools/release/build_package_structure.py ${{ matrix.package }}
- name: Copy Taipy Logger
if: matrix.package == 'config'
run: |
cp -r taipy/logger/. ${{ steps.set-variables.outputs.package_dir }}/taipy/logger
- name: Copy _cli folder
run: |
cp -r taipy/_cli/. ${{ steps.set-variables.outputs.package_dir }}/taipy/_cli
- name: Build package
working-directory: ${{ steps.set-variables.outputs.package_dir }}
Expand All @@ -108,24 +153,18 @@ jobs:
- name: Create tag and release
working-directory: ${{ steps.set-variables.outputs.package_dir }}
run: |
gh release create ${{ steps.set-variables.outputs.release_name }} ${{ steps.set-variables.outputs.tar_path }} --target ${{ steps.extract_hash.outputs.HASH }} --prerelease --title ${{ steps.set-variables.outputs.release_name }} --notes "Release Draft ${{ steps.set-variables.outputs.release_name }}"
if [ "${{ github.event.inputs.release_type }}" == "dev" ]; then
gh release create ${{ steps.set-variables.outputs.release_name }} ${{ steps.set-variables.outputs.tar_path }} --target ${{ steps.extract_hash.outputs.HASH }} --prerelease --title ${{ steps.set-variables.outputs.release_name }} --notes "Release Draft ${{ steps.set-variables.outputs.release_name }}"
else
gh release create ${{ steps.set-variables.outputs.release_name }} ${{ steps.set-variables.outputs.tar_path }} --target ${{ steps.extract_hash.outputs.HASH }} --title ${{ steps.set-variables.outputs.release_name }} --notes "Release ${{ steps.set-variables.outputs.release_name }}"
fi
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install Package
working-directory: ${{ steps.set-variables.outputs.package_dir }}
run: |
pip install ${{ steps.set-variables.outputs.tar_path }}
- name: Publish to PyPI
if: github.event.inputs.publish_on_pypi == 'true'
uses: pypa/gh-action-pypi-publish@release/v1

build-and-release-taipy-dev:
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
build-and-release-taipy:
runs-on: ubuntu-latest
needs: [ build-and-release-taipy-dev-packages, fetch-versions ]
needs: [build-and-release-taipy-packages, fetch-versions ]
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
Expand All @@ -151,33 +190,36 @@ jobs:
${{needs.fetch-versions.outputs.gui_VERSION}} \
${{needs.fetch-versions.outputs.rest_VERSION}} \
${{needs.fetch-versions.outputs.templates_VERSION}} \
${{ github.event.inputs.publish_on_pypi }}
${{ github.event.inputs.internal_dep_on_pypi }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build wheel
- name: Build Taipy package
run: python setup.py build_py && python -m build
- name: Create tag and release Taipy
- name: Backup setup.py
run: |
gh release create ${{ steps.set-variables.outputs.release_name }} ${{ steps.set-variables.outputs.tar_path }} --target ${{ steps.extract_hash.outputs.HASH }} --prerelease --title ${{ steps.set-variables.outputs.release_name }} --notes "Release Draft ${{ steps.set-variables.outputs.release_name }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
mv setup.py setup.old.py
- name: Install Taipy
- name: Copy files from tools
run: |
pip install ${{ steps.set-variables.outputs.tar_path }}
cp -r tools/packages/taipy/. .
- name: Check Taipy Installation
- name: Build Taipy package
run: |
python tools/validate_taipy_install.py
python setup.py build_py && python -m build
- name: Publish to PyPI
if: github.event.inputs.publish_on_pypi == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
- name: Create tag and release Taipy
run: |
if [ "${{ github.event.inputs.release_type }}" == "dev" ]; then
gh release create ${{ steps.set-variables.outputs.release_name }} ${{ steps.set-variables.outputs.tar_path }} --target ${{ steps.extract_hash.outputs.HASH }} --prerelease --title ${{ steps.set-variables.outputs.release_name }} --notes "Release Draft ${{ steps.set-variables.outputs.release_name }}"
else
gh release create ${{ steps.set-variables.outputs.release_name }} ${{ steps.set-variables.outputs.tar_path }} --target ${{ steps.extract_hash.outputs.HASH }} --title ${{ steps.set-variables.outputs.release_name }} --notes "Release ${{ steps.set-variables.outputs.release_name }}"
fi
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Download packages
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
publish-main-package-to-pypi:
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
needs: [ test-package ]
needs: [publish-subpackages-to-pypi, test-package ]
timeout-minutes: 20
environment: publish
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion taipy/config/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"major": 3, "minor": 1, "patch": 0, "ext": "dev2"}
{"major": 3, "minor": 2, "patch": 0, "ext": "dev0"}
2 changes: 2 additions & 0 deletions taipy/core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def get_requirements():
# get requirements from the different setups in tools/packages (removing taipy packages)
reqs = set()
for pkg in (root_folder / "tools" / "packages").iterdir():
if "taipy-core" not in str(pkg):
continue
requirements_file = pkg / "setup.requirements.txt"
if requirements_file.exists():
reqs.update(requirements_file.read_text("UTF-8").splitlines())
Expand Down
2 changes: 1 addition & 1 deletion taipy/core/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"major": 3, "minor": 1, "patch": 0, "ext": "dev2"}
{"major": 3, "minor": 2, "patch": 0, "ext": "dev0"}
2 changes: 2 additions & 0 deletions taipy/gui/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def get_requirements():
# get requirements from the different setups in tools/packages (removing taipy packages)
reqs = set()
for pkg in (root_folder / "tools" / "packages").iterdir():
if "taipy-gui" not in str(pkg):
continue
requirements_file = pkg / "setup.requirements.txt"
if requirements_file.exists():
reqs.update(requirements_file.read_text("UTF-8").splitlines())
Expand Down
2 changes: 1 addition & 1 deletion taipy/gui/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"major": 3, "minor": 1, "patch": 0, "ext": "dev2"}
{"major": 3, "minor": 2, "patch": 0, "ext": "dev0"}
2 changes: 2 additions & 0 deletions taipy/rest/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def get_requirements():
# get requirements from the different setups in tools/packages (removing taipy packages)
reqs = set()
for pkg in (root_folder / "tools" / "packages").iterdir():
if "taipy-rest" not in str(pkg):
continue
requirements_file = pkg / "setup.requirements.txt"
if requirements_file.exists():
reqs.update(requirements_file.read_text("UTF-8").splitlines())
Expand Down
2 changes: 1 addition & 1 deletion taipy/rest/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"major": 3, "minor": 1, "patch": 0, "ext": "dev2"}
{"major": 3, "minor": 2, "patch": 0, "ext": "dev0"}
Loading

0 comments on commit 60830e9

Please sign in to comment.