Procházet zdrojové kódy

hopefully fix PytestUnknownMarkWarning
remove src ref

Fred Lefévère-Laoide před 1 rokem
rodič
revize
f72870948e

+ 3 - 3
.github/workflows/publish.yml

@@ -25,7 +25,7 @@ jobs:
         run: |
           echo """
           import json, sys, os
-          with open(f\"src{os.sep}taipy{os.sep}version.json\") as version_file:
+          with open(f\"taipy{os.sep}version.json\") as version_file:
             version_o = json.load(version_file)
           version = f'{version_o.get(\"major\")}.{version_o.get(\"minor\")}.{version_o.get(\"patch\")}'
           if vext := version_o.get(\"ext\"):
@@ -87,12 +87,12 @@ jobs:
       - name: Prepare tests on unix
         if: matrix.os != 'windows-latest'
         run: |
-          rm -rf src
+          rm -rf taipy
 
       - name: Prepare tests on windows
         if: matrix.os == 'windows-latest'
         run: |
-          rmdir -Recurse -Force src
+          rmdir -Recurse -Force taipy
 
       - name: Install and test package
         run: |

+ 6 - 6
.github/workflows/release-dev.yml

@@ -31,7 +31,7 @@ jobs:
           echo """
           import json, sys, os
           SUFFIX = 'dev'
-          with open(f\"src{os.sep}taipy{os.sep}version.json\") as version_file:
+          with open(f\"taipy{os.sep}version.json\") as version_file:
               version_o = json.load(version_file)
           version = f'{version_o.get(\"major\")}.{version_o.get(\"minor\")}.{version_o.get(\"patch\")}'
           if vext := version_o.get(\"ext\"):
@@ -46,7 +46,7 @@ jobs:
         run: |
           echo """
           import json, os
-          with open(f\"src{os.sep}taipy{os.sep}version.json\") as version_file:
+          with open(f\"taipy{os.sep}version.json\") as version_file:
               version_o = json.load(version_file)
           version = f'{version_o.get(\"major\")}.{version_o.get(\"minor\")}.{version_o.get(\"patch\")}'
           if vext := version_o.get(\"ext\"):
@@ -149,17 +149,17 @@ jobs:
         run: |
           echo """
           import json, os
-          with open(f'src{os.sep}taipy{os.sep}version.json') as version_file:
+          with open(f'taipy{os.sep}version.json') as version_file:
               version_o = json.load(version_file)
               if version_o is None or 'dev' not in version_o['ext']:
                   raise ValueError('Invalid version file. Version must contain dev suffix.')
               prev_version = version_o['ext']
               new_version = 'dev' + str(int(version_o['ext'].replace('dev', '')) + 1)
-              with open(f'src{os.sep}taipy{os.sep}version.json') as r:
+              with open(f'taipy{os.sep}version.json') as r:
                   text = r.read().replace(prev_version, new_version)
-              with open(f'src{os.sep}taipy{os.sep}version.json', mode='w') as w:
+              with open(f'taipy{os.sep}version.json', mode='w') as w:
                   w.write(text)
-              with open(f\"src{os.sep}taipy{os.sep}version.json\") as version_file:
+              with open(f\"taipy{os.sep}version.json\") as version_file:
                   version_o = json.load(version_file)
               version = f'{version_o.get(\"major\")}.{version_o.get(\"minor\")}.{version_o.get(\"patch\")}'
               if vext := version_o.get(\"ext\"):

+ 2 - 2
.github/workflows/release.yml

@@ -26,7 +26,7 @@ jobs:
         run: |
           echo """
           import json, sys, os
-          with open(f\"src{os.sep}taipy{os.sep}version.json\") as version_file:
+          with open(f\"taipy{os.sep}version.json\") as version_file:
               version_o = json.load(version_file)
           version = f'{version_o.get(\"major\")}.{version_o.get(\"minor\")}.{version_o.get(\"patch\")}'
           if vext := version_o.get(\"ext\"):
@@ -40,7 +40,7 @@ jobs:
         run: |
           echo """
           import json, sys, os
-          with open(f\"src{os.sep}taipy{os.sep}version.json\") as version_file:
+          with open(f\"taipy{os.sep}version.json\") as version_file:
               version = json.load(version_file)
           if f'release/{version.get(\"major\")}.{version.get(\"minor\")}' != sys.argv[1]:
               raise ValueError(f'Branch name mismatch: release/{version.get(\"major\")}.{version.get(\"minor\")} != {sys.argv[1]}')

+ 1 - 0
Pipfile

@@ -19,6 +19,7 @@ isort = "*"
 mypy = "*"
 pre-commit = "*"
 pytest = "*"
+pytest-timeout = "*"
 tox = "*"
 types-python-dateutil = "*"
 mongomock = "*"

+ 2 - 2
doc/gui/extension/README.md

@@ -56,8 +56,8 @@ the Taipy GUI installation:
 - If you build from a local copy (a clone, for example) of the
   [`taipy-gui` repository](https://github.com/Avaiga/taipy-gui/),
   this variable should be set to the path of the directory two levels above the directory where this
-  README file is located, then down to the "src" directory (i.e., the result of the Unix command
-  "``readlink -f `pwd`/../../src``").
+  README file is located, then down to the "taipy" directory (i.e., the result of the Unix command
+  "``readlink -f `pwd`/../../taipy``").
 - If you are building this extension library example from an installation of Taipy GUI, you can
   get that location issuing the command `pip show taipy-gui`.
 

+ 1 - 1
frontend/taipy/webpack.config.js

@@ -22,7 +22,7 @@ module.exports = (_env, options) => {
         entry: ["./src/index.ts"],
         output: {
             filename: "taipy-gui-core.js",
-            path: path.resolve(__dirname, "../../src/taipy/gui_core/lib"),
+            path: path.resolve(__dirname, "../../taipy/gui_core/lib"),
             library: {
                 // Camel case transformation of the library name "example"
                 name: "TaipyGuiCore",

+ 0 - 0
taipy/gui/pytest.ini → pytest.ini


+ 2 - 3
setup.py

@@ -24,7 +24,7 @@ from setuptools.command.build_py import build_py
 with open("README.md", "rb") as readme_file:
     readme = readme_file.read().decode("UTF-8")
 
-with open(f"src{os.sep}taipy{os.sep}version.json") as version_file:
+with open(f"taipy{os.sep}version.json") as version_file:
     version = json.load(version_file)
     version_string = f'{version.get("major", 0)}.{version.get("minor", 0)}.{version.get("patch", 0)}'
     if vext := version.get("ext"):
@@ -104,8 +104,7 @@ setup(
     long_description_content_type="text/markdown",
     keywords="taipy",
     name="taipy",
-    package_dir={"": "src"},
-    packages=find_namespace_packages(where="src") + find_packages(include=["taipy"]),
+    packages=find_namespace_packages(where="taipy") + find_packages(include=["taipy"]),
     include_package_data=True,
     test_suite="tests",
     url="https://github.com/avaiga/taipy",

+ 1 - 1
taipy/gui/INSTALLATION.md

@@ -73,7 +73,7 @@ npm i --omit=optional
 npm run build
 ```
 
-After a few minutes, this creates the directory `src/taipy/gui/webapp` in the root directory of the repository
+After a few minutes, this creates the directory `taipy/gui/webapp` in the root directory of the repository
 where the front-end code for Taipy GUI is split into a set of JavaScript bundles.
 
 ### 4 - Install the package as editable

+ 2 - 2
taipy/gui/README.md

@@ -51,8 +51,8 @@ Want to be part of the *Taipy GUI* community? Check out our [`CODE_OF_CONDUCT.md
 
 ## Directory Structure
 
-- `gui`: Graphical user interface related files;
-- `src/taipy/gui`: Python source files;
+- `frontend/taipy-gui`: Graphical user interface related files;
+- `taipy/gui`: Python source files;
 - `tests/taipy/gui`: Unit tests;
 - `tools`: Files used to document `taipy-gui`;
 - `CODE_OF_CONDUCT.md`: Code of conduct for members and contributors of `taipy-gui`;

+ 1 - 1
taipy/rest/README.md

@@ -66,7 +66,7 @@ Want to be part of the _Taipy REST_ community? Check out our
 
 ## Directory Structure
 
-- `src/taipy/rest`: Main source code folder.
+- `taipy/rest`: Main source code folder.
     - `api`: Endpoints and schema definitions.
       - `resources`: Implementation of all endpoints related to taipy.
       - `schemas`: Schemas related to taipy objects. Used for marshalling and unmarshalling data.

+ 1 - 1
taipy/templates/README.md

@@ -55,7 +55,7 @@ Want to be part of the _Taipy_ community? Check out our
 
 ## Directory Structure
 
-- `src/taipy/templates/`: Contains each template in a dedicated sub-folder with the
+- `taipy/templates/`: Contains each template in a dedicated sub-folder with the
     following structure:
 - `CODE_OF_CONDUCT.md`: Code of conduct for members and contributors of _taipy_.
 - `CONTRIBUTING.md`: Instructions to contribute to _taipy_.