Skip to content

Commit

Permalink
Merge pull request #345 from BSd3v/PR-test-example
Browse files Browse the repository at this point in the history
Pr test example
  • Loading branch information
AnnMarieW authored Oct 10, 2024
2 parents 57ca628 + f475651 commit bb844a0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
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

0 comments on commit bb844a0

Please sign in to comment.