Skip to content

Commit 890621b

Browse files
committed
Merge branch 'feature/upload-schematic-boms'
2 parents 0e9558e + 5a5691a commit 890621b

19 files changed

+3113
-57
lines changed

assets/controllers/elements/attachment_autocomplete_controller.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export default class extends Controller {
4242
selectOnTab: true,
4343
//This a an ugly solution to disable the delimiter parsing of the TomSelect plugin
4444
delimiter: 'VERY_L0NG_D€LIMITER_WHICH_WILL_NEVER_BE_ENCOUNTERED_IN_A_STRING',
45+
dropdownParent: 'body',
4546
render: {
4647
item: (data, escape) => {
4748
return '<span>' + escape(data.label) + '</span>';

assets/controllers/elements/part_select_controller.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default class extends Controller {
1616
searchField: ["name", "description", "category", "footprint"],
1717
valueField: "id",
1818
labelField: "name",
19+
dropdownParent: 'body',
1920
preload: "focus",
2021
render: {
2122
item: (data, escape) => {
@@ -71,4 +72,4 @@ export default class extends Controller {
7172
//Destroy the TomSelect instance
7273
this._tomSelect.destroy();
7374
}
74-
}
75+
}

assets/controllers/elements/select_controller.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default class extends Controller {
4444
allowEmptyOption: true,
4545
selectOnTab: true,
4646
maxOptions: null,
47+
dropdownParent: 'body',
4748

4849
render: {
4950
item: this.renderItem.bind(this),
@@ -108,4 +109,4 @@ export default class extends Controller {
108109
//Destroy the TomSelect instance
109110
this._tomSelect.destroy();
110111
}
111-
}
112+
}

assets/controllers/elements/select_multiple_controller.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export default class extends Controller {
2929
this._tomSelect = new TomSelect(this.element, {
3030
maxItems: 1000,
3131
allowEmptyOption: true,
32+
dropdownParent: 'body',
3233
plugins: ['remove_button'],
3334
});
3435
}
@@ -39,4 +40,4 @@ export default class extends Controller {
3940
this._tomSelect.destroy();
4041
}
4142

42-
}
43+
}

assets/controllers/elements/static_file_autocomplete_controller.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export default class extends Controller {
5050
valueField: 'text',
5151
searchField: 'text',
5252
orderField: 'text',
53+
dropdownParent: 'body',
5354

5455
//This a an ugly solution to disable the delimiter parsing of the TomSelect plugin
5556
delimiter: 'VERY_L0NG_D€LIMITER_WHICH_WILL_NEVER_BE_ENCOUNTERED_IN_A_STRING',

assets/controllers/elements/structural_entity_select_controller.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export default class extends Controller {
5454
maxItems: 1,
5555
delimiter: "$$VERY_LONG_DELIMITER_THAT_SHOULD_NEVER_APPEAR$$",
5656
splitOn: null,
57+
dropdownParent: 'body',
5758

5859
searchField: [
5960
{field: "text", weight : 2},

assets/controllers/elements/tagsinput_controller.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export default class extends Controller {
4343
selectOnTab: true,
4444
createOnBlur: true,
4545
create: true,
46+
dropdownParent: 'body',
4647
};
4748

4849
if(this.element.dataset.autocomplete) {
@@ -73,4 +74,4 @@ export default class extends Controller {
7374
//Destroy the TomSelect instance
7475
this._tomSelect.destroy();
7576
}
76-
}
77+
}

config/packages/nelmio_security.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,3 @@ nelmio_security:
6969
- 'data:'
7070
block-all-mixed-content: true # defaults to false, blocks HTTP content over HTTPS transport
7171
# upgrade-insecure-requests: true # defaults to false, upgrades HTTP requests to HTTPS transport
72-
73-
when@dev:
74-
# disables the Content-Security-Policy header
75-
nelmio_security:
76-
csp:
77-
enabled: false

docs/usage/bom_import.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,12 @@ select the BOM file you want to import and some options for the import process:
3434
has a different format and does not work with this type.
3535
You can generate this BOM file by going to "File" -> "Fabrication Outputs" -> "Bill of Materials" in Pcbnew and save
3636
the file to your desired location.
37+
* **KiCAD Schematic BOM (CSV file)**: A CSV file of the Bill of Material (BOM) generated
38+
by [KiCAD Eeschema](https://www.kicad.org/).
39+
You can generate this BOM file by going to "Tools" -> "Generate Bill of Materials" in Eeschema and save the file to your
40+
desired location. In the next step you can customize the mapping of the fields in Part-DB, if you have any special fields
41+
in your BOM to locate your fields correctly.
42+
* **Generic CSV file**: A generic CSV file. You can use this option if you use some different ECAD software or wanna create
43+
your own CSV file. You will need to specify at least the designators, quantity and value fields in the CSV. In the next
44+
step you can customize the mapping of the fields in Part-DB, if you have any special fields in your BOM to locate your
45+
parts correctly.

makefile

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# PartDB Makefile for Test Environment Management
2+
3+
.PHONY: help test-setup test-clean test-db-create test-db-migrate test-cache-clear test-fixtures test-run dev-setup dev-clean dev-db-create dev-db-migrate dev-cache-clear dev-warmup dev-reset deps-install
4+
5+
# Default target
6+
help:
7+
@echo "PartDB Test Environment Management"
8+
@echo "=================================="
9+
@echo ""
10+
@echo "Available targets:"
11+
@echo " deps-install - Install PHP dependencies with unlimited memory"
12+
@echo ""
13+
@echo "Development Environment:"
14+
@echo " dev-setup - Complete development environment setup (clean, create DB, migrate, warmup)"
15+
@echo " dev-clean - Clean development cache and database files"
16+
@echo " dev-db-create - Create development database (if not exists)"
17+
@echo " dev-db-migrate - Run database migrations for development environment"
18+
@echo " dev-cache-clear - Clear development cache"
19+
@echo " dev-warmup - Warm up development cache"
20+
@echo " dev-reset - Quick development reset (clean + migrate)"
21+
@echo ""
22+
@echo "Test Environment:"
23+
@echo " test-setup - Complete test environment setup (clean, create DB, migrate, load fixtures)"
24+
@echo " test-clean - Clean test cache and database files"
25+
@echo " test-db-create - Create test database (if not exists)"
26+
@echo " test-db-migrate - Run database migrations for test environment"
27+
@echo " test-cache-clear- Clear test cache"
28+
@echo " test-fixtures - Load test fixtures"
29+
@echo " test-run - Run PHPUnit tests"
30+
@echo ""
31+
@echo " help - Show this help message"
32+
33+
# Install PHP dependencies with unlimited memory
34+
deps-install:
35+
@echo "📦 Installing PHP dependencies..."
36+
COMPOSER_MEMORY_LIMIT=-1 composer install
37+
@echo "✅ Dependencies installed"
38+
39+
# Complete test environment setup
40+
test-setup: deps-install test-clean test-db-create test-db-migrate test-fixtures
41+
@echo "✅ Test environment setup complete!"
42+
43+
# Clean test environment
44+
test-clean:
45+
@echo "🧹 Cleaning test environment..."
46+
rm -rf var/cache/test
47+
rm -f var/app_test.db
48+
@echo "✅ Test environment cleaned"
49+
50+
# Create test database
51+
test-db-create:
52+
@echo "🗄️ Creating test database..."
53+
-php bin/console doctrine:database:create --if-not-exists --env test || echo "⚠️ Database creation failed (expected for SQLite) - continuing..."
54+
55+
# Run database migrations for test environment
56+
test-db-migrate:
57+
@echo "🔄 Running database migrations..."
58+
php -d memory_limit=1G bin/console doctrine:migrations:migrate -n --env test
59+
60+
# Clear test cache
61+
test-cache-clear:
62+
@echo "🗑️ Clearing test cache..."
63+
rm -rf var/cache/test
64+
@echo "✅ Test cache cleared"
65+
66+
# Load test fixtures
67+
test-fixtures:
68+
@echo "📦 Loading test fixtures..."
69+
php bin/console partdb:fixtures:load -n --env test
70+
71+
# Run PHPUnit tests
72+
test-run:
73+
@echo "🧪 Running tests..."
74+
php bin/phpunit
75+
76+
test-typecheck:
77+
@echo "🧪 Running type checks..."
78+
COMPOSER_MEMORY_LIMIT=-1 composer phpstan
79+
80+
# Quick test reset (clean + migrate + fixtures, skip DB creation)
81+
test-reset: test-cache-clear test-db-migrate test-fixtures
82+
@echo "✅ Test environment reset complete!"
83+
84+
# Development helpers
85+
dev-setup: deps-install dev-clean dev-db-create dev-db-migrate dev-warmup
86+
@echo "✅ Development environment setup complete!"
87+
88+
dev-clean:
89+
@echo "🧹 Cleaning development environment..."
90+
rm -rf var/cache/dev
91+
rm -f var/app_dev.db
92+
@echo "✅ Development environment cleaned"
93+
94+
dev-db-create:
95+
@echo "🗄️ Creating development database..."
96+
-php bin/console doctrine:database:create --if-not-exists --env dev || echo "⚠️ Database creation failed (expected for SQLite) - continuing..."
97+
98+
dev-db-migrate:
99+
@echo "🔄 Running database migrations..."
100+
php -d memory_limit=1G bin/console doctrine:migrations:migrate -n --env dev
101+
102+
dev-cache-clear:
103+
@echo "🗑️ Clearing development cache..."
104+
php -d memory_limit=1G bin/console cache:clear --env dev -n
105+
@echo "✅ Development cache cleared"
106+
107+
dev-warmup:
108+
@echo "🔥 Warming up development cache..."
109+
php -d memory_limit=1G bin/console cache:warmup --env dev -n
110+
111+
dev-reset: dev-cache-clear dev-db-migrate
112+
@echo "✅ Development environment reset complete!"

0 commit comments

Comments
 (0)