fix: GitHub Actions path issues and missing imports
Browse files- Fix publisher.yml to reference correct path src/social_media_publishers/publisher.py
- Add missing get_config_value import to all publisher files
- Fix get_strategies() calls to use strategies property in 5 files
- Update ContentStrategyLib docstring to reflect actual API
- .github/workflows/publisher.yml +1 -1
- src/asset_manager/content_strategy_lib.py +1 -1
- src/social_media_publishers/instagram_publisher.py +2 -1
- src/social_media_publishers/publisher.py +2 -1
- src/social_media_publishers/tiktok_publisher.py +2 -1
- src/social_media_publishers/youtube_publisher.py +2 -1
- src/workflows/content_strategy_workflow.py +1 -1
.github/workflows/publisher.yml
CHANGED
|
@@ -105,4 +105,4 @@ jobs:
|
|
| 105 |
TIKTOK_ACCESS_TOKEN: ${{ secrets.TIKTOK_ACCESS_TOKEN }}
|
| 106 |
run: |
|
| 107 |
echo "π Running Publisher for: $media"
|
| 108 |
-
python publisher.py "$media" --commit
|
|
|
|
| 105 |
TIKTOK_ACCESS_TOKEN: ${{ secrets.TIKTOK_ACCESS_TOKEN }}
|
| 106 |
run: |
|
| 107 |
echo "π Running Publisher for: $media"
|
| 108 |
+
python src/social_media_publishers/publisher.py "$media" --commit
|
src/asset_manager/content_strategy_lib.py
CHANGED
|
@@ -18,7 +18,7 @@ class ContentStrategyLib:
|
|
| 18 |
|
| 19 |
Usage:
|
| 20 |
lib = get_content_strategy_lib()
|
| 21 |
-
df = lib.
|
| 22 |
"""
|
| 23 |
|
| 24 |
def __init__(self, gcloud_wrapper: Optional[GCloudWrapper] = None):
|
|
|
|
| 18 |
|
| 19 |
Usage:
|
| 20 |
lib = get_content_strategy_lib()
|
| 21 |
+
df = lib.strategies # Auto-loads if empty
|
| 22 |
"""
|
| 23 |
|
| 24 |
def __init__(self, gcloud_wrapper: Optional[GCloudWrapper] = None):
|
src/social_media_publishers/instagram_publisher.py
CHANGED
|
@@ -18,6 +18,7 @@ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
|
| 18 |
|
| 19 |
from pathlib import Path
|
| 20 |
from asset_manager.content_strategy_lib import get_content_strategy_lib
|
|
|
|
| 21 |
import hashlib
|
| 22 |
from google_src.gcs_utils import find_and_download_gcs_file, upload_file_to_gcs
|
| 23 |
|
|
@@ -149,7 +150,7 @@ async def main():
|
|
| 149 |
scheduler = InstagramPublisher()
|
| 150 |
|
| 151 |
content_lib = get_content_strategy_lib()
|
| 152 |
-
df = content_lib.
|
| 153 |
all_rows = []
|
| 154 |
|
| 155 |
worksheet_name = get_config_value("content_strategy_worksheet", "Instagram_Upload")
|
|
|
|
| 18 |
|
| 19 |
from pathlib import Path
|
| 20 |
from asset_manager.content_strategy_lib import get_content_strategy_lib
|
| 21 |
+
from config import get_config_value
|
| 22 |
import hashlib
|
| 23 |
from google_src.gcs_utils import find_and_download_gcs_file, upload_file_to_gcs
|
| 24 |
|
|
|
|
| 150 |
scheduler = InstagramPublisher()
|
| 151 |
|
| 152 |
content_lib = get_content_strategy_lib()
|
| 153 |
+
df = content_lib.strategies
|
| 154 |
all_rows = []
|
| 155 |
|
| 156 |
worksheet_name = get_config_value("content_strategy_worksheet", "Instagram_Upload")
|
src/social_media_publishers/publisher.py
CHANGED
|
@@ -17,6 +17,7 @@ from pathlib import Path
|
|
| 17 |
import hashlib
|
| 18 |
|
| 19 |
from asset_manager.content_strategy_lib import get_content_strategy_lib
|
|
|
|
| 20 |
from google_src.gcs_utils import find_and_download_gcs_file, upload_file_to_gcs
|
| 21 |
|
| 22 |
# Import individual platform publishers
|
|
@@ -124,7 +125,7 @@ async def run_publisher(media: str, commit=False):
|
|
| 124 |
# Load CSVs
|
| 125 |
# Load strategies from Google Sheet
|
| 126 |
content_lib = get_content_strategy_lib()
|
| 127 |
-
df = content_lib.
|
| 128 |
|
| 129 |
if df.empty:
|
| 130 |
print("β No content strategies found in Google Sheet!")
|
|
|
|
| 17 |
import hashlib
|
| 18 |
|
| 19 |
from asset_manager.content_strategy_lib import get_content_strategy_lib
|
| 20 |
+
from config import get_config_value
|
| 21 |
from google_src.gcs_utils import find_and_download_gcs_file, upload_file_to_gcs
|
| 22 |
|
| 23 |
# Import individual platform publishers
|
|
|
|
| 125 |
# Load CSVs
|
| 126 |
# Load strategies from Google Sheet
|
| 127 |
content_lib = get_content_strategy_lib()
|
| 128 |
+
df = content_lib.strategies
|
| 129 |
|
| 130 |
if df.empty:
|
| 131 |
print("β No content strategies found in Google Sheet!")
|
src/social_media_publishers/tiktok_publisher.py
CHANGED
|
@@ -19,6 +19,7 @@ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
|
| 19 |
from dotenv import load_dotenv
|
| 20 |
from pathlib import Path
|
| 21 |
from asset_manager.content_strategy_lib import get_content_strategy_lib
|
|
|
|
| 22 |
import hashlib
|
| 23 |
from google_src.gcs_utils import find_and_download_gcs_file
|
| 24 |
|
|
@@ -182,7 +183,7 @@ async def main():
|
|
| 182 |
scheduler = TikTokPublisher()
|
| 183 |
|
| 184 |
content_lib = get_content_strategy_lib()
|
| 185 |
-
df = content_lib.
|
| 186 |
|
| 187 |
all_rows = []
|
| 188 |
worksheet_name = get_config_value("content_strategy_worksheet", "TikTok_Upload")
|
|
|
|
| 19 |
from dotenv import load_dotenv
|
| 20 |
from pathlib import Path
|
| 21 |
from asset_manager.content_strategy_lib import get_content_strategy_lib
|
| 22 |
+
from config import get_config_value
|
| 23 |
import hashlib
|
| 24 |
from google_src.gcs_utils import find_and_download_gcs_file
|
| 25 |
|
|
|
|
| 183 |
scheduler = TikTokPublisher()
|
| 184 |
|
| 185 |
content_lib = get_content_strategy_lib()
|
| 186 |
+
df = content_lib.strategies
|
| 187 |
|
| 188 |
all_rows = []
|
| 189 |
worksheet_name = get_config_value("content_strategy_worksheet", "TikTok_Upload")
|
src/social_media_publishers/youtube_publisher.py
CHANGED
|
@@ -21,6 +21,7 @@ from datetime import datetime, timedelta
|
|
| 21 |
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
| 22 |
|
| 23 |
from asset_manager.content_strategy_lib import get_content_strategy_lib
|
|
|
|
| 24 |
from pathlib import Path
|
| 25 |
from dotenv import load_dotenv
|
| 26 |
import hashlib
|
|
@@ -304,7 +305,7 @@ async def main():
|
|
| 304 |
|
| 305 |
# Load strategies
|
| 306 |
content_lib = get_content_strategy_lib()
|
| 307 |
-
df = content_lib.
|
| 308 |
|
| 309 |
all_rows = []
|
| 310 |
worksheet_name = get_config_value("content_strategy_worksheet", "YouTube_Upload")
|
|
|
|
| 21 |
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
| 22 |
|
| 23 |
from asset_manager.content_strategy_lib import get_content_strategy_lib
|
| 24 |
+
from config import get_config_value
|
| 25 |
from pathlib import Path
|
| 26 |
from dotenv import load_dotenv
|
| 27 |
import hashlib
|
|
|
|
| 305 |
|
| 306 |
# Load strategies
|
| 307 |
content_lib = get_content_strategy_lib()
|
| 308 |
+
df = content_lib.strategies
|
| 309 |
|
| 310 |
all_rows = []
|
| 311 |
worksheet_name = get_config_value("content_strategy_worksheet", "YouTube_Upload")
|
src/workflows/content_strategy_workflow.py
CHANGED
|
@@ -18,7 +18,7 @@ async def run_content_strategy_workflow(commit=False, job_index=None, total_jobs
|
|
| 18 |
|
| 19 |
# Load strategies from Google Sheet
|
| 20 |
content_lib = get_content_strategy_lib()
|
| 21 |
-
df = content_lib.
|
| 22 |
|
| 23 |
if df.empty:
|
| 24 |
logger.error("β No content strategies found in Google Sheet!")
|
|
|
|
| 18 |
|
| 19 |
# Load strategies from Google Sheet
|
| 20 |
content_lib = get_content_strategy_lib()
|
| 21 |
+
df = content_lib.strategies
|
| 22 |
|
| 23 |
if df.empty:
|
| 24 |
logger.error("β No content strategies found in Google Sheet!")
|