Spaces:
Sleeping
Sleeping
James McCool
commited on
Commit
·
357bf18
1
Parent(s):
6b241cc
adjusting requirements and pm-files
Browse files- app.py +0 -3
- update-pm-files.ps1 +12 -0
app.py
CHANGED
|
@@ -1765,12 +1765,9 @@ if selected_tab == 'Projections Management':
|
|
| 1765 |
st.subheader("Edit Player Projections")
|
| 1766 |
st.caption("Modify median, ownership, or captain ownership values directly in the table below. Changes will update both the projections and all related mappings.")
|
| 1767 |
|
| 1768 |
-
# Get the current projections dataframe
|
| 1769 |
projections_editor_df = st.session_state['projections_df'].copy()
|
| 1770 |
|
| 1771 |
-
# Check for portfolio players not in projections and add them
|
| 1772 |
if 'origin_portfolio' in st.session_state and 'map_dict' in st.session_state:
|
| 1773 |
-
# Get all portfolio player names
|
| 1774 |
portfolio_df = pd.read_parquet(io.BytesIO(st.session_state['origin_portfolio']))
|
| 1775 |
portfolio_players = set(get_portfolio_names(portfolio_df))
|
| 1776 |
projection_players = set(projections_editor_df['player_names'].tolist())
|
|
|
|
| 1765 |
st.subheader("Edit Player Projections")
|
| 1766 |
st.caption("Modify median, ownership, or captain ownership values directly in the table below. Changes will update both the projections and all related mappings.")
|
| 1767 |
|
|
|
|
| 1768 |
projections_editor_df = st.session_state['projections_df'].copy()
|
| 1769 |
|
|
|
|
| 1770 |
if 'origin_portfolio' in st.session_state and 'map_dict' in st.session_state:
|
|
|
|
| 1771 |
portfolio_df = pd.read_parquet(io.BytesIO(st.session_state['origin_portfolio']))
|
| 1772 |
portfolio_players = set(get_portfolio_names(portfolio_df))
|
| 1773 |
projection_players = set(projections_editor_df['player_names'].tolist())
|
update-pm-files.ps1
CHANGED
|
@@ -85,6 +85,18 @@ for ($i = 0; $i -lt $global:instances.Count; $i++) {
|
|
| 85 |
|
| 86 |
if ($LASTEXITCODE -eq 0) {
|
| 87 |
Write-Host "$remoteFileName copied successfully to $ip" -ForegroundColor Green
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
# Determine if we should restart Streamlit
|
| 90 |
$shouldRestart = $false
|
|
|
|
| 85 |
|
| 86 |
if ($LASTEXITCODE -eq 0) {
|
| 87 |
Write-Host "$remoteFileName copied successfully to $ip" -ForegroundColor Green
|
| 88 |
+
|
| 89 |
+
# Determine if we should run pip install (for requirements.txt)
|
| 90 |
+
if ($FileName -eq "requirements.txt") {
|
| 91 |
+
Write-Host "requirements.txt detected - Installing dependencies..." -ForegroundColor Magenta
|
| 92 |
+
ssh -i temp_update_key -o StrictHostKeyChecking=no ec2-user@$ip "cd /home/ec2-user/AWS_Portfolio_Manager && ./venv/bin/pip install -r requirements.txt"
|
| 93 |
+
|
| 94 |
+
if ($LASTEXITCODE -eq 0) {
|
| 95 |
+
Write-Host "Dependencies installed successfully on $ip" -ForegroundColor Green
|
| 96 |
+
} else {
|
| 97 |
+
Write-Host "Failed to install dependencies on $ip" -ForegroundColor Red
|
| 98 |
+
}
|
| 99 |
+
}
|
| 100 |
|
| 101 |
# Determine if we should restart Streamlit
|
| 102 |
$shouldRestart = $false
|