diff --git a/PRs/app.py b/PRs/app.py index bbce21b..52f88b5 100644 --- a/PRs/app.py +++ b/PRs/app.py @@ -1,7 +1,14 @@ from dash import * +import dash_mantine_components as dmc +from dash import _dash_renderer + +_dash_renderer._set_react_version("18.2.0") app = Dash(__name__) -app.layout = html.Div('Hi PyCafe') +app.layout = dmc.MantineProvider([ + html.Div('Hi PyCafe'), + dmc.MultiSelect(data=['Test1', 'Test2']) + ]) app.run() \ No newline at end of file diff --git a/PRs/requirements.txt b/PRs/requirements.txt index 7e03e4f..9a22b9a 100644 --- a/PRs/requirements.txt +++ b/PRs/requirements.txt @@ -1 +1,2 @@ -dash \ No newline at end of file +dash +dash_mantine_components \ No newline at end of file diff --git a/tmp_deploy.py b/tmp_deploy.py index 6ecc845..c450990 100644 --- a/tmp_deploy.py +++ b/tmp_deploy.py @@ -29,20 +29,11 @@ 'content': file.read() } -# Find the last modified tar.gz file in the 'dist' directory -dist_path = 'dist' -latest_tar_gz = None -latest_time = 0 - -for f in os.listdir(dist_path): - if f.endswith('.tar.gz'): - file_path = os.path.join(dist_path, f) - modified_time = os.path.getmtime(file_path) - if modified_time > latest_time: - latest_time = modified_time - latest_tar_gz = file_path - -reqs['content'] += f'\n{os.getenv("PACKAGE_NAME")} @ https://py.cafe/gh/artifact/{os.getenv("GITHUB_OWNER")}/{os.getenv("GITHUB_REPOSITORY")}/{os.getenv("ARTIFACT_ID")}/{os.getenv("FILE_FULLNAME")}' +new_package = f'{os.getenv("PACKAGE_NAME")} @ https://py.cafe/gh/artifact/{os.getenv("GITHUB_REPOSITORY")}/{os.getenv("ARTIFACT_ID")}/{os.getenv("FILE_FULLNAME")}' +if os.getenv("PACKAGE_NAME") in reqs['content']: + reqs['content'] = reqs['content'].replace(os.getenv("PACKAGE_NAME"), new_package) +else: + reqs['content'] += f'\n{new_package}' def generate_link(files, code): json_object = {