Skip to content

Commit b30fae2

Browse files
committed
native namespace packages
1 parent f6a8e8f commit b30fae2

File tree

23 files changed

+156
-347
lines changed

23 files changed

+156
-347
lines changed

.gitignore

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ venv
1212
firmware.uf2
1313

1414
# libs
15-
flight-software/src/lib/*
16-
!flight-software/src/lib/requirements.txt
17-
!flight-software/src/lib/proveskit_rp2040_v4/
18-
19-
ground-station/src/lib/*
20-
!ground-station/src/lib/requirements.txt
21-
!ground-station/src/lib/proveskit_rp2040_v4/
15+
src/*/lib/*
16+
!src/*/lib/requirements.txt
17+
!src/flight-software/lib/proveskit_rp2040_v4/

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ help: ## Display this help.
1818
@$(UV) pip install --requirement ground-station/pyproject.toml
1919

2020
.PHONY: download-libraries
21-
download-libraries: download-libraries/flight-software download-libraries/ground-station
21+
download-libraries: download-libraries-flight-software download-libraries-ground-station
2222

23-
.PHONY: download-libraries/%
24-
download-libraries/%: uv .venv ## Download the required libraries
23+
.PHONY: download-libraries-%
24+
download-libraries-%: uv .venv ## Download the required libraries
2525
@echo "Downloading libraries for $*..."
26-
@$(UV) pip install --requirement $*/src/lib/requirements.txt --target $*/src/lib --no-deps --upgrade --quiet
27-
@$(UV) pip --no-cache install $(PYSQUARED) --target $*/src/lib --no-deps --upgrade --quiet
26+
@$(UV) pip install --requirement src/$*/lib/requirements.txt --target src/$*/lib --no-deps --upgrade --quiet
27+
@$(UV) pip --no-cache install $(PYSQUARED) --target src/$*/lib --no-deps --upgrade --quiet
2828

29-
@rm -rf $*/src/lib/*.dist-info
30-
@rm -rf $*/src/lib/.lock
29+
@rm -rf src/$*/lib/*.dist-info
30+
@rm -rf src/$*/lib/.lock
3131

3232
.PHONY: pre-commit-install
3333
pre-commit-install: uv
@@ -73,12 +73,12 @@ clean: ## Remove all gitignored files such as downloaded libraries and artifacts
7373
build: build-flight-software build-ground-station ## Build all projects
7474

7575
.PHONY: build-*
76-
build-%: download-libraries/% mpy-cross ## Build the project, store the result in the artifacts directory
76+
build-%: download-libraries-% mpy-cross ## Build the project, store the result in the artifacts directory
7777
@echo "Creating artifacts/proves/$*"
7878
@mkdir -p artifacts/proves/$*
7979
@echo "__version__ = '$(VERSION)'" > artifacts/proves/$*/version.py
8080
$(call compile_mpy,$*)
81-
$(call rsync_to_dest,$*/src,artifacts/proves/$*/)
81+
$(call rsync_to_dest,src/$*,artifacts/proves/$*/)
8282
@$(UV) run python -c "import os; [os.remove(os.path.join(root, file)) for root, _, files in os.walk('artifacts/proves/$*/lib') for file in files if file.endswith('.py')]"
8383
@echo "Creating artifacts/proves/$*.zip"
8484
@zip -r artifacts/proves/$*.zip artifacts/proves/$* > /dev/null
@@ -103,7 +103,7 @@ $(TOOLS_DIR):
103103
mkdir -p $(TOOLS_DIR)
104104

105105
### Tool Versions
106-
UV_VERSION ?= 0.5.24
106+
UV_VERSION ?= 0.7.13
107107
MPY_CROSS_VERSION ?= 9.0.5
108108

109109
UV_DIR ?= $(TOOLS_DIR)/uv-$(UV_VERSION)
@@ -143,5 +143,5 @@ endif
143143
endif
144144

145145
define compile_mpy
146-
@$(UV) run python -c "import os, subprocess; [subprocess.run(['$(MPY_CROSS)', os.path.join(root, file)]) for root, _, files in os.walk('$(1)/src/lib') for file in files if file.endswith('.py')]" || exit 1
146+
@$(UV) run python -c "import os, subprocess; [subprocess.run(['$(MPY_CROSS)', os.path.join(root, file)]) for root, _, files in os.walk('src/$(1)/lib') for file in files if file.endswith('.py')]" || exit 1
147147
endef

flight-software/pyproject.toml

Lines changed: 0 additions & 69 deletions
This file was deleted.

flight-software/src/lib/proveskit_rp2040_v4/register.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

ground-station/pyproject.toml

Lines changed: 0 additions & 69 deletions
This file was deleted.

ground-station/src/lib/proveskit_rp2040_v4/__init__.py

Whitespace-only changes.

ground-station/src/lib/proveskit_rp2040_v4/register.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

pyproject.toml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[project]
2+
name = "proveskit-circuitpython-rp2040-v4"
3+
version = "1.0.0"
4+
description = "PROVESKIT Software RP2040 v4 board"
5+
readme = "README.md"
6+
requires-python = ">=3.13"
7+
dependencies = []
8+
9+
[dependency-groups]
10+
dev = [
11+
"adafruit-circuitpython-typing==1.12.1",
12+
"circuitpython-stubs==9.2.8",
13+
"pre-commit==4.2.0",
14+
"pyright[nodejs]==1.1.402",
15+
]
16+
17+
[tool.ruff.format]
18+
# Use `\n` line endings for all files
19+
line-ending = "lf"
20+
21+
[tool.pyright]
22+
include = [
23+
"src/flight-software/boot.py",
24+
"src/flight-software/main.py",
25+
"src/flight-software/repl.py",
26+
"src/flight-software/safemode.py",
27+
"src/flight-software/lib/proveskit_rp2040_v4/*",
28+
"src/ground_station/boot.py",
29+
"src/ground_station/main.py",
30+
"src/ground_station/repl.py",
31+
"src/ground_station/safemode.py",
32+
]
33+
exclude = [
34+
"**/__pycache__",
35+
".venv",
36+
".git",
37+
"artifacts",
38+
"src/*/lib",
39+
"typings",
40+
]
41+
stubPath = "./typings"
42+
reportMissingModuleSource = false

flight-software/src/lib/proveskit_rp2040_v4/__init__.py renamed to src/flight-software/lib/proveskit_rp2040_v4/__init__.py

File renamed without changes.

0 commit comments

Comments
 (0)