diff --git a/Makefile b/Makefile index 6e69ff2..2558dbc 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,8 @@ # Increment the version by updating PACKAGE_VERSION, -# then run "make publish" to update package.json and -# the version string in src/your_package/config.py +# then run "make publish" to update package.json. PACKAGE_VERSION := v0.1.0 -PKG := your_package +PKG := hackberry DEVICE ?= u0 diff --git a/README.md b/README.md index 35926e5..1253c46 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,7 @@ # micropython-template -Template repository for MicroPython-based projects. +Portable keyboard and macropad based on MicroPython. -Use this template to easily create projects that rely on MicroPython. With the help of this template\ -you can easily build, deploy and test your application with the included MicroPython toolchain. - -This project relies on GNU Make, implementing various automations in the included Makefile to cross-compile,\ -and upload your application to a device with mpremote. Check the below steps for more details. - -Additionally, you can host your package in the repository itself with the help of ```package.json```, allowing\ -you to install the package from GitHub with the mip package manager. Use the ```publish``` rule to cross-compile\ -and host modules under the ```dist``` directory. +This project is under development. # Prerequisites @@ -20,7 +12,7 @@ source venv/bin/activate python3 -m pip install -r requirements.txt ``` -# Build and run example application +# Development ## Run on unix port diff --git a/package.json b/package.json index 6cbb49e..c95412b 100644 --- a/package.json +++ b/package.json @@ -2,16 +2,16 @@ "version": "v0.1.0", "urls": [ [ - "your_package/main.mpy", - "github:YourName/your_package/dist/your_package/main.mpy" + "hackberry/main.mpy", + "github:szeka9/HackBerry/dist/hackberry/main.mpy" ], [ - "your_package/__init__.py", - "github:YourName/your_package/dist/your_package/__init__.py" + "hackberry/__init__.py", + "github:szeka9/HackBerry/dist/hackberry/__init__.py" ], [ - "your_package/config.mpy", - "github:YourName/your_package/dist/your_package/config.mpy" + "hackberry/config.mpy", + "github:szeka9/HackBerry/dist/hackberry/config.mpy" ] ], "deps": [] diff --git a/scripts/clean_device.py b/scripts/clean_device.py index 632264c..b5fb897 100644 --- a/scripts/clean_device.py +++ b/scripts/clean_device.py @@ -18,4 +18,4 @@ def delete_path(path): pass -delete_path("/lib/your_package") +delete_path("/lib/hackberry") diff --git a/scripts/update_package.bash b/scripts/update_package.bash index 2cb2823..662a0af 100755 --- a/scripts/update_package.bash +++ b/scripts/update_package.bash @@ -9,7 +9,7 @@ which jq 1>/dev/null || { echo "jq dependency is missing"; exit 1; } find "$dist_dir" -type f -printf '%P\n' | jq -Rn --arg version "${version}" '[inputs] | { version: $version, - urls: map([., ("github:YourName/your_package/dist/" + .)]), + urls: map([., ("github:szeka9/hackberry/dist/" + .)]), deps: [] } ' > $package_json diff --git a/src/your_package/__init__.py b/src/hackberry/__init__.py similarity index 100% rename from src/your_package/__init__.py rename to src/hackberry/__init__.py diff --git a/src/your_package/config.py b/src/hackberry/config.py similarity index 100% rename from src/your_package/config.py rename to src/hackberry/config.py diff --git a/src/your_package/main.py b/src/hackberry/main.py similarity index 69% rename from src/your_package/main.py rename to src/hackberry/main.py index 39581c0..f238696 100644 --- a/src/your_package/main.py +++ b/src/hackberry/main.py @@ -7,7 +7,6 @@ def main(): """ Main function, used as an example. """ - print('This is a template, replace "your_package" with your package name.') return "OK" diff --git a/tests/functional/test_dummy.py b/tests/functional/test_dummy.py index e7e279f..33f07a6 100644 --- a/tests/functional/test_dummy.py +++ b/tests/functional/test_dummy.py @@ -2,7 +2,7 @@ Functional test module. """ -from your_package import main as package_main +from hackberry import main as package_main def test_assert(name, actual, expected): @@ -13,8 +13,9 @@ def test_assert(name, actual, expected): print("Fail") raise AssertionError(f"{actual} != {expected}") + def test_dummy(): - test_assert("main function returns \"OK\"", package_main.main(), "OK") + test_assert('main function returns "OK"', package_main.main(), "OK") def main(): diff --git a/tests/unit/test_dummy.py b/tests/unit/test_dummy.py index 05f7eb9..502e365 100644 --- a/tests/unit/test_dummy.py +++ b/tests/unit/test_dummy.py @@ -10,7 +10,7 @@ class DummyTest(unittest.TestCase): @classmethod def setUpClass(cls): - cls.main_module = load_module("your_package/main.py") + cls.main_module = load_module("hackberry/main.py") def setUp(self): pass