Skip to content

Commit 87a7193

Browse files
committed
insdiers update
1 parent 1993d5c commit 87a7193

File tree

6 files changed

+114
-4
lines changed

6 files changed

+114
-4
lines changed

.devcontainer/Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM mcr.microsoft.com/devcontainers/python:1-3.11-bullseye
2+
# Define the path to the virtualenv to work with
3+
ARG ENV_PATH="/home/vscode/venv"
4+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
5+
ARG NODE_VERSION="none"
6+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
7+
# [Optional] Uncomment this section to install additional OS packages.
8+
# Install the xz-utils package
9+
RUN apt-get update && apt-get install -y xz-utils
10+
RUN apt-get install -y pngquant
11+
RUN sudo apt-get install -y libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
12+
# x x x x x x
13+
#COPY requirements.txt /tmp/pip-tmp/
14+
#RUN su vscode -c "python -m venv ${ENV_PATH}" \
15+
# && ${ENV_PATH}/bin/pip3 --disable-pip-version-check --no-cache-dir \
16+
# install -r /tmp/pip-tmp/requirements.txt \
17+
# && rm -rf /tmp/pip-tmp

.devcontainer/devcontainer.json

+60-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,60 @@
1-
{"image":"mcr.microsoft.com/devcontainers/universal:2"}
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
3+
{
4+
"name": "Python 3",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
//"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
7+
"build": {
8+
"dockerfile": "Dockerfile",
9+
"context": "..",
10+
"args": {
11+
// Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6
12+
// Append -bullseye or -buster to pin to an OS version.
13+
// Use -bullseye variants on local on arm64/Apple Silicon.
14+
"VARIANT": "3.10-bullseye",
15+
// Options
16+
"NODE_VERSION": "lts/*"
17+
}
18+
},
19+
20+
// Features to add to the dev container. More info: https://containers.dev/features.
21+
// "features": {},
22+
23+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
24+
// "forwardPorts": [],
25+
26+
// Use 'postCreateCommand' to run commands after the container is created.
27+
// "postCreateCommand": "pip3 install --user -r requirements.txt", #'mkdocs-material[imaging]'
28+
"postCreateCommand": "pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git --user -r requirements.txt",
29+
30+
// Configure tool-specific properties.
31+
"customizations": {
32+
"vscode": {
33+
// Set *default* container specific settings.json values on container create.
34+
"settings": {
35+
"python.defaultInterpreterPath": "/home/vscode/venv/bin/python",
36+
"python.linting.enabled": true,
37+
"python.linting.pylintEnabled": false,
38+
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
39+
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
40+
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
41+
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
42+
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
43+
"python.linting.flake8Enabled": true,
44+
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
45+
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
46+
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
47+
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
48+
},
49+
"extensions": [
50+
"ms-python.python",
51+
"ms-python.vscode-pylance",
52+
"ms-python.black-formatter",
53+
"ms-azuretools.vscode-docker"
54+
]
55+
}
56+
},
57+
58+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
59+
"remoteUser": "vscode"
60+
}

.github/workflows/ci.yml

+17-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,27 @@ on:
44
branches:
55
- master
66
- main
7+
permissions:
8+
contents: write
79
jobs:
810
deploy:
911
runs-on: ubuntu-latest
12+
if: github.event.repository.fork == false
1013
steps:
11-
- uses: actions/checkout@v2
12-
- uses: actions/setup-python@v2
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-python@v4
1316
with:
1417
python-version: 3.x
18+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
19+
- uses: actions/cache@v3
20+
with:
21+
key: mkdocs-material-${{ env.cache_id }}
22+
path: .cache
23+
restore-keys: |
24+
mkdocs-material-
25+
- run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
1526
- run: pip install mkdocs-material
16-
- run: mkdocs gh-deploy --force
27+
- run: pip install mkdocs-static-i18n[material]
28+
- run: mkdocs gh-deploy --force
29+
env:
30+
GH_TOKEN: ${{ secrets.GH_TOKEN }}

.github/workflows/ci_v1.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- main
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-python@v2
13+
with:
14+
python-version: 3.x
15+
- run: pip install mkdocs-material
16+
- run: mkdocs gh-deploy --force

mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ nav:
6666
- Overview: reference/decodedata-ga4/index.md
6767
- Event Profiling: reference/decodedata-ga4/profiling.md
6868

69+
6970
markdown_extensions:
7071
- admonition
7172
- attr_list

requirements.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mkdocs-static-i18n[material]
2+
mkdocs-material-extensions~=1.2
3+
mkdocs-material[imaging]

0 commit comments

Comments
 (0)