Pārlūkot izejas kodu

Merge branch 'main' into documentation

# Conflicts:
#	website/documentation.py
Falko Schindler 1 gadu atpakaļ
vecāks
revīzija
e846d63611

+ 4 - 3
.github/workflows/update_citation.py

@@ -7,7 +7,7 @@ import requests
 import yaml
 
 
-def get_infos() -> Tuple[str]:
+def get_infos() -> Tuple[str, str, str]:
     headers = {
         'Accept': 'application/json',
     }
@@ -24,8 +24,9 @@ def get_infos() -> Tuple[str]:
     except Exception:
         print('Error while getting the Zenodo infos')
         sys.exit(1)
-    data = response.json()[0]['metadata']
-    return data['doi'], data['version'], data['publication_date']
+    data = response.json()
+    metadata = data['hits']['hits'][0]['metadata']
+    return str(metadata['doi']), str(metadata['version']), str(metadata['publication_date'])
 
 
 if __name__ == '__main__':

+ 3 - 3
CITATION.cff

@@ -8,7 +8,7 @@ authors:
   given-names: Rodja
   orcid: https://orcid.org/0009-0009-4735-6227
 title: 'NiceGUI: Web-based user interfaces with Python. The nice way.'
-version: v1.3.16
-date-released: '2023-10-06'
+version: v1.4.2
+date-released: '2023-11-06'
 url: https://github.com/zauberzeug/nicegui
-doi: 10.5281/zenodo.8413612
+doi: 10.5281/zenodo.10075791

+ 2 - 2
examples/ros2/ros2_ws/src/gui/gui/node.py

@@ -7,7 +7,7 @@ from geometry_msgs.msg import Pose, Twist
 from rclpy.executors import ExternalShutdownException
 from rclpy.node import Node
 
-from nicegui import Client, app, run, ui
+from nicegui import Client, app, ui, ui_run
 
 
 class NiceGuiNode(Node):
@@ -70,5 +70,5 @@ def ros_main() -> None:
 
 
 app.on_startup(lambda: threading.Thread(target=ros_main).start())
-run.APP_IMPORT_STRING = f'{__name__}:app'  # ROS2 uses a non-standard module name, so we need to specify it here
+ui_run.APP_IMPORT_STRING = f'{__name__}:app'  # ROS2 uses a non-standard module name, so we need to specify it here
 ui.run(uvicorn_reload_dirs=str(Path(__file__).parent.resolve()), favicon='🤖')

+ 2 - 2
website/documentation/sections/configuration_deployment.py

@@ -145,11 +145,11 @@ def content() -> None:
         with python_window(classes='max-w-lg w-full'):
             ui.markdown('''
                 ```python
-                from nicegui import native_mode, ui
+                from nicegui import native, ui
 
                 ui.label('Hello from PyInstaller')
 
-                ui.run(reload=False, port=native_mode.find_open_port())
+                ui.run(reload=False, port=native.find_open_port())
                 ```
             ''')
         with python_window('build.py', classes='max-w-lg w-full'):