You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/community/release-policy/kcl.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,4 +30,5 @@ The KCL project version release strategy is as follows:
30
30
- Testing and Feedback: Before releasing the feature, allow some peers/users to try and test these new features through written documentation rather than oral descriptions. Receive feedback and make improvements.
31
31
- Release and Announcements: Write Release Notes, PR articles, interpret scenarios and new features, and promote through various channels.
32
32
33
-
> Note: All the above information is public and should be made available for all community developers to participate, discuss, and contribute.
33
+
> **NOTE:**
34
+
> All the above information is public and should be made available for all community developers to participate, discuss, and contribute.
Copy file name to clipboardExpand all lines: docs/reference/lang/codelab/schema.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,7 +159,7 @@ nginx = Deployment {
159
159
160
160
## 5. Write More Complex Logic in Schema
161
161
162
-
Suppose we have some schema logic, we can wrapper it into schema:
162
+
Suppose we have some schema logic, we can wrap it into a schema:
163
163
164
164
```python
165
165
schema Deployment[priority]:
@@ -426,7 +426,7 @@ schema Volume:
426
426
hostPath: str
427
427
```
428
428
429
-
Since the attributes defined by the schema are **required** by default, the verification that judges that the variable cannot be None/Undefined can be omitted.
429
+
Since the attributes defined by the schema are **required** by default, no check to ensure they are not `None`/`Undefined` is needed.
430
430
431
431
```python
432
432
schema Volume:
@@ -474,7 +474,7 @@ Stderr:
474
474
Schema check is failed to check condition: regex.match(image, "^[a-zA-Z]+:\d+\.\d+\.\d+$"), "image name should be like 'nginx:1.14.2'"
475
475
```
476
476
477
-
> The verification capability of KCL covers the verification defined by Openapi so that we can write any API verifications through KCL.
477
+
> The verification capability of KCL covers the verification defined by OpenAPI so that we can write any API verifications through KCL.
478
478
479
479
## 9. Create New Schema via Schema Inheritance
480
480
@@ -485,7 +485,7 @@ Usually, schema Deployment will be used in multiple scenarios. We can directly u
485
485
For example, we can use the Deployment schema as a basis, to define the nginx's base schema, and extend the definition
486
486
in each scenario.
487
487
488
-
In this case, we define some commonly used attributes. Please note that we mark the name to be immutable with the 'final' keyword to prevent it from being overwritten.
488
+
In this case, we define some commonly used attributes. Please note that to prevent the attribut `name` from being overwritten as immutable by assigning its final value.
489
489
490
490
```python
491
491
schema Nginx(Deployment):
@@ -604,7 +604,8 @@ mixin PersistentVolumeClaimMixin for PVCProtocol:
604
604
}
605
605
```
606
606
607
-
> Note: for the `k8s.api.core.v1` import to work, we need to initialize a module and add the `k8s` module as a dependency:
607
+
> **NOTE:**
608
+
> For the `k8s.api.core.v1` import to work, we need to initialize a module and add the `k8s` module as a dependency:
Copy file name to clipboardExpand all lines: docs/reference/lang/spec/kcl-spec.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ description: KCL Spec
10
10
11
11
### Keywords and reserved words
12
12
13
-
The following are the keywords of the KCL:
13
+
The following identifiers are used as reserved words, or keywords of the language, and cannot be used as ordinary identifiers. They must be spelled exactly as written here:
14
14
15
-
```python
15
+
```
16
16
True False None Undefined import
17
17
and or in is not
18
18
as if else elif for
@@ -21,9 +21,9 @@ all any map filter lambda
21
21
rule
22
22
```
23
23
24
-
The following are reserved words for the KCL:
24
+
The following tokens are not used, but they are reserved as possible future keywords:
25
25
26
-
```python
26
+
```
27
27
pass return validate rule flow
28
28
def del raise except try
29
29
finally while from with yield
@@ -32,13 +32,13 @@ global nonlocal struct class final
32
32
33
33
### Line comment
34
34
35
-
```python
35
+
```
36
36
# a comment
37
37
```
38
38
39
39
### Operators
40
40
41
-
```python
41
+
```
42
42
+ - * ** / // %
43
43
<< >> & | ^ < >
44
44
~ <= >= == != =
@@ -48,7 +48,7 @@ global nonlocal struct class final
48
48
49
49
### Delimiters
50
50
51
-
```python
51
+
```
52
52
( ) [ ] { }
53
53
, : . ; @
54
54
```
@@ -76,7 +76,7 @@ The following list of operators is ordered from **highest to lowest**:
76
76
77
77
## Grammar
78
78
79
-
KCL uses Python's [LarkParser](https://lark-parser.readthedocs.io/en/latest/) tool to describe the grammar, and the specification rules are as follows:
79
+
KCL uses the Python-based[LarkParser](https://lark-parser.readthedocs.io/en/latest/) tool to describe the grammar, and the specification rules are as follows:
Copy file name to clipboardExpand all lines: docs/reference/lang/spec/lexical.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,8 +56,7 @@ A physical line is a sequence of characters end with a line termination sequence
56
56
57
57
To join multiple physical lines into one logical line, the `\` character can be used. The character should be the last none-space character in each physical line except the very last line.
58
58
59
-
> **note**
60
-
>
59
+
> **NOTE:**
61
60
> Any character except the ASCII space, tab (`\t`) and formfeed (`\f`) is considered a none-space character.
62
61
63
62
- A line ending in a backslash cannot carry a comment (, which will be introduced shortly afterwards).
Copy file name to clipboardExpand all lines: docs/user_docs/concepts/package-and-module.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,8 @@ Within a **module**, KCL organizes files grouped by **package**. A package can b
10
10
11
11
A KCL module contains a configuration laid out in a directory hierarchy. It contains everything that is needed to deterministically determine the outcome of a KCL configuration. The root of this directory is marked by containing a `kcl.mod` directory. The contents of this directory are mostly managed by the kcl tool such as `kpm`, etc. In that sense, `kcl.mod` is analogous to the `.git` directory marking the root directory of a repo, but where its contents are mostly managed by the git tool. Besides, a KCL module is the largest unit of the file organization, has a fixed location of all KCL files and dependencies.
12
12
13
-
> Note: The use of a KCL module e.g., `kcl.mod` is optional, but required if one wants to manage, distribute, share and reuse code with a semantic version.
13
+
> **NOTE:**
14
+
> The use of a KCL module e.g., `kcl.mod` is optional, but required if one wants to manage, distribute, share and reuse code with a semantic version.
14
15
15
16
### Creating a module
16
17
@@ -140,7 +141,8 @@ kcl_cli_configs:
140
141
kcl -Y kcl.yaml
141
142
```
142
143
143
-
> Note: If we do not specify any input files for KCL, KCL will find the default `kcl.yaml` from the command line execution path to read the input file. Besides, if we tell KCL both the input files and the compilation setting file, KCL will take input files entered by the user as the final value.
144
+
> **NOTE:**
145
+
> If we do not specify any input files for KCL, KCL will find the default `kcl.yaml` from the command line execution path to read the input file. Besides, if we tell KCL both the input files and the compilation setting file, KCL will take input files entered by the user as the final value.
144
146
145
147
```bash
146
148
# Whether the 'files' field is configured in `kcl.yaml` or not, the final value of input files is ["file1.k", "file2.k"]
Copy file name to clipboardExpand all lines: docs/user_docs/guides/ci-integration/1-github-actions.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,8 @@ sidebar_label: Github Actions
9
9
10
10
In the GitOps section, we have introduced how to integrate KCL with GitOps. In this section, we will continue to provide sample solutions for KCL and CI integrations. We hope to implement the end-to-end application development process by using containers, Continuous Integration (CI) for generation, and GitOps for Continuous Deployment (CD). In this scheme, we use a **Flask application** and **Github Actions** as examples.
11
11
12
-
> Note: You can use any containerized application and different CI systems such as **Gitlab CI**, **Jenkins CI**, etc. in this solution.
12
+
> **NOTE:**
13
+
> You can use any containerized application and different CI systems such as **Gitlab CI**, **Jenkins CI**, etc. in this solution.
0 commit comments