Skip to content

Commit

Permalink
kapps folder and poetry taks
Browse files Browse the repository at this point in the history
  • Loading branch information
tadeubas committed Dec 1, 2024
1 parent 30f9b97 commit eaa0920
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 4 deletions.
Binary file added kapps/kapp.mpy
Binary file not shown.
Binary file added kapps/kapp.mpy.sig
Binary file not shown.
32 changes: 32 additions & 0 deletions kapps/kapp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# The MIT License (MIT)

# Copyright (c) 2021-2024 Krux contributors

# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
import os

# avoids importing from flash VSF
os.chdir("/")

print("Print executed inside kapp.py")


def run():
"""Runs this kapp"""
print("run() func executed on kapp.py")
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ flash = ["pyserial"]
# format tasks
format-src = "black src"
format-tests = "black tests"
format-scripts = "black firmware/font firmware/scripts i18n/*.py"
format-scripts = "black firmware/font firmware/scripts i18n/*.py kapps/*.py"
format = ["format-src", "format-tests", "format-scripts"]
# aliases
black.ref = "format"
format-test.ref = "format-tests"

# pylint tasks
lint-src = "pylint src"
lint-scripts = "pylint firmware/font/*.py firmware/scripts/*.py i18n/*.py"
lint-scripts = "pylint firmware/font/*.py firmware/scripts/*.py i18n/*.py kapps/*.py"
lint = ["lint-src", "lint-scripts"]
# aliases
pylint.ref = "lint"
Expand Down Expand Up @@ -130,6 +130,10 @@ flash-cmd = "python firmware/Kboot/build/ktool.py -b 1500000 build/kboot.kfpkg"
flash.ref = "flash-cmd -B goE"
flash-dock.ref = "flash-cmd -B dan"

# kapps tasks
mpy = "./firmware/MaixPy/components/micropython/core/mpy-cross/mpy-cross"
mpy-cross.ref = "mpy"

# task for bdftokff?
# python bdftokff.py True

Expand Down
33 changes: 31 additions & 2 deletions simulator/kapp.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
print("Print inside kapp.py")
# The MIT License (MIT)

# Copyright (c) 2021-2024 Krux contributors

# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
import os

# avoids importing from flash VSF
os.chdir("/")

print("Print executed inside kapp.py")


def run():
print("run func kapp.py")
"""Runs this kapp"""
print("run() func executed on kapp.py")

0 comments on commit eaa0920

Please sign in to comment.