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: CONTRIBUTING.md
+13-14Lines changed: 13 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,26 +22,25 @@ Licensing your contributed specs under MIT is most appreciated, for consistency;
22
22
This makes it clear which model files are associated with which spec.
23
23
1. Include a `README.md` in the spec directory explaining the significance of the spec with links to any relevant websites or publications, or integrate this info as comments in the spec itself.
24
24
25
-
At this point, you have the option of adding your spec directory to the [`.ciignore`](.ciignore) file to simply contribute the spec files & exclude it from automated validation.
25
+
At this point, you have the option of adding your spec directory to the [`.ciignore`](.ciignore) file to simply contribute the spec files & exclude it from automated validation, although this precludes your spec from the table of CI-validated specs in [`README.md`](README.md).
26
26
Contribution volume is low enough that maintainers will be able to onboard your spec to the validation process eventually.
27
27
However, if you are willing to put in the addition work of onboarding your spec to continuous integration yourself, follow the steps below.
28
28
29
29
## Adding Spec to Continuous Integration
30
30
31
31
All specs & models in this repository are subject to many validation checks; for a full listing, see [`DEVELOPING.md`](DEVELOPING.md).
32
-
While many of these checks concern basic properties like whether the spec parses properly and its models do not crash, they also check whether the spec correctly reflects metadata stored about it in [`manifest.json`](manifest.json) and a table in [`README.md`](README.md).
32
+
While many of these checks concern basic properties like whether the spec parses properly and its models do not crash, they also check whether the spec correctly reflects metadata stored about it in the spec's `manifest.json` file and a table in [`README.md`](README.md).
33
33
34
-
The central file containing metadata about all specs is [`manifest.json`](manifest.json).
35
-
You will need to add an entry to it for your spec & model files.
34
+
CI validation requires creating a `manifest.json` metadata file in your specification's root directory.
36
35
This can either be done manually (by looking at existing examples) or largely automated using the instructions below; note that if done manually you are very likely to miss tagging your spec with some feature flags detected & enforced by the CI.
37
-
Before submitted your changes to run in the CI, you can quickly check your [`manifest.json`](manifest.json) against the schema [`manifest-schema.json`](manifest-schema.json) at https://www.jsonschemavalidator.net/.
36
+
Before submitted your changes to run in the CI, you can quickly check your `manifest.json` against the schema [`manifest-schema.json`](manifest-schema.json) at https://www.jsonschemavalidator.net/.
38
37
Steps:
39
38
40
39
1. Ensure you have Python 3.11+ installed; open a terminal in the root of this repository
41
40
1. It is considered best practice to create & initialize a Python virtual environment so the required packages are not installed globally; run `python -m venv .` then `source ./bin/activate` on Linux & macOS or `.\Scripts\activate.bat` on Windows (run `deactivate` to exit)
42
41
1. Run `pip install -r .github/scripts/requirements.txt`
43
-
1. Run `python .github/scripts/generate_manifest.py` to auto-generate your spec entry in [`manifest.json`](manifest.json) with as many details as possible
44
-
1. Locate your spec's entry in the [`manifest.json`](manifest.json) file and ensure the following fields are filled out:
42
+
1. Run `python .github/scripts/generate_manifest.py` to auto-generate your spec's `manifest.json` file with as many details as possible
43
+
1. Locate your spec directory's `manifest.json` file and ensure the following fields are filled out:
45
44
- Spec title: an appropriate title for your specification
46
45
- Spec description: a short description of your specification
47
46
- Spec sources: links relevant to the source of the spec (papers, blog posts, repositories)
@@ -69,18 +68,18 @@ Steps:
69
68
- Recording these turns your model into a powerful regression test for TLC
70
69
- Other fields are auto-generated by the script; if you are adding an entry manually, ensure their values are present and correct (see other entries or the [`manifest-schema.json`](manifest-schema.json) file)
71
70
1. Add your spec somewhere in the **topmost** table (not the bottom one, don't get them mixed up!) in [`README.md`](README.md); this must have:
72
-
- The spec name as a link to the spec's directory, matching the name in the [`manifest.json`](manifest.json)
73
-
- A comma-separated list of authors, which must also match the list of authors in [`manifest.json`](manifest.json)
71
+
- The spec name as a link to the spec's directory, matching the name in the `manifest.json`
72
+
- A comma-separated list of authors, which must also match the list of authors in the `manifest.json`
74
73
- A checkmark indicating whether the spec is appropriate for beginners
75
-
- Checked IFF (if and only if) `beginner` is present in the `tags` field of your spec in [`manifest.json`](manifest.json)
74
+
- Checked IFF (if and only if) `beginner` is present in the `tags` field of your spec in `manifest.json`
76
75
- A checkmark indicating whether the spec contains a formal proof
77
-
- Checked IFF a `proof` tag is present in the `features` field of least one module under your spec in [`manifest.json`](manifest.json)
76
+
- Checked IFF a `proof` tag is present in the `features` field of least one module under your spec in `manifest.json`
78
77
- A checkmark indicating whether the spec contains PlusCal
79
-
- Checked IFF a `pluscal` tag is present in the `features` field of least one module under your spec in [`manifest.json`](manifest.json)
78
+
- Checked IFF a `pluscal` tag is present in the `features` field of least one module under your spec in `manifest.json`
80
79
- A checkmark indicating whether the spec contains a TLC-checkable model
81
-
- Checked IFF `exhaustive search`, `generate`, or `simulate` tags are present in the `mode` field of at least one model under your spec in [`manifest.json`](manifest.json)
80
+
- Checked IFF `exhaustive search`, `generate`, or `simulate` tags are present in the `mode` field of at least one model under your spec in `manifest.json`
82
81
- A checkmark indicating whether the spec contains an Apalache-checkable model
83
-
- Checked IFF `symbolic` tag is present in the `mode` field of at least one model under your spec in [`manifest.json`](manifest.json)
82
+
- Checked IFF `symbolic` tag is present in the `mode` field of at least one model under your spec in `manifest.json`
84
83
85
84
At this point you can open a pull request and the CI will run against your spec, alerting you to any details that you missed.
86
85
These scripts can be run locally for a faster development loop; see [`DEVELOPING.md`](DEVELOPING.md) for details.
0 commit comments