Skip to content

Commit b0fb706

Browse files
committed
Merge remote-tracking branch 'origin/main' into 237-rtd-next-step
2 parents f084394 + 2076940 commit b0fb706

7 files changed

Lines changed: 9 additions & 24 deletions

File tree

tests/test_project.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import subprocess
3-
import shlex
3+
from sys import platform
4+
from typing import Sequence
45

56

67
def test_project_folder(cookies):
@@ -12,8 +13,8 @@ def test_project_folder(cookies):
1213
assert project.project.isdir()
1314

1415

15-
def run(command: str, dirpath: os.PathLike) -> subprocess.CompletedProcess:
16-
return subprocess.run(shlex.split(command),
16+
def run(args: Sequence[str], dirpath: os.PathLike) -> subprocess.CompletedProcess:
17+
return subprocess.run(args=args,
1718
stdout=subprocess.PIPE,
1819
stderr=subprocess.PIPE,
1920
cwd=dirpath,
@@ -22,14 +23,15 @@ def run(command: str, dirpath: os.PathLike) -> subprocess.CompletedProcess:
2223

2324
def test_pytest(cookies):
2425
result = cookies.bake()
25-
env_output = run('python3 -m venv env', result.project)
26+
env_output = run(['python3', '-m', 'venv', 'env'], result.project)
2627
assert env_output.returncode == 0
27-
latest_pip_output = run('env/bin/pip3 install --upgrade pip setuptools', result.project)
28+
env_bin = 'env/Scripts/' if platform.startswith("win") else 'env/bin/'
29+
latest_pip_output = run([f'{env_bin}pip3', 'install', '--upgrade', 'pip', 'setuptools'], result.project)
2830
assert latest_pip_output.returncode == 0
29-
pip_output = run('env/bin/pip3 install --editable .[dev]', result.project)
31+
pip_output = run([f'{env_bin}pip3', 'install', '--editable', '.[dev]'], result.project)
3032
assert pip_output.returncode == 0
3133

32-
pytest_output = run('env/bin/pytest', result.project)
34+
pytest_output = run([f'{env_bin}pytest'], result.project)
3335
assert pytest_output.returncode == 0
3436
assert '== 3 passed in' in pytest_output.stdout
3537
assert (result.project / 'coverage.xml').exists()

{{cookiecutter.project_name}}/.github/next_steps/01_sonarcloud_integration.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
22
title: 'Next step: Sonarcloud integration'
3-
labels:
4-
- 'action required'
53
---
64

75
Continuous code quality can be handled by [Sonarcloud](https://sonarcloud.io/). This repository is configured to use Sonarcloud to perform quality analysis and code coverage report on each push.
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
22
title: 'Next step: Zenodo integration'
3-
labels:
4-
- 'action required'
53
---
64

75
Zenodo integration instructions.
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
22
title: 'Next step: Citation data'
3-
labels:
4-
- 'action required'
53
---
64

75
Citation data instructions
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
22
title: 'Next step: Linting'
3-
labels:
4-
- 'action required'
53
---
64

75
Linting instructions

{{cookiecutter.project_name}}/.github/next_steps/labels.yml

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

{{cookiecutter.project_name}}/.github/workflows/next_steps.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ jobs:
55
runs-on: ubuntu-latest
66
steps:
77
- uses: actions/checkout@v2
8-
- name: Create labels
9-
uses: crazy-max/ghaction-github-labeler@v3
10-
with:
11-
github-token: ${{ secrets.GITHUB_TOKEN }}
12-
yaml-file: .github/next_steps/labels.yml
13-
skip-delete: true
148
- name: Create Sonarcloud integration issue
159
uses: JasonEtco/create-an-issue@v2
1610
env:

0 commit comments

Comments
 (0)