Skip to content

Commit

Permalink
chore: add frontend build step
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoandre-avaiga committed Mar 1, 2024
1 parent 84d1d4a commit 7747395
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build-and-release-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,15 @@ jobs:
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: Build Package Structure
working-directory: ${{ steps.set-variables.outputs.package_dir }}
run: |
python tools/release/build_package_structure.py ${{ matrix.package }}
ls -lah
- name: Build package
working-directory: ${{ steps.set-variables.outputs.package_dir }}
Expand All @@ -138,8 +142,6 @@ jobs:
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
runs-on: ubuntu-latest
needs: [ build-and-release-taipy-dev-packages, fetch-versions ]
timeout-minutes: 20
Expand Down
2 changes: 1 addition & 1 deletion taipy/gui/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
recursive-include tools *

# Package taipy-gui
recursive-include webapp *
recursive-include taipy-gui/webapp *
include version.json
include viselements.json
include *.pyi
6 changes: 3 additions & 3 deletions tools/gui/generate_pyi.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
with open(gui_pyi_file, "r") as file:
for line in file:
if "def run(" in line:
line = line.replace(
", run_server: bool = ..., run_in_thread: bool = ..., async_mode: str = ..., **kwargs", gui_config
)
replace_str = line[line.index(", run_server") : (line.index("**kwargs") + len("**kwargs"))]
# ", run_server: bool = ..., run_in_thread: bool = ..., async_mode: str = ..., **kwargs"
line = line.replace(replace_str, gui_config)
replaced_content = replaced_content + line

with open(gui_pyi_file, "w") as write_file:
Expand Down
5 changes: 0 additions & 5 deletions tools/release/build_package_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,3 @@
if file_name.lower().endswith((".md", ".json")) or file_name in __SKIP:
continue
shutil.move(file_name, _package_path)

for file_name in os.listdir("../"):
if os.path.isdir(file_name):
continue
shutil.move(file_name, ".")

0 comments on commit 7747395

Please sign in to comment.