Skip to content

Commit

Permalink
fix: minor update on download contents
Browse files Browse the repository at this point in the history
  • Loading branch information
xgui3783 committed Oct 21, 2024
1 parent 33401ef commit a3eda5c
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .helm/adhoc/deprecated-hostname.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ spec:
path: "/"
backend:
service:
name: prod-siibra-api
name: prod-server-siibra-api-v4-server
port:
number: 5000
42 changes: 42 additions & 0 deletions .helm/adhoc/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: siibra-api-prod
labels:
name: siibra-api-prod
spec:
tls:
- secretName: siibra-api-prod-secret
hosts:
- siibra-api-prod.apps.tc.humanbrainproject.eu
rules:
- host: siibra-api-prod.apps.tc.humanbrainproject.eu
http:
paths:
- pathType: Prefix
path: "/v1_0"
backend:
service:
name: siibra-api-v1
port:
number: 5000
- host: siibra-api-prod.apps.tc.humanbrainproject.eu
http:
paths:
- pathType: Prefix
path: "/v2_0"
backend:
service:
name: siibra-api-v2
port:
number: 5000
- host: siibra-api-prod.apps.tc.humanbrainproject.eu
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: prod-server-siibra-api-v4-server
port:
number: 5000
1 change: 1 addition & 0 deletions .helm/siibra-api-v4-server/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Create chart name and version as used by the chart label.
Common labels
*/}}
{{- define "siibra-api-v4-server.labels" -}}
app-role: server
helm.sh/chart: {{ include "siibra-api-v4-server.chart" . }}
{{ include "siibra-api-v4-server.selectorLabels" . }}
{{- if .Chart.AppVersion }}
Expand Down
1 change: 1 addition & 0 deletions .helm/siibra-api-v4-worker/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Create chart name and version as used by the chart label.
Common labels
*/}}
{{- define "siibra-api-v4-worker.labels" -}}
app-role: worker
helm.sh/chart: {{ include "siibra-api-v4-worker.chart" . }}
{{ include "siibra-api-v4-worker.selectorLabels" . }}
{{- if .Chart.AppVersion }}
Expand Down
6 changes: 4 additions & 2 deletions api/common/data_handlers/compounds/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"""

LICENSE = """Please check the respective citations regarding licenses to use these data."""
LICENSE = """Please check the respective `.info.md` regarding licenses of the data."""

@data_decorator(ROLE)
def download_all(space_id: str, parcellation_id: str, region_id: str=None, feature_id: str=None, bbox=None) -> str:
Expand Down Expand Up @@ -124,9 +124,11 @@ def write_desc(filename, obj, **kwargs):
except Exception as e:
zipfile.writestr(f"{filename}.error.txt", str(e))

injected_content=f"space_id={space_id}, parcellation_id={parcellation_id}, region_id={region_id}, bbox={bbox}"

readme_txt = README.format(siibra_api_version=__version__,
timestamp=str(datetime.now()),
injected_content=f"space_id={space_id}, parcellation_id={parcellation_id}, region_id={region_id}")
injected_content=injected_content)
zipfile.writestr("README.md", readme_txt)
zipfile.writestr("LICENCE.txt", LICENSE)
try:
Expand Down

0 comments on commit a3eda5c

Please sign in to comment.