Skip to content

Commit

Permalink
Add resolved conflicts for template 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
joeshannon committed Mar 6, 2024
1 parent 424b966 commit 3c0016f
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 317 deletions.
255 changes: 0 additions & 255 deletions .github/workflows/code.yml

This file was deleted.

8 changes: 3 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
{
"name": "Debug Unit Test",
"type": "python",
"type": "debugpy",
"request": "launch",
"justMyCode": false,
"program": "${file}",
Expand All @@ -27,10 +27,8 @@
],
"console": "integratedTerminal",
"env": {
// The default config in pyproject.toml's "[tool.pytest.ini_options]" adds coverage.
// Cannot have coverage and debugging at the same time.
// https://github.com/microsoft/vscode-python/issues/693
"PYTEST_ADDOPTS": "--no-cov"
// Enable break on exception when debugging tests (see: tests/conftest.py)
"PYTEST_RAISE": "1",
},
},
{
Expand Down
34 changes: 13 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,26 @@
# This file is for use as a devcontainer and a runtime container
#
# The devcontainer should use the build target and run as root with podman
# The devcontainer should use the developer target and run as root with podman
# or docker with user namespaces.
#
FROM python:3.11 as build
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION} as developer

ARG PIP_OPTIONS=.
# Add any system dependencies for the developer/build environment here
RUN apt-get update && apt-get install -y --no-install-recommends \
graphviz \
&& rm -rf /var/lib/apt/lists/*

# Add any system dependencies for the developer/build environment here e.g.
# RUN apt-get update && apt-get upgrade -y && \
# apt-get install -y --no-install-recommends \
# desired-packages \
# && rm -rf /var/lib/apt/lists/*

# set up a virtual environment and put it in PATH
# Set up a virtual environment and put it in PATH
RUN python -m venv /venv
ENV PATH=/venv/bin:$PATH

# Copy any required context for the pip install over
# The build stage installs the context into the venv
FROM developer as build
COPY . /context
WORKDIR /context
RUN pip install .

# install python package into /venv
RUN pip install ${PIP_OPTIONS}

FROM python:3.11 as runtime

# The runtime stage copies the built venv into a slim runtime container
FROM python:${PYTHON_VERSION}-slim as runtime
# Add apt-get system dependecies for runtime here if needed

# copy the virtual environment from the build stage and put it in PATH
COPY --from=build /venv/ /venv/
COPY ./container-startup.sh /container-startup.sh
ENV PATH=/venv/bin:$PATH
Expand Down
25 changes: 6 additions & 19 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@
"sphinx_copybutton",
# For the card element
"sphinx_design",
# So we can write markdown files
"myst_parser",
]

# So we can use the ::: syntax
myst_enable_extensions = ["colon_fence"]

# If true, Sphinx will warn about all references where the target cannot
# be found.
nitpicky = True
Expand Down Expand Up @@ -82,9 +87,6 @@
# role, that is, for text marked up `like this`
default_role = "any"

# The suffix of source filenames.
source_suffix = ".rst"

# The master toctree document.
master_doc = "index"

Expand All @@ -103,15 +105,6 @@
# A dictionary of graphviz graph attributes for inheritance diagrams.
inheritance_graph_attrs = {"rankdir": "TB"}

# Common links that should be available on every page
rst_epilog = """
.. _Diamond Light Source: http://www.diamond.ac.uk
.. _black: https://github.com/psf/black
.. _ruff: https://beta.ruff.rs/docs/
.. _mypy: http://mypy-lang.org/
.. _pre-commit: https://pre-commit.com/
"""

# Ignore localhost links for periodic check that links in docs are valid
linkcheck_ignore = [r"http://localhost:\d+/"]

Expand Down Expand Up @@ -167,12 +160,6 @@
},
"check_switcher": False,
"navbar_end": ["theme-switcher", "icon-links", "version-switcher"],
"external_links": [
{
"name": "Release Notes",
"url": f"https://github.com/{github_user}/{github_repo}/releases",
}
],
"navigation_with_keys": False,
}

Expand All @@ -192,4 +179,4 @@

# Logo
html_logo = "images/blueapi-logo.svg"
html_favicon = "images/blueapi-logo.svg"
html_favicon = html_logo
Loading

0 comments on commit 3c0016f

Please sign in to comment.