explosion / explosion/spaCy

Example projects not cross-OS

Open
#6,957 11 comments 4 reactions 0 assignees View on GitHub
compat enhancement help wanted projects
Dominant language
Python
Stars
33.9k
Forks
4.7k
Avg merge
3m
Merged PRs (30d)
1

Description

## How to reproduce the behaviour
I was planning to have a look at the [example projects](https://github.com/explosion/projects/blob/v3/pipelines/tagger_parser_ud/project.yml) and quickly found that these are very Linux oriented. The commands are all Linux commands (`mv`, `mkdir`, etc.). Of course, there are ways around (WSL, other CLIs), but generally, these commands do not work well on Windows. This is not really a bug (it is expected) but I wasn't sure how to tag this differently.

Preferably, all commands in `script` are cross-platform so that they can be run on any platform. These should be able to be replaced by Python `-c` commands to ensure cross-compatibility. I am aware that these are intended as example projects, but especially for new users it would be great if these "just work" cross-platform. Something like the following should work I think (untested).

```
python -c "from pathlib import Path; Path('corpus/${vars.treebank}').mkdir(exist_ok=True)"
python -c "from pathlib import Path; Path('corpus/${vars.treebank}/${vars.train_name}.spacy').rename('corpus/${vars.treebank}/train.spacy)'"
python -c "from pathlib import Path; Path('corpus/${vars.treebank}/${vars.dev_name}.spacy').rename('corpus/${vars.treebank}/dev.spacy)'"
python -c "from pathlib import Path; Path('corpus/${vars.treebank}/${vars.test_name}.spacy').rename('corpus/${vars.treebank}/test.spacy)'"
```

## Info about spaCy

- **spaCy version:** 3.0.1
- **Platform:** Windows-10-10.0.19041-SP0
- **Python version:** 3.8.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.