Skip to content

Commit e4f63e0

Browse files
authored
Merge pull request #373 from common-workflow-language/staging
2023 release
2 parents 1ec30fc + 59967d0 commit e4f63e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+11227
-209
lines changed

.github/workflows/ci-tests.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI Tests
2+
3+
# Migrated from .travis.yml, based on cwltool's ci-tests.yml.
4+
# See .travis.yml in git history for previous changes and configurations.
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
workflow_dispatch:
12+
13+
concurrency:
14+
group: build-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
19+
ci_tests:
20+
name: CI Tests
21+
runs-on: ubuntu-latest
22+
strategy:
23+
matrix:
24+
py-ver-major: [ 3 ]
25+
py-ver-minor: [ 9, 10, 11 ]
26+
27+
env:
28+
py-semver: ${{ format('{0}.{1}', matrix.py-ver-major, matrix.py-ver-minor) }}
29+
30+
steps:
31+
- uses: actions/checkout@v3
32+
33+
- name: Set up Python
34+
uses: actions/setup-python@v4
35+
with:
36+
python-version: ${{ env.py-semver }}
37+
cache: pip
38+
cache-dependency-path: |
39+
**/setup.cfg
40+
41+
- run: pip install -U pip setuptools wheel typing
42+
- run: pip install -e .[all]
43+
44+
- run: make RUNNER=cwltool unittest-examples

.github/workflows/codeql.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "main", "gh-pages", "release" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: "59 14 * * 5"
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [ javascript, python ]
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v2
31+
with:
32+
languages: ${{ matrix.language }}
33+
queries: +security-and-quality
34+
35+
- name: Autobuild
36+
uses: github/codeql-action/autobuild@v2
37+
if: ${{ matrix.language == 'javascript' || matrix.language == 'python' }}
38+
39+
- name: Perform CodeQL Analysis
40+
uses: github/codeql-action/analyze@v2
41+
with:
42+
category: "/language:${{ matrix.language }}"

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.zenodo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"name": "Andrew Jesaitis"
1313
},
1414
{
15-
"name": "bamiwoaluko"
15+
"name": "Bamiwo Aluko"
1616
},
1717
{
1818
"orcid": "https://orcid.org/0000-0002-6206-4638",

AUTHORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Thank you to the following contributors (in alphabetical order by user name):
22
* Alain Domissy (@alaindomissy)
33
* Andrew Jesaitis (@andrewjesaitis)
4-
* @bamiwoaluko
4+
* Bamiwo Aluko (@bamiwoaluko)
55
* Benjamin Carr (@BenjaminHCCarr) <https://orcid.org/0000-0002-6206-4638>
66
* Michele Mastropietro (@elehcim) <https://orcid.org/0000-0002-6324-5713>
77
* Emannuel Fernandes de Oliveira Carvalho (@emannuelOC)

CONTRIBUTING.md

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,25 +106,29 @@ The `dot` program from Graphviz is needed to render some of the diagrams.
106106

107107
* For Debian/Ubuntu users:
108108
```bash
109-
sudo apt get install graphviz
109+
sudo apt-get install graphviz
110110
```
111111
* For non-Debian/Ubuntu users, follow the directions at [the GraphViz download site](https://graphviz.org/download).
112112
```bash
113113
# Create and activate a virtual environment
114-
python -m venv venv
114+
python3 -m venv venv
115115
source venv/bin/activate
116116
# update the version of pip, setuptools, and wheel
117117
(venv) pip install -U pip setuptools wheel
118118
# Install all the dependencies in your virtual environment.
119119
(venv) pip install ".[all]"
120120
# Create the HTML to visualize locally
121121
(venv) make html
122-
(venv) open _build/index.html
122+
(venv) open _build/html/index.html
123123
# Or you can start a serve that watches for local file changes
124124
(venv) make watch
125125
# Open <http://localhost:8000/> in your browser
126126
```
127127

128+
You can use `udocker` or any other Docker compatible engine to build the
129+
user guide, by setting the following environment variable:
130+
`CWLTOOL_OPTIONS=--udocker`, or `CWLTOOL_OPTIONS=--podman` for Podman, or `CWLTOOL_OPTIONS=--singularity` for Singularity/Apptainer.
131+
128132
> NOTE: When you modify the packages installed with apt or pip, please verify
129133
> if the change needs to be applied to either or to both of CI and readthedocs.
130134
> ReadTheDocs builds and deploys previews. CI builds and deploys production
@@ -148,7 +152,10 @@ are still working after the change.
148152
Use “tool description” not “tool wrapper” for describing the first argument
149153
given to the `cwl-runner` or `cwltool` commands.
150154

151-
### Code examples
155+
156+
### Code Examples
157+
158+
All CWL documents should be version 1.2 unless there is a very good reason otherwise.
152159

153160
To include code into a Markdown file you have two options. For external files use
154161
the following command:
@@ -182,6 +189,34 @@ If you are having trouble with links to sections or code blocks, it might
182189
be due to duplicated sections, or to spaces or other characters. To
183190
preview the generated links, use the `myst-anchors` tool.
184191

192+
### Troubleshooting
193+
194+
General advice for troubleshooting is to increase the verbosity of Sphinx
195+
logs. When using `make`, change your command to the following pattern:
196+
`make SPHINXOPTS="-vvv" html`. Or if you are using `sphinx-build`, then
197+
use the following: `sphinx-build -vvv -b html src build/`.
198+
199+
It is also worth removing build directories and files such as `_build`, `build`,
200+
and [`~/.cache/salad`](https://github.com/common-workflow-language/user_guide/issues/268#issuecomment-1276068865).
201+
You may want to start afresh with a new Python virtual environment,
202+
installing the dependencies from scratch.
203+
204+
If running `make html` or `make watch` appears to run fine but [gets stuck
205+
](https://github.com/common-workflow-language/user_guide/issues/268) at some
206+
part of the process (`10%`, `33%`, `57%`, etc.) for longer than 2-5 minutes
207+
you may have to try the following:
208+
209+
1. Check if the Python dependencies installed in your Python virtual environment
210+
have updates available (you can re-create the virtual environment, use `--upgrade`
211+
for `pip`, or manually verify in PyPI and `pip`).
212+
2. Use `top` or `htop` to find out if there is any `cwltool` command running. Then
213+
try running that command individually to see what is the error message.
214+
3. Upgrade your version of `docker` if you have [an error message](
215+
https://github.com/docker/compose/issues/8121#issuecomment-806055733) similar to
216+
`docker: Failed to create the container ID file: open /tmp/....cid: no such file or directory.`.
217+
4. Try using `udocker` instead of `docker`, by using `pip` to install it, and setting
218+
`CWLTOOL_OPTIONS` to `--udocker`.
219+
185220
## Other Resources
186221

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

LICENSE.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ You are free:
1616
for any purpose, even commercially.
1717

1818
The licensor cannot revoke these freedoms as long as you follow the
19-
license terms.
19+
license terms:
20+
2021

21-
Under the following terms:
2222

2323
* **Attribution**---You must give appropriate credit (mentioning that
2424
your work is derived from work that is Copyright © the Common Workflow
@@ -28,16 +28,14 @@ Under the following terms:
2828
so in any reasonable manner, but not in any way that suggests the
2929
licensor endorses you or your use.
3030

31-
**No additional restrictions**---You may not apply legal terms or
31+
* **No additional restrictions**---You may not apply legal terms or
3232
technological measures that legally restrict others from doing
3333
anything the license permits. With the understanding that:
3434

35-
Notices:
36-
37-
* You do not have to comply with the license for elements of the
35+
* You do not have to comply with the license for elements of the
3836
material in the public domain or where your use is permitted by an
3937
applicable exception or limitation.
40-
* No warranties are given. The license may not give you all of the
38+
* No warranties are given. The license may not give you all of the
4139
permissions necessary for your intended use. For example, other
4240
rights such as publicity, privacy, or moral rights may limit how you
4341
use the material.
@@ -55,7 +53,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5553
See the License for the specific language governing permissions and
5654
limitations under the License.
5755

58-
## Trademark
56+
5957

6058

6159
[cc-by-human]: https://creativecommons.org/licenses/by/4.0/

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# You can set these variables from the command line, and also
55
# from the environment for the first two.
6-
SPHINXOPTS = "-W"
6+
#SPHINXOPTS = # was "-W" (turn warnings into errors)
77
SPHINXBUILD = sphinx-build
88
SOURCEDIR = src
99
BUILDDIR = _build
@@ -25,15 +25,17 @@ watch: clean
2525
@echo
2626
@echo "Building and watching for changes in the documentation."
2727
sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" \
28+
-b html \
2829
--ignore='**venv' \
2930
--ignore='**.github' \
3031
--ignore='*.egg-info' \
3132
--ignore='**_includes/**/*.txt' \
32-
--watch='cwl'
33+
--watch='cwl' \
34+
$(SPHINXOPTS) $(O)
3335

3436
## unittest-examples :
3537
unittest-examples:
36-
cd src/_includes/cwl; cwltest --test=conformance-test.yml --tool=${RUNNER}
38+
cd src/_includes/cwl; cwltest --test=cwl_tests.yml --tool=${RUNNER}
3739

3840
## check-json :
3941
check-json:
@@ -42,6 +44,10 @@ check-json:
4244
container-pull:
4345
for container in $$(git grep dockerPull $$(git ls-files *.cwl) | awk '-F: ' '{print $$3}'); do docker pull $${container}; done
4446

47+
update_translations: gettext
48+
sphinx-intl update -p _build/gettext
49+
50+
4551
.PHONY: help clean watch unittest-examples check-json Makefile
4652

4753
# Catch-all target : route all unknown targets to Sphinx using the new

README.md

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

3-
[![Syntax Check](https://app.travis-ci.com/common-workflow-language/user_guide.svg?branch=main)](https://app.travis-ci.com/common-workflow-language/user_guide)
3+
[![CI Tests](https://github.com/common-workflow-language/user_guide/actions/workflows/ci-tests.yml/badge.svg?branch=main)](https://github.com/common-workflow-language/user_guide/actions/workflows/ci-tests.yml)
4+
5+
[![Translation status](https://hosted.weblate.org/widgets/commonwl/-/user-guide/svg-badge.svg)](https://hosted.weblate.org/engage/commonwl/)
46

57
This is the source of the official user guide for the Common Workflow Language standards.
68

cwl/sphinx/runcmd.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,13 @@ class Singleton(_Singleton("SingletonMeta", (object,), {})):
4040

4141
class CMDCache(Singleton):
4242
cache = {}
43+
exclude_cache_cmd = {hash("cat output.txt")}
4344

4445
def get(self, cmd, working_directory):
4546
h = hash(cmd)
46-
if h in self.cache:
47+
if h in self.exclude_cache_cmd:
48+
return run_command(cmd, working_directory)
49+
elif h in self.cache:
4750
return self.cache[h]
4851
else:
4952
result = run_command(cmd, working_directory)

0 commit comments

Comments
 (0)