Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
coretl committed Jan 23, 2024
1 parent aaabca1 commit 8c41cfd
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 5 deletions.
39 changes: 39 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// For format details, see https://containers.dev/implementors/json_reference/
{
"name": "Python 3 Developer Container",
"build": {
"dockerfile": "../Dockerfile",
"target": "developer"
},
"remoteEnv": {
// Allow X11 apps to run inside the container
"DISPLAY": "${localEnv:DISPLAY}",
},
"customizations": {
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"github.vscode-github-actions",
"tamasfe.even-better-toml",
"redhat.vscode-yaml",
]
}
},
"features": {
// Some default things like git config
"ghcr.io/devcontainers/features/common-utils:2": {
"upgradePackages": false
}
},
"runArgs": [
// Allow the container to access the host X11 display and EPICS CA
"--net=host",
// Make sure SELinux does not disable with access to host filesystems like tmp
"--security-opt=label=disable"
],
// Mount the parent as /workspaces so we can pip install peers as editable
"workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind",
// After the container is created, install the python project in editable form
"postCreateCommand": "pip install -c dev-requirements.txt -e '.[dev]'"
}
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION} as developer
RUN python -m venv /venv
ENV PATH=/venv/bin:$PATH
12 changes: 12 additions & 0 deletions ctt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[output."example"]
package_name = "python_copier_template_example"
description = "An expanded python-copier-template with all the options"
git_platform = "github.com"
github_org = "DiamondLightSource"
repo_name = "python-copier-template-example"
distribution_name = "dls-python-copier-template-example"
author_name = "Tom Cobb"
author_email = "[email protected]"
component_owner = "group:default/sscc"
docker = true
docs_type = sphinx
23 changes: 19 additions & 4 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
#
# This file is autogenerated by pip-compile with Python 3.9
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --extra=dev --no-annotate --output-file=dev-requirements.txt --strip-extras
#
accessible-pygments==0.0.4
alabaster==0.7.16
annotated-types==0.6.0
babel==2.14.0
beartype==0.16.4
beautifulsoup4==4.12.3
build==1.0.3
certifi==2023.11.17
cfgv==3.4.0
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
copier==9.1.1
copier-template-tester==2.1.1
corallium==0.3.3
decorator==5.1.1
distlib==0.3.8
docutils==0.20.1
dunamai==1.19.0
filelock==3.13.1
funcy==2.0
identify==2.5.33
idna==3.6
imagesize==1.4.1
importlib-metadata==7.0.1
jinja2==3.1.3
jinja2-ansible-filters==1.3.2
livereload==2.6.3
markdown-it-py==3.0.0
markupsafe==2.1.4
Expand All @@ -31,16 +39,24 @@ myst-parser==2.0.0
nodeenv==1.8.0
packaging==23.2
pathlib2==2.3.7.post1
pathspec==0.12.1
pip-tools==7.3.0
platformdirs==4.1.0
pluggy==1.3.0
plumbum==1.8.2
pre-commit==3.6.0
prompt-toolkit==3.0.36
py==1.11.0
pydantic==2.5.3
pydantic-core==2.14.6
pydata-sphinx-theme==0.15.2
pygments==2.17.2
pyproject-hooks==1.0.0
pyyaml==6.0.1
pyyaml-include==1.3.2
questionary==2.0.1
requests==2.31.0
rich==13.7.0
six==1.16.0
snowballstemmer==2.2.0
soupsieve==2.5
Expand All @@ -54,15 +70,14 @@ sphinxcontrib-htmlhelp==2.0.5
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.7
sphinxcontrib-serializinghtml==1.1.10
tomli==2.0.1
tornado==6.4
tox==3.28.0
tox-direct==0.4
typing-extensions==4.9.0
urllib3==2.1.0
virtualenv==20.25.0
wcwidth==0.2.13
wheel==0.42.0
zipp==3.17.0

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.0"

[project.optional-dependencies]
dev = [
"copier-template-tester",
"myst-parser",
"pip-tools",
"pre-commit",
Expand Down Expand Up @@ -42,4 +43,4 @@ quiet = true
# Make output suitable for use as a constraints file
strip-extras = true
# Remove annotations as coverage source seems to make false positive in CI
no-annotate = true
annotate = false

0 comments on commit 8c41cfd

Please sign in to comment.