Skip to content

Commit

Permalink
Merge branch 'develop' into snyk-upgrade-828da993b0f1a6f8460cb96258e8…
Browse files Browse the repository at this point in the history
…db8d
  • Loading branch information
jrobinAV authored Nov 11, 2024
2 parents 41b70c1 + c8c38c6 commit a0a9b2c
Show file tree
Hide file tree
Showing 217 changed files with 10,212 additions and 5,166 deletions.
18 changes: 10 additions & 8 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ body:
- type: markdown
attributes:
value: |
- Thank you for using Taipy and taking the time to report a bug! 😄
- Thank you for using Taipy and taking the time to report a bug! 😄
- Please try to spend some time to understand the bug and reproduce it.
- Take a look at our template and try to add as much detail as possible.
- The more details we have, the easier it would be to fix it.
- The more details we have, the easier it would be to fix it.
- If any heading is not applicable, please set it to `NA`.
- type: textarea
Expand All @@ -33,7 +33,7 @@ body:
attributes:
label: "Steps to Reproduce Issue"
description: If possible, please share the steps to reproduce the issue.
value: |
placeholder: |
1. A code fragment
2. And/or configuration files or code
3. And/or Taipy GUI Markdown or HTML files
Expand All @@ -50,8 +50,7 @@ body:
attributes:
label: "Screenshots"
description: If applicable, add screenshots to help explain your problem.
value: |
![DESCRIPTION](LINK.png)
placeholder: ![DESCRIPTION](LINK.png)
validations:
required: false

Expand Down Expand Up @@ -121,9 +120,12 @@ body:
attributes:
label: "Acceptance Criteria"
description: Do not edit the text area below.
value: |
- [ ] Ensure new code is unit tested, and check code coverage is at least 90%.
- [ ] Create related issue in taipy-doc for documentation and Release Notes.
value: |
- [ ] A unit test reproducing the bug is added.
- [ ] Any new code is covered by a unit tested.
- [ ] Check code coverage is at least 90%.
- [ ] The bug reporter validated the fix.
- [ ] Related issue(s) in taipy-doc are created for documentation and Release Notes are updated.
- type: checkboxes
id: terms_checklist_bug
Expand Down
16 changes: 14 additions & 2 deletions .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ body:
- type: markdown
attributes:
value: |
- Thank you for using Taipy and taking the time to suggest improvements in documentation! 😄
- Thank you for using Taipy and taking the time to suggest improvements in documentation! 😄
- Take a look at our template and try to add as much detail as possible.
- If any heading is not applicable, please set it to `NA`.
- type: textarea
id: docs_description
attributes:
Expand Down Expand Up @@ -41,6 +41,18 @@ body:
- label: "I am willing to work on this issue (optional)"
required: false

- type: textarea
id: acceptance_criteria
attributes:
label: "Acceptance Criteria"
description: Do not edit the text area below.
value: |
- [ ] The documentation set as been generated without error.
- [ ] The new text has been passed to a grammatical tool for review.
- [ ] The 100 character length limit has been respected as much as possible.
- [ ] The links and cross-references in the documentation are working.
- [ ] If applicable, screenshots of the new documentation are added to the pull request.
- type: markdown
attributes:
value: Thank you for taking the time to report the issue! 😄
15 changes: 8 additions & 7 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ body:
- type: markdown
attributes:
value: |
- Thank you for using Taipy and taking the time to suggest a new feature! 😄
- Take a look at our template and try to add as much detail as possible.
- Thank you for using Taipy and taking the time to suggest a new feature! 😄
- Take a look at our template and try to add as much detail as possible.
- If any heading is not applicable, please set it to `NA`.
- type: textarea
Expand Down Expand Up @@ -46,11 +46,12 @@ body:
attributes:
label: "Acceptance Criteria"
description: Do not edit the text area below.
value: |
- [ ] Ensure new code is unit tested, and check code coverage is at least 90%.
- [ ] Create related issue in taipy-doc for documentation and Release Notes.
- [ ] Check if a new demo could be provided based on this, or if legacy demos could be benefit from it.
- [ ] Ensure any change is well documented.
value: |
- [ ] If applicable, a new demo code is provided to show the new feature in action.
- [ ] Integration tests exhibiting how the functionality works are added.
- [ ] Any new code is covered by a unit tested.
- [ ] Check code coverage is at least 90%.
- [ ] Related issue(s) in taipy-doc are created for documentation and Release Notes are updated.
- type: checkboxes
id: terms_checklist_feature
Expand Down
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/refactor-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ body:
description: "Describe what improvements can be made(performance, API...) in the codebase without introducing breaking changes."
validations:
required: true

- type: textarea
id: acceptance_criteria
attributes:
label: "Acceptance Criteria"
description: Do not edit the text area below.
value: |
- [ ] Ensure new code is unit tested, and check code coverage is at least 90%.
- [ ] Propagate any change on the demos and run all of them to ensure there is no breaking change.
- [ ] Ensure any change is well documented.
- [ ] Any new code is covered by a unit tested.
- [ ] Check code coverage is at least 90%.
- type: checkboxes
id: terms_checklist_refactor
Expand Down
40 changes: 40 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## What type of PR is this? (check all applicable)

- [ ] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update

## Description

## Related Tickets & Documents

<!--
For pull requests that relate or close an issue, please include them
below. We like to follow [Github's guidance on linking issues to pull requests](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue).
For example having the text: "closes #1234" would connect the current pull
request to issue 1234. And when we merge the pull request, Github will
automatically close the issue.
-->

- Related Issue #
- Closes #

## How to reproduce the issue

_Please replace this line with instructions on how to reproduce the issue or test the feature._

## Other branches or releases that this needs to be backported
_Describe which projects this change will impact and that needs to be backported._

## Checklist
_We encourage you to keep the code coverage percentage at 80% and above._

- [ ] Does this solution meet the acceptance criteria of the related issue?
- [ ] Is the related issue checklist completed?
- [ ] Does this PR adds unit tests for the developed code? If not, why?
- [ ] End-to-End tests have been added or updated?
- [ ] Was the documentation updated, or a dedicated issue for documentation created? (If applicable)
- [ ] Is the release notes updated? (If applicable)
18 changes: 17 additions & 1 deletion .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ env:

permissions:
contents: write
pull-requests: write

jobs:
fetch-versions:
Expand Down Expand Up @@ -238,11 +239,26 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Bump Version
if: github.event.inputs.release_type == 'dev'
id: bump-version
run: |
python tools/release/bump_version.py
- uses: stefanzweifel/git-auto-commit-action@v5
if: github.event.inputs.release_type == 'dev'
with:
file_pattern: '*/version.json'
branch: "feature/update-dev-version-${{ github.run_id }}"
create_branch: 'true'
file_pattern: '**/version.json'
commit_message: Update version to ${{ needs.fetch-versions.outputs.NEW_VERSION }}

- name: create pull request
if: github.event.inputs.release_type == 'dev'
run: gh pr create -B develop -H "feature/update-dev-version-${{ github.run_id }}" --title 'Update Dev Version' --body 'Created by Github action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Reset changes
run: |
git reset --hard HEAD
Expand Down
97 changes: 92 additions & 5 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: npm build and test with node ${{ matrix.node-version }} on ${{ matrix.os }}
- name: npm test with node ${{ matrix.node-version }} on ${{ matrix.os }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
Expand Down Expand Up @@ -65,14 +65,13 @@ jobs:
- name: Install dependencies
if: steps.cache-gui-fe-build.outputs.cache-hit != 'true'
run: npm ci
- if: steps.cache-gui-fe-build.outputs.cache-hit != 'true'
run: npm run build --if-present

- if: steps.cache-gui-fe-build.outputs.cache-hit != 'true'
- name: Test Gui
if: steps.cache-gui-fe-build.outputs.cache-hit != 'true'
run: npm test

- name: Code coverage
if: matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' && steps.cache-gui-fe-build.outputs.cache-hit != 'true'
if: matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' && steps.cache-gui-fe-build.outputs.cache-hit != 'true' && github.event.pull_request.base.repo.full_name == github.event.pull_request.head.repo.full_name
uses: artiomtr/jest-coverage-report-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -82,3 +81,91 @@ jobs:
annotations: failed-tests
# use if you want to avoid errors on the base branch coverage (ie no coverage and no comparison but as it fails anyway as it uses npm install)
# base-coverage-file: ./report.json

frontend-core-jest:
timeout-minutes: 20
strategy:
matrix:
node-version: [20.x]
os: [ubuntu-latest, windows-latest, macos-13]
runs-on: ${{ matrix.os }}

defaults:
run:
working-directory: ./frontend/taipy

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: npm build and test with node ${{ matrix.node-version }} on ${{ matrix.os }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: "**/package-lock.json"

- name: Hash taipy gui source code
id: hash-gui-fe
working-directory: ./
run: |
python tools/frontend/hash_source.py --taipy-gui-only
echo "HASH=$(cat hash.txt)" >> $GITHUB_OUTPUT
rm hash.txt
shell: bash
- name: Restore cached frontend build
id: cache-gui-fe-build
uses: actions/cache@v4
with:
path: taipy/gui/webapp
key: taipy-gui-frontend-build-${{ runner.os }}-${{ steps.hash-gui-fe.outputs.HASH }}

- name: Hash taipy gui core source code
id: hash-gui-core-fe
working-directory: ./
run: |
python tools/frontend/hash_source.py --taipy-gui-core-only
echo "HASH=$(cat hash.txt)" >> $GITHUB_OUTPUT
rm hash.txt
shell: bash

- name: Restore cached core frontend build
id: cache-gui-core-fe-build
uses: actions/cache@v4
with:
path: taipy/gui_core/lib
key: taipy-gui-core-frontend-build-${{ runner.os }}-${{ steps.hash-gui-core-fe.outputs.HASH }}

- name: Taipy-gui Install dom dependencies
if: steps.cache-gui-fe-build.outputs.cache-hit != 'true'
working-directory: ./frontend/taipy-gui/dom
run: npm ci
- name: Install Taipy-gui dependencies
if: steps.cache-gui-fe-build.outputs.cache-hit != 'true'
working-directory: ./frontend/taipy-gui
run: npm ci
- name: Build Taipy-gui
if: steps.cache-gui-fe-build.outputs.cache-hit != 'true'
working-directory: ./frontend/taipy-gui
run: npm run build

- name: Install dependencies
if: steps.cache-gui-core-fe-build.outputs.cache-hit != 'true'
run: npm ci

- name: Test Taipy
if: steps.cache-gui-core-fe-build.outputs.cache-hit != 'true'
run: npm test

- name: Code coverage
if: matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' && steps.cache-gui-core-fe-build.outputs.cache-hit != 'true' && github.event.pull_request.base.repo.full_name == github.event.pull_request.head.repo.full_name
uses: artiomtr/jest-coverage-report-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
threshold: "80"
working-directory: "./frontend/taipy"
skip-step: install
annotations: failed-tests
# use if you want to avoid errors on the base branch coverage (ie no coverage and no comparison but as it fails anyway as it uses npm install)
# base-coverage-file: ./report.json
2 changes: 1 addition & 1 deletion .github/workflows/overall-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
coverage:
timeout-minutes: 50
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
if: github.event_name == 'pull_request' && github.event.pull_request.base.repo.full_name == github.event.pull_request.head.repo.full_name
steps:
- uses: actions/checkout@v4

Expand Down
Loading

0 comments on commit a0a9b2c

Please sign in to comment.