forked from Avaiga/taipy-config
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,120 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[run] | ||
# uncomment the following to omit files during running | ||
#omit = | ||
[report] | ||
exclude_lines = | ||
pragma: no cover | ||
def __repr__ | ||
if self.debug: | ||
if settings.DEBUG | ||
raise AssertionError | ||
raise NotImplementedError | ||
if 0: | ||
if __name__ == .__main__.: | ||
def main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
max_line_length = 120 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
charset = utf-8 | ||
end_of_line = lf | ||
|
||
[*.bat] | ||
indent_style = tab | ||
end_of_line = crlf | ||
|
||
[LICENSE] | ||
insert_final_newline = false | ||
|
||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[flake8] | ||
# required by black, https://github.com/psf/black/blob/master/.flake8 | ||
max-line-length = 120 | ||
max-complexity = 18 | ||
ignore = E203, E266, E501, E722, W503, F403, F401 | ||
select = B,C,E,F,W,T4,B9 | ||
docstring-convention = google | ||
per-file-ignores = | ||
__init__.py:F401 | ||
exclude = | ||
.git, | ||
__pycache__, | ||
setup.py, | ||
build, | ||
dist, | ||
releases, | ||
.venv, | ||
.tox, | ||
.mypy_cache, | ||
.pytest_cache, | ||
.vscode, | ||
.github, | ||
tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Set the default behavior, in case people don't have core.autocrlf set. | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
* Taipy version: | ||
* Python version: | ||
* Operating System: | ||
|
||
### Description | ||
|
||
Describe what you were trying to get done. | ||
Tell us what happened, what went wrong, and what you expected to happen. | ||
|
||
### What I Did | ||
|
||
``` | ||
Paste the command(s) you ran and the output. | ||
If there was a crash, please include the traceback here. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
name: Bug report | ||
about: Bug reports help improve the product quality. | ||
title: BUG- | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Description** | ||
A complete and clear description of the problem. | ||
|
||
**How to reproduce** | ||
|
||
- Configuration files or code: | ||
``` | ||
from taipy import Config; | ||
Config.configure_data_node(...) | ||
... | ||
``` | ||
- A code fragment | ||
``` | ||
import taipy as tp; | ||
tp.create_scenario(...) | ||
... | ||
``` | ||
**Expected behavior** | ||
Description of what would be the expected outcome. | ||
**Screenshots** | ||
When available and relevant, screenshots better help show the problem. | ||
**Runtime environment** | ||
Please specify relevant indications. | ||
- Taipy version: | ||
- OS: [e.g. Linux, Windows] and version | ||
and any other relevant information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
name: Feature improvement | ||
about: Feature improvements add extra functionality to an existing feature. | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Description** | ||
What this improvement addresses (performance, API...). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
name: New feature | ||
about: Suggest a new feature for the product | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**What would that feature address** | ||
Description of the lacking functionality that this issue would address. | ||
Ex: It is not possible to do this or that... | ||
|
||
***Description of the ideal solution*** | ||
What would be the best way to provide that functionality | ||
|
||
***Caveats*** | ||
What impact could that feature have on the rest of the product, and should be taken special care of? | ||
|
||
***Other options*** | ||
What else could we do (workaround, third-party...)? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ develop, release/* ] | ||
pull_request: | ||
branches: [ develop ] | ||
schedule: | ||
- cron: '22 15 * * 2' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'python' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Coverage | ||
|
||
on: | ||
pull_request: | ||
branches: [ develop ] | ||
|
||
jobs: | ||
backend-coverage: | ||
timeout-minutes: 20 | ||
strategy: | ||
matrix: | ||
python-versions: [3.9] | ||
os: [ubuntu-18.04] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-versions }} | ||
|
||
- name: Pyodbc | ||
env: | ||
TOX_PARALLEL_NO_SPINNER: 1 | ||
run: | | ||
pip install tox | ||
tox -e coverage | ||
- name: Code coverage | ||
uses: orgoro/coverage@v2 | ||
with: | ||
coverageFile: coverage.xml | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
thresholdAll: 0.85 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: Publish on Pypi | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "The Pypi package version to create (ex: 1.0.0)" | ||
required: true | ||
|
||
jobs: | ||
test-package: | ||
timeout-minutes: 20 | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Extract branch name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
id: extract_branch | ||
|
||
- name: Ensure package version is properly set | ||
run: | | ||
echo 'version="${{ github.event.inputs.version }}"' | grep -f - setup.py | ||
- name: Validate branch name | ||
run: | | ||
echo """ | ||
import re, sys | ||
setup = open('setup.py').read() | ||
x = re.search(r'version=\"(\d+)\.(\d+)\.(\d+)(?:\.([a-zA-Z0-9_]+))?\"', setup) | ||
if not x: | ||
raise ValueError('Invalid version expression') | ||
if f'release/{x.group(1)}.{x.group(2)}' != sys.argv[1]: | ||
raise ValueError('Branch name mismatch') | ||
""" > /tmp/check.py | ||
python /tmp/check.py "${{ steps.extract_branch.outputs.branch }}" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build and test the package | ||
run: | | ||
python setup.py build_py && python -m build | ||
rm -rf src taipy | ||
pip install dist/*.tar.gz | ||
pip install pytest pytest-mock | ||
pytest | ||
publish-to-pypi: | ||
needs: [test-package] | ||
timeout-minutes: 20 | ||
environment: publish | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: python setup.py build_py && python -m build | ||
|
||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
|
||
test-published-package: | ||
needs: [publish-to-pypi] | ||
timeout-minutes: 30 | ||
strategy: | ||
matrix: | ||
python-versions: ['3.8','3.9','3.10'] | ||
os: [ubuntu-18.04,windows-latest,macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-versions }} | ||
|
||
- name: Prepare tests on unix | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
rm -rf taipy | ||
pip install --upgrade pip | ||
pip install pytest pytest-mock | ||
- name: Prepare tests on windows | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
rmdir -Recurse -Force taipy | ||
pip install --upgrade pip | ||
pip install pytest pytest-mock | ||
- name: Install and test package | ||
run: | | ||
pip install --no-cache-dir ${{ github.event.repository.name }}==${{ github.event.inputs.version }} | ||
pytest |
Oops, something went wrong.