Skip to content

Commit 1818bbd

Browse files
committed
[library-chart] use regex for python chart detection
1 parent 8bf27c4 commit 1818bbd

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

charts/library-chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: v2
22
name: library-chart
3-
version: 1.6.12
3+
version: 1.6.13
44
type: library

charts/library-chart/templates/_secret_hive_discovery.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ stringData:
3737
{{- define "library-chart.hive-discovery-help" }}
3838
{{- if (.Values.discovery).hive }}
3939
{{- with first (include "library-chart.getOnyxiaDiscoverySecrets" (list .Release.Namespace "hive") | fromJsonArray) }}
40-
{{- if hasKey (($.Values).service | default dict) "customPythonEnv" -}}
40+
{{- if regexMatch "^r|r$" .Chart.Name -}}
41+
There is no well-supported Hive Metastore client for R yet.
42+
{{- else }}
4143
{{- if hasKey $.Values "spark" }}
4244
The connection to your Hive Metastore is already preconfigured in your service.
4345
A Spark session can be configured to use Hive:
@@ -67,8 +69,6 @@ with HiveMetastoreClient(os.getenv('HIVE_URI'), os.getenv('HIVE_PORT')) as hive_
6769
```
6870
To learn more about using Hive tables with `hive-metastore-client`, read [their documentation](https://hive-metastore-client.readthedocs.io/en/latest/).
6971
{{- end }}
70-
{{- else }}
71-
There is no well-supported Hive Metastore client for R yet.
7272
{{- end }}
7373
{{- end }}
7474
{{- end }}

charts/library-chart/templates/_secret_metaflow_discovery.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ stringData:
4747
The connection to your [MetaFlow](https://metaflow.org/) service is already preconfigured in your service.
4848
All MetaFlow objects (flows, runs, tasks, projects, etc.) created using this interactive service
4949
are tracked and can directly be browsed from your MetaFlow user interface.
50-
{{- if hasKey .Values.service "customPythonEnv" }}
50+
{{- if not (regexMatch "^r|r$" .Chart.Name) }}
5151

5252
For instance, using Python, start by installing MetaFlow with `pip install metaflow`.
5353
Then the following script can be executed with `python helloflow.py run`:

charts/library-chart/templates/_secret_mlflow_discovery.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ stringData:
4242
{{- if (.Values.discovery).mlflow }}
4343
{{- if first (include "library-chart.getOnyxiaDiscoverySecrets" (list .Release.Namespace "mlflow") | fromJsonArray) }}
4444
The connection to your MLflow service is already preconfigured in your service.
45-
{{- if hasKey .Values.service "customPythonEnv" }}
45+
{{- if regexMatch "^r|r$" .Chart.Name }}
46+
There is no well-supported MLflow client for R yet.
47+
{{- else }}
4648
A client can be created in a Python script or interactive console:
4749
```python
4850
import mlflow
@@ -61,8 +63,6 @@ client.create_model_version("TestModel", ...)
6163
```
6264
To learn more about integrating MLflow, read [the full documentation](https://mlflow.org/docs/latest/api_reference/python_api/index.html).
6365
{{- end }}
64-
{{- else }}
65-
There is no well-supported MLflow client for R yet.
6666
{{- end }}
6767
{{- end }}
6868
{{- end -}}

0 commit comments

Comments
 (0)