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

Commit 9fc2bbd

Browse files
committed
merge latest separate skeleton repo
2 parents cf33c33 + f34c985 commit 9fc2bbd

File tree

4 files changed

+30
-63
lines changed

4 files changed

+30
-63
lines changed

.github/workflows/code.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ jobs:
8080
QT_QPA_PLATFORM: "offscreen"
8181

8282
steps:
83-
- name: Setup git
84-
run: |
85-
git config --global user.email "[email protected]"
86-
git config --global user.name "Your Name"
87-
8883
- name: Checkout
8984
uses: actions/checkout@v2
9085
with:
@@ -173,7 +168,7 @@ jobs:
173168
path: dist
174169

175170
- name: Cache Docker layers
176-
uses: actions/cache@v2
171+
uses: actions/cache@v3
177172
with:
178173
path: /tmp/.buildx-cache
179174
key: ${{ runner.os }}-buildx-${{ github.sha }}

CONTRIBUTING.rst

Lines changed: 14 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,25 @@ Contributing
44
Contributing to the skeleton repository is different to other repos. There
55
are two sorts of contributions:
66

7-
- Changes to the skeleton structure should be made on a branch, then a
8-
PR_ raised back to the ``skeleton`` branch.
9-
- Changes to the docs or commandline tool should be made directly on main
10-
7+
- Changes to the skeleton structure should be made on a branch
8+
of the skeleton-repo_ with a PR
9+
raised back to the ``main`` branch from here: PR_.
10+
- Changes to the docs or commandline tool should be made on a branch in
11+
the cli-repo_ with with a PR raised back to the ``main`` branch
12+
here: PR2_
13+
14+
.. _skeleton-repo: https://github.com/epics-containers/python3-pip-skeleton
15+
.. _cli-repo: https://github.com/epics-containers/python3-pip-skeleton-cli
1116
.. _PR: https://github.com/epics-containers/python3-pip-skeleton/pulls
12-
.. _GitHub: https://github.com/epics-containers/python3-pip-skeleton/issues
17+
.. _PR2: https://github.com/epics-containers/python3-pip-skeleton-cli/pulls
18+
19+
Apart from this, ``main`` branch in both repos should always be deployable,
20+
and are considered the latest release.
1321

1422
Running the tests
1523
-----------------
1624

17-
Both the ``skeleton`` and ``main`` branch have different tests, but
25+
Both the ``skeleton`` and ``main`` repos have different tests, but
1826
the process to run them is the same. You can run in a container using the
1927
supplied devcontainer or you can run them locally.
2028

@@ -43,38 +51,6 @@ on your workstation as follows::
4351
$ pip install -e .[dev]
4452
$ tox -p
4553

46-
In both cases tox -p runs in parallel the following checks:
47-
48-
- Build Spinx Documentation
49-
- run pytest on all tests in ./tests
50-
- run mypy linting on all files in ./src ./tests
51-
- run pre-commit checks:
52-
53-
- run flake8 style checks against all source
54-
- run black formatting checks against all source
55-
56-
Use vscode devcontainer as follows::
57-
58-
$ git clone git://github.com/epics-containers/python3-pip-skeleton.git
59-
$ vscode python3-pip-skeleton
60-
Click on 'Reopen in Container' when prompted
61-
In a vscode Terminal:
62-
$ tox -p
63-
64-
65-
To run locally
66-
~~~~~~~~~~~~~~
67-
68-
Get the source source code and run the unit tests directly
69-
on your workstation as follows::
70-
71-
$ git clone git://github.com/epics-containers/python3-pip-skeleton.git
72-
$ cd python3-pip-skeleton
73-
$ virtualenv .venv
74-
$ s
75-
$ pip install -e .[dev]
76-
$ tox -p
77-
7854
Checks
7955
~~~~~~
8056

@@ -88,8 +64,6 @@ In both cases tox -p runs in parallel the following checks.
8864
- run flake8 style checks against all source
8965
- run black formatting checks against all source
9066

91-
Please note that Pipfile.lock is only committed on ``main``, not on
92-
``skeleton``
9367

9468
Code Styling
9569
------------
@@ -182,13 +156,5 @@ To see a graph of the python package dependency tree type::
182156

183157
pipdeptree
184158

185-
Apart from this, ``main`` and ``skeleton`` should always be deployable,
186-
and are considered the latest release.
187-
188-
Checking Dependencies
189-
---------------------
190159

191-
To see a graph of the python package dependency tree type::
192-
193-
pipdeptree
194160

README.rst

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@ It integrates the following tools:
2626
- which verifies all the things that CI does
2727
- If you use VSCode, it will run black, flake8, isort and mypy on save
2828

29-
The ``skeleton`` branch of this module contains the source code that can be
30-
merged into new or existing projects, and pulled from to keep them up to date.
31-
It can also serve as a working example for those who would prefer to
32-
cherry-pick.
29+
The the related ``skeleton`` repo skeleton_ for this module contains the source
30+
code that can be merged into new or existing projects, and pulled from to
31+
keep them up to date. It can also serve as a working example for those who
32+
would prefer to cherry-pick.
3333

34-
The ``main`` branch contains the
35-
docs and a command line tool to ease the adoption of this skeleton into new::
34+
.. _skeleton: https://github.com/epics-containers/python3-pip-skeleton
35+
36+
This ``cli`` repo contains the
37+
docs and a command line tool to ease the adoption of this skeleton into a
38+
new project like this::
3639

3740
python3-pip-skeleton new /path/to/be/created
3841

@@ -64,4 +67,5 @@ and existing projects::
6467
Anything below this line is used when viewing README.rst and will be replaced
6568
when included in index.rst
6669
67-
See https://epics-containers.github.io/python3-pip-skeleton for more detailed documentation.
70+
See https://epics-containers.github.io/python3-pip-skeleton-cli for
71+
more detailed documentation.

tests/test_dls_python3_skeleton.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,17 @@ def test_new_module(tmp_path: Path):
5858
check_output("virtualenv", ".venv", cwd=module)
5959
check_output(".venv/bin/pip", "install", ".[dev]", cwd=module)
6060
check_output(
61-
".venv/bin/sphinx-build",
61+
".venv/bin/python",
62+
"-m",
63+
"sphinx",
6264
"-EWT",
6365
"--keep-going",
6466
"docs",
6567
"build/html",
6668
cwd=module,
6769
)
6870
with pytest.raises(ValueError) as ctx:
69-
check_output(module / ".venv/bin/pytest", "tests", cwd=module)
71+
check_output(".venv/bin/python", "-m", "pytest", module / "tests", cwd=module)
7072
out = ctx.value.args[0]
7173
print(out)
7274
assert "6 failed, 4 passed" in out

0 commit comments

Comments
 (0)