Skip to content
This repository was archived by the owner on Mar 13, 2024. It is now read-only.

Commit 9793f1c

Browse files
committed
Merge remote-tracking branch 'github/skeleton'
2 parents 0a7b076 + 38b6e46 commit 9793f1c

File tree

12 files changed

+49
-27
lines changed

12 files changed

+49
-27
lines changed

.github/pages/index.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<!DOCTYPE html>
22
<html>
3-
<head>
4-
<title>Redirecting to master branch</title>
5-
<meta charset="utf-8">
6-
<meta http-equiv="refresh" content="0; url=./master/index.html">
7-
<link rel="canonical" href="master/index.html">
8-
</head>
9-
</html>
3+
4+
<head>
5+
<title>Redirecting to master branch</title>
6+
<meta charset="utf-8">
7+
<meta http-equiv="refresh" content="0; url=./master/index.html">
8+
<link rel="canonical" href="master/index.html">
9+
</head>
10+
11+
</html>

.github/workflows/code.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
pull_request:
1414
schedule:
1515
# Run every Monday at 8am to check latest versions of dependencies
16-
- cron: '0 8 * * MON'
16+
- cron: "0 8 * * MON"
1717

1818
jobs:
1919
lint:
@@ -40,21 +40,22 @@ jobs:
4040
umask 0002
4141
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) pipx run build --sdist --wheel
4242
43-
- name: Test cli works from the installed wheel
44-
# Can remove the repository reference after https://github.com/pypa/pipx/pull/733
45-
run: pipx run --spec dist/*.whl ${GITHUB_REPOSITORY##*/} --version
46-
4743
- name: Upload Wheel and Sdist as artifacts
4844
uses: actions/upload-artifact@v2
4945
with:
5046
name: dist
5147
path: dist/*
5248

49+
- name: Install wheel in a venv and check cli works
50+
# ${GITHUB_REPOSITORY##*/} is the repo name without org
51+
# Replace this with the cli command if different to the repo name
52+
run: pipx run --spec dist/*.whl ${GITHUB_REPOSITORY##*/} --version
53+
5354
test:
5455
strategy:
5556
fail-fast: false
5657
matrix:
57-
os: ["ubuntu-latest"] # can add windows-latest, macos-latest
58+
os: ["ubuntu-latest"] # can add windows-latest, macos-latest
5859
python: ["3.7", "3.8", "3.9"]
5960
pipenv: ["skip-lock"]
6061

@@ -103,7 +104,7 @@ jobs:
103104
- name: Github Release
104105
# We pin to the SHA, not the tag, for security reasons.
105106
# https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
106-
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 # v0.1.14
107+
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 # v0.1.14
107108
with:
108109
files: dist/*
109110
generate_release_notes: true

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
if: github.event_name == 'push'
4040
# We pin to the SHA, not the tag, for security reasons.
4141
# https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
42-
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305 # v3.8.0
42+
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305 # v3.8.0
4343
with:
4444
github_token: ${{ secrets.GITHUB_TOKEN }}
4545
publish_dir: .github/pages

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ repos:
2121
language: system
2222
entry: pipenv run flake8
2323
types: [python]
24-
exclude: setup.py
2524

2625
- id: mypy
2726
name: Run mypy

.vscode/launch.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
"request": "launch",
1111
"justMyCode": false,
1212
"program": "${file}",
13-
"purpose": ["debug-test"],
13+
"purpose": [
14+
"debug-test"
15+
],
1416
"console": "integratedTerminal",
1517
"env": {
1618
// The default config in setup.cfg's "[tool:pytest]" adds coverage.

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"editor.defaultFormatter": "ms-python.python",
32
"python.linting.pylintEnabled": false,
43
"python.linting.flake8Enabled": true,
54
"python.linting.mypyEnabled": true,

CONTRIBUTING.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,26 @@ commit`` on just the files that have changed::
5050
.. _mypy: https://github.com/python/mypy
5151
.. _pre-commit: https://pre-commit.com/
5252

53+
Docstrings are pre-processed using the Sphinx Napoleon extension. As such,
54+
google-style_ is considered as standard for this repository. Please use type
55+
hints in the function signature for types. For example::
56+
57+
def func(arg1: str, arg2: int) -> bool:
58+
"""Summary line.
59+
60+
Extended description of function.
61+
62+
Args:
63+
arg1: Description of arg1
64+
arg2: Description of arg2
65+
66+
Returns:
67+
Description of return value
68+
"""
69+
return True
70+
71+
.. _google-style: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/index.html#google-vs-numpy
72+
5373
Documentation
5474
-------------
5575

Pipfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ url = "https://pypi.org/simple"
44
verify_ssl = true
55

66
[dev-packages]
7-
dls_python3_skeleton = {editable = true, extras = ["dev"], path = "."}
7+
dls-python3-skeleton = {editable = true, extras = ["dev"], path = "."}
88

99
[packages]
10-
dls_python3_skeleton = {editable = true, path = "."}
10+
dls-python3-skeleton = {editable = true, path = "."}
1111

1212
[scripts]
1313
lint = "pre-commit run --all-files --show-diff-on-failure --color=always -v"

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ which provides a means to keep tools and techniques in sync between multiple
99
Python projects.
1010

1111
============== ==============================================================
12-
PyPI ``pip install dls_python3_skeleton``
12+
PyPI ``pip install dls-python3-skeleton``
1313
Source code https://github.com/dls-controls/dls-python3-skeleton
1414
Documentation https://dls-controls.github.io/dls-python3-skeleton
1515
Releases https://github.com/dls-controls/dls-python3-skeleton/releases
@@ -50,8 +50,8 @@ and existing projects::
5050
:target: https://codecov.io/gh/dls-controls/dls-python3-skeleton
5151
:alt: Test Coverage
5252

53-
.. |pypi_version| image:: https://img.shields.io/pypi/v/dls_python3_skeleton.svg
54-
:target: https://pypi.org/project/dls_python3_skeleton
53+
.. |pypi_version| image:: https://img.shields.io/pypi/v/dls-python3-skeleton.svg
54+
:target: https://pypi.org/project/dls-python3-skeleton
5555
:alt: Latest PyPI version
5656

5757
.. |license| image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg

docs/images/dls-logo.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)