Skip to content

Commit 1dd1090

Browse files
authored
Merge pull request #2 from SonySemiconductorSolutions/release/1.0.0
Update for v1.0.0
2 parents a85a084 + 5bee757 commit 1dd1090

24 files changed

+1798
-1
lines changed

.devcontainer/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster
2+
ARG VARIANT=3-bullseye
3+
FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT}
4+
RUN apt-get update && apt-get install -y \
5+
libksba8 \
6+
linux-libc-dev \
7+
libexpat1 \
8+
libexpat1-dev \
9+
libxml2 \
10+
libxml2-dev \
11+
&& apt-get clean \
12+
&& rm -rf /var/lib/apt/lists/*
13+
14+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
15+
ARG NODE_VERSION="16"
16+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
17+
18+
# Upgrading pip, setuptools
19+
RUN pip install --upgrade pip setuptools

.devcontainer/devcontainer.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"name": "Python 3",
3+
"dockerComposeFile": "docker-compose.yml",
4+
"service": "app",
5+
"workspaceFolder": "/workspace",
6+
7+
// Set *default* container specific settings.json values on container create.
8+
"settings": {
9+
"terminal.integrated.profiles.linux": {
10+
"bash": {
11+
"path": "/bin/bash"
12+
}
13+
},
14+
"terminal.integrated.defaultProfile.linux": "bash",
15+
"python.pythonPath": "/usr/local/bin/python",
16+
"python.languageServer": "Pylance",
17+
"python.linting.enabled": true,
18+
"python.linting.pylintEnabled": true,
19+
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
20+
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
21+
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
22+
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
23+
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
24+
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
25+
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
26+
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
27+
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
28+
},
29+
30+
// Add the IDs of extensions you want installed when the container is created.
31+
"extensions": [
32+
"ms-python.python",
33+
"ms-python.vscode-pylance",
34+
"ms-toolsai.jupyter",
35+
"ms-toolsai.jupyter-keymap"
36+
],
37+
38+
// Use 'postCreateCommand' to run commands after the container is created.
39+
"postCreateCommand": "pip install -e .[develop]",
40+
41+
// Use 'initializeCommand' to run commands before the container is created.
42+
"initializeCommand": [".devcontainer/initializeCommand"],
43+
44+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
45+
"remoteUser": "vscode",
46+
47+
// for git submodules: https://docs.github.com/ja/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces
48+
"customizations": {
49+
"codespaces": {
50+
"repositories": {
51+
"SonySemiconductorSolutions/aitrios-sdk-console-access-lib-python": {
52+
"permissions": {
53+
"contents": "read"
54+
}
55+
}
56+
}
57+
}
58+
}
59+
}

.devcontainer/docker-compose.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: '3.8'
2+
3+
services:
4+
app:
5+
build:
6+
context: ..
7+
dockerfile: .devcontainer/Dockerfile
8+
args:
9+
# Update 'VARIANT' to pick a version of Python: 3, 3.10, 3.9, 3.8, 3.7, 3.6
10+
# Append -bullseye or -buster to pin to an OS version.
11+
# Use -bullseye variants on local arm64/Apple Silicon.
12+
VARIANT: 3-bullseye
13+
14+
container_name: "python_devcontainer"
15+
volumes:
16+
- ..:/workspace:cached
17+
init: true
18+
19+
# Overrides default command so things don't shut down after the process ends.
20+
command: sleep infinity

.devcontainer/initializeCommand

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
# Copyright 2022 Sony Semiconductor Solutions Corp. All rights reserved.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -ex
17+
18+
# checkout git submodules before container creation at starting devcontainer/codespaces only first time.
19+
# (below if statement checking is a workaround of git CVE-2022-24765)
20+
if [[ ! "$(ls -A $PWD/.devcontainer/Dependencies/aitrios-sdk-console-access-lib-python)" ]]
21+
then
22+
git submodule update --init --recursive $PWD/.devcontainer/Dependencies/aitrios-sdk-console-access-lib-python
23+
fi
24+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@rem Copyright 2022 Sony Semiconductor Solutions Corp. All rights reserved.
2+
3+
@rem Licensed under the Apache License, Version 2.0 (the "License");
4+
@rem you may not use this file except in compliance with the License.
5+
@rem You may obtain a copy of the License at
6+
7+
@rem http://www.apache.org/licenses/LICENSE-2.0
8+
9+
@rem Unless required by applicable law or agreed to in writing, software
10+
@rem distributed under the License is distributed on an "AS IS" BASIS,
11+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
@rem See the License for the specific language governing permissions and
13+
@rem limitations under the License.
14+
@echo on
15+
16+
SET CMDDIR=%~dp0
17+
18+
SET LIB=%CMDDIR%Dependencies\aitrios-sdk-console-access-lib-python
19+
20+
dir /b /a %LIB% | findstr "." >nul && (set EMPTY=0) || (set EMPTY=1)
21+
if %EMPTY% EQU 1 (
22+
git submodule update --init --recursive .devcontainer\Dependencies\aitrios-sdk-console-access-lib-python
23+
)

.gitignore

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# secrets
2+
console_access_settings.yaml
3+
4+
# Byte-compiled / optimized / DLL files
5+
__pycache__/
6+
*.py[cod]
7+
*$py.class
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
MANIFEST
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Flask stuff:
39+
instance/
40+
.webassets-cache
41+
42+
# Jupyter Notebook
43+
.ipynb_checkpoints
44+
45+
# pyenv
46+
.python-version
47+
48+
# Environments
49+
.env
50+
.venv
51+
env/
52+
venv/
53+
ENV/
54+
env.bak/
55+
venv.bak/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule ".devcontainer/Dependencies/aitrios-sdk-console-access-lib-python"]
2+
path = .devcontainer/Dependencies/aitrios-sdk-console-access-lib-python
3+
url = https://github.com/SonySemiconductorSolutions/aitrios-sdk-console-access-lib-python

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CONTRIBUTING
2+
3+
**We are not accepting Pull Requests and Issues at this time.**
4+
5+
We are preparing to accept them in the future.

0 commit comments

Comments
 (0)