Skip to content

Commit 96ea198

Browse files
Alpha release (#1)
* First release of C5-DEC CAD
1 parent 67f3664 commit 96ea198

1,999 files changed

Lines changed: 321674 additions & 661 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/devcontainer.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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/docker-existing-dockerfile
3+
{
4+
"name": "Existing Dockerfile",
5+
"build": {
6+
// Sets the run context to one level up instead of the .devcontainer folder.
7+
"context": "..",
8+
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
9+
"dockerfile": "../Dockerfile"
10+
},
11+
12+
// Features to add to the dev container. More info: https://containers.dev/features.
13+
// "features": {},
14+
15+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
16+
// "forwardPorts": [],
17+
18+
// Uncomment the next line to run commands after the container is created.
19+
// "postCreateCommand": "cat /etc/os-release",
20+
21+
// Configure tool-specific properties.
22+
"customizations": {
23+
"vscode": {
24+
"extensions": [
25+
"ms-python.python"
26+
],
27+
"settings": {
28+
"python.testing.pytestArgs": [
29+
"."
30+
],
31+
"python.testing.unittestEnabled": false,
32+
"python.testing.pytestEnabled": true,
33+
"python.formatting.provider": "black"
34+
}
35+
}
36+
},
37+
38+
"workspaceMount": "source=${localWorkspaceFolder},target=/home/alab/c5dec,type=bind",
39+
"workspaceFolder": "/home/alab/c5dec"
40+
41+
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
42+
// "remoteUser": "devcontainer"
43+
}

.gitignore

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
publish/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
wheels/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
cover/
54+
55+
# Translations
56+
*.mo
57+
*.pot
58+
59+
# Django stuff:
60+
*.log
61+
local_settings.py
62+
db.sqlite3
63+
db.sqlite3-journal
64+
65+
# Flask stuff:
66+
instance/
67+
.webassets-cache
68+
69+
# Scrapy stuff:
70+
.scrapy
71+
72+
# Sphinx documentation
73+
docs/_build/
74+
75+
# PyBuilder
76+
.pybuilder/
77+
target/
78+
79+
# Jupyter Notebook
80+
.ipynb_checkpoints
81+
82+
# IPython
83+
profile_default/
84+
ipython_config.py
85+
86+
# pyenv
87+
# For a library or package, you might want to ignore these files since the code is
88+
# intended to run in multiple environments; otherwise, check them in:
89+
# .python-version
90+
91+
# pipenv
92+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
94+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
95+
# install all needed dependencies.
96+
#Pipfile.lock
97+
98+
# poetry
99+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
100+
# This is especially recommended for binary packages to ensure reproducibility, and is more
101+
# commonly ignored for libraries.
102+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
103+
#poetry.lock
104+
105+
# pdm
106+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
107+
#pdm.lock
108+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
109+
# in version control.
110+
# https://pdm.fming.dev/#use-with-ide
111+
.pdm.toml
112+
113+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
114+
__pypackages__/
115+
116+
# Celery stuff
117+
celerybeat-schedule
118+
celerybeat.pid
119+
120+
# SageMath parsed files
121+
*.sage.py
122+
123+
# Environments
124+
.env
125+
.venv
126+
env/
127+
venv/
128+
ENV/
129+
env.bak/
130+
venv.bak/
131+
132+
# Spyder project settings
133+
.spyderproject
134+
.spyproject
135+
136+
# Rope project settings
137+
.ropeproject
138+
139+
# mkdocs documentation
140+
/site
141+
142+
# mypy
143+
.mypy_cache/
144+
.dmypy.json
145+
dmypy.json
146+
147+
# Pyre type checker
148+
.pyre/
149+
150+
# pytype static type analyzer
151+
.pytype/
152+
153+
# Cython debug symbols
154+
cython_debug/
155+
156+
# PyCharm
157+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
158+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
159+
# and can be added to the global gitignore or merged into this file. For a more nuclear
160+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
161+
#.idea/
162+
163+
# c5dec specific elements
164+
# Note: adding this folder causes warnings to doorstop.
165+
# It was left commented on purpose to prevent future inclusion.
166+
# evaluation/
167+
168+
# macOS files
169+
.DS_Store
170+
171+
# WSL stuff
172+
*:Zone.Identifier

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 0.1 (2023-12-01)
2+
3+
- Initial release of C5-DEC CAD

Dockerfile

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
FROM python:3.8
2+
3+
ARG MY_ENV
4+
5+
ENV MY_ENV=${MY_ENV} \
6+
PYTHONFAULTHANDLER=1 \
7+
PYTHONUNBUFFERED=1 \
8+
PYTHONHASHSEED=random \
9+
PIP_NO_CACHE_DIR=off \
10+
PIP_DISABLE_PIP_VERSION_CHECK=on \
11+
PIP_DEFAULT_TIMEOUT=100 \
12+
POETRY_VERSION=1.5.0
13+
14+
ENV user=alab
15+
ENV c5folder=c5dec
16+
17+
# Update and install depencencies
18+
RUN apt update --fix-missing
19+
RUN apt-get install -y git python3-pip graphviz
20+
21+
# Create a non-root user
22+
RUN useradd -ms /bin/bash ${user} && echo '${user} ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers
23+
24+
# Add location where pip is installed to the PATH variable
25+
ENV PATH="/home/${user}/.local/bin:${PATH}"
26+
27+
# Copy the files and install the python environment as user alab
28+
USER ${user}
29+
# RUN pip3 install pipenv
30+
RUN pip3 install "poetry==$POETRY_VERSION"
31+
32+
WORKDIR /home/${user}/${c5dec}
33+
COPY poetry.lock pyproject.toml /home/${user}/${c5dec}/
34+
35+
# Project initialization
36+
RUN poetry install
37+
38+
# Creating folders, and files for a project
39+
COPY . /home/${user}/${c5dec}
40+
41+
# Install python virtual environment for the project
42+
WORKDIR /home/${user}/${c5dec}
43+
# RUN pipenv install
44+
45+
# Clean up unnecessary packages
46+
USER root
47+
RUN apt-get autoremove -y && apt-get autoclean -y
48+
49+
# Set the container starting point, running the project as the user
50+
USER ${user}
51+
CMD ["poetry", "shell"]

0 commit comments

Comments
 (0)