Skip to content

Commit

Permalink
Merge pull request #1 from COVESA/add_akm_tools
Browse files Browse the repository at this point in the history
add akm_tools , tests, and a simple github workflow config
  • Loading branch information
MohitYadav-codes authored Apr 15, 2024
2 parents 93889ec + aac5ed2 commit 20dfdc4
Show file tree
Hide file tree
Showing 31 changed files with 2,246 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Use the official lightweight Python image.
# https://hub.docker.com/_/python
FROM python:3.10.13 AS base

# Install system dependencies required for Poetry
RUN apt-get update \
&& apt-get install -y curl git \
# && apt-get install -y curl build-essential git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install Poetry using recommended installer script
ENV POETRY_VERSION=1.7.0 \
# Install Poetry globally
POETRY_HOME="/usr/local" \
POETRY_NO_INTERACTION=1 \
# Ensure that the poetry path is in the PATH
PATH="/usr/local/bin:$PATH"

# Install Poetry - respects $POETRY_VERSION
RUN curl -sSL https://install.python-poetry.org | python3 -

# Create a non-root user and switch to it
RUN useradd --create-home akm_user

# Switch to the non-root user
USER akm_user

CMD ["bash"]
16 changes: 16 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "akm-develop",
// "context" is the path that the Codespaces docker build command should be run from, relative to devcontainer.json
"context": "..",
"dockerFile": "Dockerfile",

"customizations": {
"vscode": {
"extensions": ["ms-python.python","redhat.vscode-yaml","ms-vscode.makefile-tools"],
"settings": {
"terminal.integrated.defaultProfile.linux": "bash"
}
}
},
"postCreateCommand": "poetry install"
}
35 changes: 35 additions & 0 deletions .github/workflows/run_pytest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Pytest Workflow

# Triggers the workflow on push or pull request events for the main branch
on:
pull_request:
push:
branches:
- "**"

jobs:
test:
name: Run Pytest
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.10.13'

- name: install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: install pacakges
run: |
poetry config virtualenvs.in-project true
poetry install
- name: run pytest
run: |
poetry run pytest tests
159 changes: 159 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
*,cover

# Translations
*.mo
*.pot

# Django stuff:
*.log
*.log.*
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Shell script unit test framework
scripts/shunit2

# Sonarqube
.scannerwork/

# Other
_deps
.pytype
.vagrant
site/
.idea
.env-vlab*
.benchmarks
.conan-config
.vscode
mosquitto.conf

# local dbs
/*.db

## local temp files and logs on root level
/*.xlsx
/*.sql
/*.json
/*.log
/*.yaml
Loading

0 comments on commit 20dfdc4

Please sign in to comment.