Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4896c1e1b5 | |||
| 6c39a43a34 | |||
| ce62945371 | |||
| c4f0351641 | |||
| b9f1c92d4b | |||
| 12d16b7a2d | |||
| 1e4648067d | |||
| e2acf0c603 |
@ -1,5 +1,6 @@
|
||||
---
|
||||
name: eu_de
|
||||
table_suffix: ""
|
||||
internal_org: docs
|
||||
public_org: opentelekomcloud-docs
|
||||
regions:
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
---
|
||||
name: swiss
|
||||
table_suffix: _swiss
|
||||
internal_org: docs-swiss
|
||||
public_org: opentelekomcloud-docs-swiss
|
||||
regions:
|
||||
|
||||
@ -8,6 +8,6 @@ title: API Reference
|
||||
type: api-ref
|
||||
cloud_environments:
|
||||
- name: eu_de
|
||||
visibility: internal
|
||||
visibility: public
|
||||
pdf_visibility: public
|
||||
pdf_enabled: true
|
||||
|
||||
@ -8,6 +8,6 @@ title: User Guide
|
||||
type: umn
|
||||
cloud_environments:
|
||||
- name: eu_de
|
||||
visibility: internal
|
||||
visibility: public
|
||||
pdf_visibility: public
|
||||
pdf_enabled: true
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
link: /enterprise-dashboard/alerting/
|
||||
link: /financial-dashboard/alerting/
|
||||
rst_location: doc/alerting/source
|
||||
service_type: ed
|
||||
title: Alerting
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
link: /enterprise-dashboard/api-ref/
|
||||
link: /financial-dashboard/api-ref/
|
||||
rst_location: api-ref/source
|
||||
service_type: ed
|
||||
title: API Reference
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
link: /enterprise-dashboard/sustainability/
|
||||
link: /financial-dashboard/sustainability/
|
||||
rst_location: doc/sustainability/source
|
||||
service_type: ed
|
||||
title: Sustainability
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
link: /enterprise-dashboard/umn/
|
||||
link: /financial-dashboard/umn/
|
||||
rst_location: umn/source
|
||||
service_type: ed
|
||||
title: User Guide
|
||||
|
||||
@ -8,5 +8,5 @@ teams:
|
||||
permission: write
|
||||
cloud_environments:
|
||||
- name: eu_de
|
||||
visibility: internal
|
||||
visibility: public
|
||||
is_global: false
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
---
|
||||
service_category: other
|
||||
service_title: Enterprise Dashboard
|
||||
service_title: Financial Dashboard
|
||||
service_type: ed
|
||||
service_uri: enterprise-dashboard
|
||||
service_uri: financial-dashboard
|
||||
teams:
|
||||
- name: docs-dashboard-rw
|
||||
permission: write
|
||||
|
||||
237
tools/create_preprod_branch.py
Executable file
237
tools/create_preprod_branch.py
Executable file
File diff suppressed because it is too large
Load Diff
@ -86,9 +86,8 @@ def generate_description_with_llm(text, service_title, llm_api_url, model_name,
|
||||
"""Generate a meta description using the llama.cpp /completion endpoint with up to 3 retries."""
|
||||
content_preview = text[:2000].replace("\n", " ")
|
||||
prompt = (
|
||||
f"Generate a meta description (40-160 chars) for the T Cloud Public service: {service_title}."
|
||||
f"This is a service from the cloud provider called 'T Cloud Public', do NOT mention other Cloud Providers or services from them."
|
||||
f"NEVER mention AWS, Azure, Huawei, Alibaba, GCP and similiar cloud providers."
|
||||
f"Generate a meta description (40-160 chars) for: {service_title}."
|
||||
f"This is a service from the cloud provider called 'T Cloud Public', do not mention other Cloud Providers or services from them."
|
||||
f"Content preview: {content_preview}."
|
||||
f"Output ONLY the description text, nothing else."
|
||||
)
|
||||
@ -161,9 +160,8 @@ def generate_keywords_with_llm(text, service_title, llm_api_url, model_name, api
|
||||
"""Generate keywords using the llama.cpp /completion endpoint with up to 3 retries."""
|
||||
content_preview = text[:2000].replace("\n", " ")
|
||||
prompt = (
|
||||
f"Generate up to 5 keywords (comma-separated) for the T Cloud Public service: {service_title}. "
|
||||
f"This is a service from the cloud provider called 'T Cloud Public', do NOT mention other Cloud Providers or services from them."
|
||||
f"NEVER mention AWS, Azure, Huawei, Alibaba, GCP and similiar cloud providers."
|
||||
f"Generate up to 5 keywords (comma-separated) for: {service_title}. "
|
||||
f"This is a service from the cloud provider called 'T Cloud Public', do not mention other Cloud Providers or services from them."
|
||||
f"Content preview: {content_preview}. "
|
||||
f"Output ONLY comma-separated keywords, nothing else."
|
||||
)
|
||||
@ -258,7 +256,6 @@ def process_service(args, service):
|
||||
repo_dir = None
|
||||
git_repo = None
|
||||
error_list = []
|
||||
files_updated = 0
|
||||
|
||||
repo = None
|
||||
for r in service["repositories"]:
|
||||
@ -355,7 +352,6 @@ def process_service(args, service):
|
||||
|
||||
if add_sphinx_metadata(rst_file, description, keywords):
|
||||
updated_count += 1
|
||||
files_updated += 1
|
||||
logging.info(f"Added meta description and keywords to {rst_file}")
|
||||
else:
|
||||
processed_count += 1
|
||||
@ -390,8 +386,6 @@ def process_service(args, service):
|
||||
logging.error(error_list)
|
||||
|
||||
logging.info(f"Processed {processed_count} files, updated {updated_count} files")
|
||||
|
||||
return files_updated
|
||||
|
||||
|
||||
def main():
|
||||
@ -459,24 +453,8 @@ def main():
|
||||
else:
|
||||
services = data.services_with_repos()
|
||||
|
||||
total_files_updated = 0
|
||||
services_with_updates = []
|
||||
|
||||
for service in services:
|
||||
files_updated = process_service(args, service)
|
||||
if files_updated > 0:
|
||||
total_files_updated += files_updated
|
||||
services_with_updates.append((service['service_title'], files_updated))
|
||||
|
||||
print("\n" + "=" * 60)
|
||||
print("SUMMARY")
|
||||
print("=" * 60)
|
||||
print(f"Total files with metadata added: {total_files_updated}")
|
||||
print(f"Services with updates: {len(services_with_updates)}")
|
||||
print("\nServices with metadata added:")
|
||||
for service_title, count in services_with_updates:
|
||||
print(f" - {service_title}: {count} file(s)")
|
||||
print("=" * 60)
|
||||
process_service(args, service)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user