Skip to content

Commit

Permalink
Merge branch 'develop' into feature/#1248-cover-json-data-node-contro…
Browse files Browse the repository at this point in the history
…l-new
  • Loading branch information
FredLL-Avaiga authored Oct 28, 2024
2 parents 2bcd1cf + f9b207f commit 12fb4e6
Show file tree
Hide file tree
Showing 154 changed files with 11,521 additions and 4,065 deletions.
13 changes: 8 additions & 5 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 Down Expand Up @@ -121,9 +121,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
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
24 changes: 11 additions & 13 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Contributor Covenant Code of Conduct

## Our Pledge
# Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
Expand All @@ -12,7 +10,7 @@ and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards
# Our Standards

Examples of behavior that contributes to a positive environment for our
community include:
Expand All @@ -36,7 +34,7 @@ Examples of unacceptable behavior include:
* Other conduct which could reasonably be considered inappropriate in a
professional setting.

## Enforcement Responsibilities
# Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
Expand All @@ -48,15 +46,15 @@ comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope
# Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement
# Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
Expand All @@ -66,12 +64,12 @@ All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines
# Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction
## 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
Expand All @@ -80,7 +78,7 @@ unprofessional or unwelcome in the community.
clarity about the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning
## 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.
Expand All @@ -92,7 +90,7 @@ includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban
## 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
Expand All @@ -103,7 +101,7 @@ private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban
## 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
Expand All @@ -112,7 +110,7 @@ individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban on any sort of public interaction within
the community.

## Attribution
# Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
Expand Down
Loading

0 comments on commit 12fb4e6

Please sign in to comment.