Skip to content

Commit 9f99f68

Browse files
committed
consolidate contributing information. Fixes #305
1 parent 78064c7 commit 9f99f68

File tree

2 files changed

+59
-96
lines changed

2 files changed

+59
-96
lines changed

CONTRIBUTING.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ and to meet some of our community members.
4343
you can submit a pull request (PR).
4444
Instructions for doing this are [included below][using-github].
4545

46-
4. To build and run the user guide locally, see **Building** below
46+
4. To build and run the user guide locally, see **Building** below
4747

4848
**Note:** The published version of the user guide <https://www.commonwl.org/user_guide/> is built from the `release` branch.
4949
New changes are gathered on the default (`main`) branch which is built at <https://common-workflow-languageuser-guide.readthedocs.io/en/latest/>
@@ -125,6 +125,56 @@ source venv/bin/activate
125125
> correctly, but failure to deploy the production version after the pull request
126126
> gets merged.
127127
128+
## Style Guide
129+
130+
We must use the phrase "CWL standards" or "CWL open standards" when talking about CWL.
131+
We must use the word "specification" only when talking specifically about the CWL
132+
specification document.
133+
134+
Whenever a page is updated we must verify that it does not break existing
135+
links, both internal and external. The `make html` command will fail if Sphinx detects broken links.
136+
It only works for links managed by Sphinx (i.e. table of contents links,
137+
or links to Markdown pages). For simple HTML links (e.g. `< href=>` or
138+
markdown external links) pull request reviewers must verify that links
139+
are still working after the change.
140+
141+
Use “tool description” not “tool wrapper” for describing the first argument
142+
given to the `cwl-runner` or `cwltool` commands.
143+
144+
### Code examples
145+
146+
To include code into a Markdown file you have two options. For external files use
147+
the following command:
148+
149+
````
150+
```{literalinclude} /_includes/cwl/hello_world.cwl
151+
:language: cwl
152+
```
153+
````
154+
155+
For code examples in the same page, you can use fence blocks.
156+
157+
````
158+
```bash
159+
echo "Hello world"
160+
```
161+
````
162+
163+
If you would like to customize the syntax highlighting styles
164+
you will have to customize the Sphinx and Pygments settings.
165+
To preview Pygments output with different styles, use their
166+
[Pygments demo tool](https://pygments.org/demo/).
167+
168+
### Creating Links
169+
170+
Sphinx and the theme are configured to auto-generate anchor slug
171+
links for sections. So sections like ``## cwl standard`` are translated
172+
into an anchor link `#cwl-standard`.
173+
174+
If you are having trouble with links to sections or code blocks, it might
175+
be due to duplicated sections, or to spaces or other characters. To
176+
preview the generated links, use the `myst-anchors` tool.
177+
128178
## Other Resources
129179

130180
General discussion of [Common Workflow Language][cwl-site] project

README.md

Lines changed: 8 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
[![DOI](https://zenodo.org/badge/89621457.svg)](https://zenodo.org/badge/latestdoi/89621457)
1+
[![DOI for the latest version](https://zenodo.org/badge/89621457.svg)](https://zenodo.org/badge/latestdoi/89621457)
22

33
[![Syntax Check](https://travis-ci.org/common-workflow-language/user_guide.svg?branch=main)](https://travis-ci.org/common-workflow-language/user_guide)
44

5-
[Released User guide for CWL v1.2.0](https://www.commonwl.org/user_guide/) : This is the released version which corresponds to the release branch.
6-
[Read The Docs User guide for CWL v1.2.0](https://common-workflow-languageuser-guide.readthedocs.io/en/latest/) : This is the Read The Docs(RTD) version which corresponds to the main branch.
5+
6+
This is the source of the official user guide for the Common Workflow Language standards.
7+
8+
Releases are published at <https://www.commonwl.org/user_guide/> from the `release` branch.
9+
10+
Preview of the next release is published at <https://common-workflow-languageuser-guide.readthedocs.io/en/latest/>
11+
based upon the default branch (`main`) using the Read The Docs (RTD) service.
712

813
Original source:
914
https://github.com/common-workflow-language/common-workflow-language/blob/a2a8a08b8c8d56f8f2ca6284ca4e9cbf23d19346/v1.0/UserGuide.yml
@@ -16,98 +21,6 @@ To edit the user guide:
1621

1722
We'd like to ask you to familiarize yourself with our [Contribution Guide](CONTRIBUTING.md).
1823

19-
## Style Guide
20-
21-
We must use CWL standards or CWL open standards when talking about CWL.
22-
We must use specification only when talking specifically about the CWL
23-
specification document.
24-
25-
Whenever a page is updated we must verify that it does not break existing
26-
links. The `make html` command will fail if Sphinx detects broken links.
27-
It only works for links managed by Sphinx (i.e. table of contents links,
28-
or links to Markdown pages). For simple HTML links (e.g. `< href=>` or
29-
markdown external links) pull request reviewers must verify that links
30-
are still working after the change.
31-
32-
Use “tool description” not “tool wrapper” for describing the first argument
33-
given to the `cwl-runner` or `cwltool` commands.
34-
35-
### Code examples
36-
37-
To include code into a Markdown file you have two options. For external files use
38-
the following command:
39-
40-
````
41-
```{literalinclude} /_includes/cwl/hello_world.cwl
42-
:language: cwl
43-
```
44-
````
45-
46-
For code examples in the same page, you can use fence blocks.
47-
48-
````
49-
```bash
50-
echo "Hello world"
51-
```
52-
````
53-
54-
If you would like to customize the syntax highlighting styles
55-
you will have to customize the Sphinx and Pygments settings.
56-
To preview Pygments output with different styles, use their
57-
[Pygments demo tool](https://pygments.org/demo/).
58-
59-
### Creating Links
60-
61-
Sphinx and the theme are configured to auto-generate anchor slug
62-
links for sections. So sections like ``## cwl standard`` are translated
63-
into an anchor link `#cwl-standard`.
64-
65-
If you are having trouble with links to sections or code blocks, it might
66-
be due to duplicated sections, or to spaces or other characters. To
67-
preview the generated links, use the `myst-anchors` tool.
68-
69-
```bash
70-
$ (venv) myst-anchors basic-concepts.md
71-
<h1 id="basic-concepts"></h1>
72-
<h2 id="the-cwl-standard"></h2>
73-
<h2 id="implementations"></h2>
74-
<h2 id="cwl-objects-model"></h2>
75-
```
76-
77-
You can also create reference anchor links anywhere on the page with
78-
``(test)=``, which can be used in the page as `#test` (these do not appear
79-
in the `myst-anchor` output).
80-
81-
> Links to anchors in pages work only for Sphinx's autogenerated anchor links.
82-
> If you have an anchor for, for example, a code-block, that might cause the
83-
> build to fail: https://github.com/executablebooks/MyST-Parser/issues/564
84-
85-
## Extensions
86-
87-
We use MyST Parser with Sphinx. This gives us the best of both Sphinx and Markdown,
88-
while also supporting reStructuredText, Sphinx, and MyST extensions.
89-
90-
### String Substitutions
91-
92-
For convenience, we have the currently supported version of the specification as a
93-
constant in `conf.py`. We have it in two forms:
94-
95-
- Markdown preformatted, i.e. \`v0.0\` which is formatted as `v0.0`
96-
- Plain text, i.e. v0.0
97-
98-
Note that String Substitutions do not work with links. As workaround, you can use
99-
string formatting or replacements.
100-
101-
```
102-
The CWL {{ cwl_version }} Specification: {{ '<https://www.commonwl.org/{}/>'.format(cwl_version_text) }}
103-
```
104-
105-
For more:
106-
107-
- <https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#substitutions-with-jinja2>
108-
- <https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#substitutions-and-urls>
109-
- <https://github.com/executablebooks/MyST-Parser/issues/279>
110-
11124
## Authors
11225

11326
A list of contributors to these materials can be found in [AUTHORS](AUTHORS.md)

0 commit comments

Comments
 (0)