ソースを参照

attempt to fix failed actions

Toan Quach 1 年間 前
コミット
c4c6c08933

+ 4 - 5
.github/sync.yml

@@ -4,8 +4,8 @@ group:
     Avaiga/taipy-core
     Avaiga/taipy-gui
     Avaiga/taipy-rest
-    
-  files: 
+
+  files:
     - .flake8
     - .gitattributes
     - .license-header
@@ -14,7 +14,6 @@ group:
     - LICENSE
     - mypy.ini
     - pyproject.toml
-    - src/taipy/__init__.py
+    - taipy/__init__.py
     # - .isort.cfg
-    # - src/__init__.py
-    
+    # - __init__.py

+ 1 - 1
.github/workflows/linter.yml

@@ -23,5 +23,5 @@ jobs:
           use-mypy: false
           extra-black-options: "--line-length=120"
           extra-pycodestyle-options: "--max-line-length=120  --exclude=tests/gui --ignore=E121,E123,E126,E226,E24,E704,W503,W504,E203"
-          extra-mypy-options: "--ignore-missing-imports --implicit-optional --no-namespace-packages --exclude (src/taipy/templates/|generate_pyi.py) --follow-imports skip"
+          extra-mypy-options: "--ignore-missing-imports --implicit-optional --no-namespace-packages --exclude (taipy/templates/|generate_pyi.py) --follow-imports skip"
           extra-isort-options: "--line-length=120 --force-grid-wrap=10 --multi-line=VERTICAL_HANGING_INDENT --trailing-comma"

+ 3 - 3
MANIFEST.in

@@ -1,3 +1,3 @@
-include src/taipy/*.json
-include src/taipy/gui_core/*.json
-include src/taipy/gui_core/lib/*.js
+include taipy/*.json
+include taipy/gui_core/*.json
+include taipy/gui_core/lib/*.js

+ 3 - 3
frontend/taipy-gui/webpack.config.js

@@ -28,7 +28,7 @@ const taipyBundle = "taipy-gui"
 const reactBundleName = "TaipyGuiDependencies"
 const taipyBundleName = "TaipyGui"
 
-const basePath = "../../src/taipy/gui/webapp";
+const basePath = "../../taipy/gui/webapp";
 const webAppPath = resolveApp(basePath);
 const reactManifestPath = resolveApp(basePath + "/" + reactBundle + "-manifest.json");
 const reactDllPath = resolveApp(basePath + "/" + reactBundle + ".dll.js")
@@ -63,7 +63,7 @@ module.exports = (env, options) => {
         {
             mode: options.mode, //'development', //'production',
             name: taipyBundleName,
-            entry: ["./src/extensions/exports.ts"],
+            entry: ["./extensions/exports.ts"],
             output: {
                 filename: taipyBundle + ".js",
                 path: webAppPath,
@@ -111,7 +111,7 @@ module.exports = (env, options) => {
         {
             mode: options.mode, //'development', //'production',
             context: resolveApp("dom"),
-            entry: ["./src/index.tsx"],
+            entry: ["./index.tsx"],
             output: {
                 filename: "taipy-gui-dom.js",
                 path: webAppPath,

+ 1 - 1
setup.py

@@ -53,7 +53,7 @@ extras_require = {
 
 
 def _build_webapp():
-    already_exists = Path("./src/taipy/gui_core/lib/taipy-gui-core.js").exists()
+    already_exists = Path("./taipy/gui_core/lib/taipy-gui-core.js").exists()
     if not already_exists:
         # default site-packages path is from the current python interpreter
         site_packages_path = sysconfig.get_path("purelib")

+ 2 - 2
taipy/config/MANIFEST.in

@@ -1,2 +1,2 @@
-include src/taipy/config/*.pyi
-include src/taipy/config/*.json
+include taipy/config/*.pyi
+include taipy/config/*.json

+ 9 - 9
taipy/config/stubs/generate_pyi.py

@@ -140,15 +140,15 @@ def _build_header(filename):
 
 if __name__ == "__main__":
     header_file = "stubs/pyi_header.py"
-    config_init = Path("taipy-core/src/taipy/core/config/__init__.py")
-    base_config = "src/taipy/config/config.py"
+    config_init = Path("taipy-core/taipy/core/config/__init__.py")
+    base_config = "taipy/config/config.py"
 
-    dn_filename = "taipy-core/src/taipy/core/config/data_node_config.py"
-    job_filename = "taipy-core/src/taipy/core/config/job_config.py"
-    scenario_filename = "taipy-core/src/taipy/core/config/scenario_config.py"
-    task_filename = "taipy-core/src/taipy/core/config/task_config.py"
-    migration_filename = "taipy-core/src/taipy/core/config/migration_config.py"
-    core_filename = "taipy-core/src/taipy/core/config/core_section.py"
+    dn_filename = "taipy-core/taipy/core/config/data_node_config.py"
+    job_filename = "taipy-core/taipy/core/config/job_config.py"
+    scenario_filename = "taipy-core/taipy/core/config/scenario_config.py"
+    task_filename = "taipy-core/taipy/core/config/task_config.py"
+    migration_filename = "taipy-core/taipy/core/config/migration_config.py"
+    core_filename = "taipy-core/taipy/core/config/core_section.py"
 
     entities_map, property_map = _generate_entity_and_property_maps(config_init)
     pyi = _build_header(header_file)
@@ -161,5 +161,5 @@ if __name__ == "__main__":
     pyi = _build_entity_config_pyi(pyi, migration_filename, entities_map["MigrationConfig"])
     pyi = _build_entity_config_pyi(pyi, core_filename, entities_map["CoreSection"])
 
-    with open("src/taipy/config/config.pyi", "w") as f:
+    with open("taipy/config/config.pyi", "w") as f:
         f.writelines(pyi)

+ 2 - 2
taipy/core/MANIFEST.in

@@ -1,2 +1,2 @@
-include src/taipy/core/*.json
-include src/taipy/core/config/*.json
+include taipy/core/*.json
+include taipy/core/config/*.json

+ 0 - 1
taipy/gui/.gitignore

@@ -47,7 +47,6 @@ coverage.xml
 *.cover
 .hypothesis/
 .pytest_cache/
-tests/taipy/pipeline/.*
 
 # Translations
 *.mo

+ 4 - 4
taipy/gui/MANIFEST.in

@@ -1,4 +1,4 @@
-recursive-include src/taipy/gui/webapp *
-include src/taipy/gui/version.json
-include src/taipy/gui/viselements.json
-include src/taipy/gui/*.pyi
+recursive-include taipy/gui/webapp *
+include taipy/gui/version.json
+include taipy/gui/viselements.json
+include taipy/gui/*.pyi

+ 1 - 1
taipy/gui/setup.py

@@ -60,7 +60,7 @@ extras_require = {
 
 
 def _build_webapp():
-    already_exists = Path("./src/taipy/gui/webapp/index.html").exists()
+    already_exists = Path("./taipy/gui/webapp/index.html").exists()
     if not already_exists:
         os.system("cd ../../../frontend/taipy-gui/dom && npm ci")
         os.system("cd ../../../frontend/taipy-gui && npm ci --omit=optional && npm run build")

+ 1 - 1
taipy/rest/.gitignore

@@ -138,4 +138,4 @@ Dockerfile.dev
 .databkp/
 
 *.db
-src/taipy/rest/setup/*
+taipy/rest/setup/*

+ 1 - 1
taipy/templates/MANIFEST.in

@@ -1 +1 @@
-recursive-include src/taipy/templates *
+recursive-include taipy/templates *

+ 8 - 8
taipy/templates/tests/test_default_template.py

@@ -20,7 +20,7 @@ from .utils import _run_template
 
 def test_default_answer(tmpdir):
     cookiecutter(
-        template="src/taipy/templates/default",
+        template="taipy/templates/default",
         output_dir=str(tmpdir),
         no_input=True,
     )
@@ -44,7 +44,7 @@ def test_default_answer(tmpdir):
 
 def test_main_file_with_and_without_extension(tmpdir):
     cookiecutter(
-        template="src/taipy/templates/default",
+        template="taipy/templates/default",
         output_dir=str(tmpdir),
         no_input=True,
         extra_context={
@@ -56,7 +56,7 @@ def test_main_file_with_and_without_extension(tmpdir):
     )
 
     cookiecutter(
-        template="src/taipy/templates/default",
+        template="taipy/templates/default",
         output_dir=str(tmpdir),
         no_input=True,
         extra_context={
@@ -69,7 +69,7 @@ def test_main_file_with_and_without_extension(tmpdir):
 
 def test_with_core_service(tmpdir):
     cookiecutter(
-        template="src/taipy/templates/default",
+        template="taipy/templates/default",
         output_dir=str(tmpdir),
         no_input=True,
         extra_context={
@@ -97,7 +97,7 @@ def test_with_core_service(tmpdir):
 
 def test_with_rest_service(tmpdir):
     cookiecutter(
-        template="src/taipy/templates/default",
+        template="taipy/templates/default",
         output_dir=str(tmpdir),
         no_input=True,
         extra_context={
@@ -124,7 +124,7 @@ def test_with_rest_service(tmpdir):
 
 def test_with_both_core_rest_services(tmpdir):
     cookiecutter(
-        template="src/taipy/templates/default",
+        template="taipy/templates/default",
         output_dir=str(tmpdir),
         no_input=True,
         extra_context={
@@ -153,7 +153,7 @@ def test_with_both_core_rest_services(tmpdir):
 
 def test_multipage_gui_template(tmpdir):
     cookiecutter(
-        template="src/taipy/templates/default",
+        template="taipy/templates/default",
         output_dir=str(tmpdir),
         no_input=True,
         extra_context={
@@ -180,7 +180,7 @@ def test_multipage_gui_template(tmpdir):
 def test_multipage_gui_template_with_invalid_page_name(tmpdir, capfd):
     with pytest.raises(FailedHookException):
         cookiecutter(
-            template="src/taipy/templates/default",
+            template="taipy/templates/default",
             output_dir=str(tmpdir),
             no_input=True,
             extra_context={

+ 2 - 2
taipy/templates/tests/test_scenario_mgt_template.py

@@ -18,7 +18,7 @@ from .utils import _run_template
 
 def test_scenario_management_with_toml_config(tmpdir):
     cookiecutter(
-        template="src/taipy/templates/scenario-management",
+        template="taipy/templates/scenario-management",
         output_dir=tmpdir,
         no_input=True,
         extra_context={
@@ -57,7 +57,7 @@ def test_scenario_management_with_toml_config(tmpdir):
 
 def test_scenario_management_without_toml_config(tmpdir):
     cookiecutter(
-        template="src/taipy/templates/scenario-management",
+        template="taipy/templates/scenario-management",
         output_dir=tmpdir,
         no_input=True,
         extra_context={

+ 1 - 1
tests/gui/notebook/test_notebook_simple_gui.py

@@ -18,7 +18,7 @@ from testbook import testbook
 
 
 @pytest.mark.filterwarnings("ignore::RuntimeWarning")
-@testbook("tests/taipy/gui/notebook/simple_gui.ipynb")
+@testbook("tests/gui/notebook/simple_gui.ipynb")
 def test_notebook_simple_gui(tb, helpers):
     tb.execute_cell("import")
     tb.execute_cell("page_declaration")

+ 3 - 3
tools/gui/generate_pyi.py

@@ -21,7 +21,7 @@ from taipy.gui.config import Config
 # ############################################################
 # Generate gui pyi file (gui/gui.pyi)
 # ############################################################
-gui_py_file = "./src/taipy/gui/gui.py"
+gui_py_file = "./taipy/gui/gui.py"
 gui_pyi_file = gui_py_file + "i"
 
 os.system(f"pipenv run stubgen {gui_py_file} --no-import --parse-only --export-less -o ./")
@@ -49,9 +49,9 @@ with open(gui_pyi_file, "w") as write_file:
 # ############################################################
 # Generate Page Builder pyi file (gui/builder/__init__.pyi)
 # ############################################################
-builder_py_file = "./src/taipy/gui/builder/__init__.py"
+builder_py_file = "./taipy/gui/builder/__init__.py"
 builder_pyi_file = builder_py_file + "i"
-with open("./src/taipy/gui/viselements.json", "r") as file:
+with open("./taipy/gui/viselements.json", "r") as file:
     viselements = json.load(file)
 with open("./tools/builder/block.txt", "r") as file:
     block_template = file.read()