Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pr test example #345

Merged
merged 3 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion PRs/app.py
Original file line number Diff line number Diff line change
@@ -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()
3 changes: 2 additions & 1 deletion PRs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dash
dash
dash_mantine_components
19 changes: 5 additions & 14 deletions tmp_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Loading