Repository navigation
Replies: 17 comments 33 replies
|
FYI: I'm working towards full database integration, following the QElectroTech code redesign document. This is my bible! It's a much bigger job than I ever imagined, but AI is learning at a great pace. Until now, I've been testing against the 25 or so sample drawings. Yesterday, we hit a bug caused by a drawing that contained features not covered by our existing samples. AI has learned from that mistake, and we've taken things a step further. We've now downloaded every sample file uploaded to the forum and are using them to build a much more comprehensive test bench. I've spent most of today going back and forth, fixing bugs and preparing for the database upgrade. There's still plenty to do, but we're making progress. Why, you might ask? In my opinion, we need to get the database sorted first. It's the foundation we'll need to build some really cool features on top of it. Please use the supplied converter to test your own projects and check for any compatibility issues. Your feedback will help us find problems before the database upgrade goes any further. |
|
Only negative side I can think of is using KArchive, the dependency of KF libraries have been discussed for a long time. See issue #907 I propose using libzip directly (KArchive probably uses it anyway): https://github.com/nih-at/libzip/tree/main Also, lzma is already in https://github.com/qelectrotech/qelectrotech-source-mirror/tree/master/sources/import/edz/lzma |
+1 |
Where is the boundary? Is a label engineering data or drawing data? It’s an element info value, but its text item has a position, font and rotation. The same goes for conductor numbers shown on a wire, cable data shown on a sheet, and terminal-strip entries. “Engineering data” needs a definition before it can be stored separately. Version refusal doesn’t need a DB. “A newer .qetz is refused with a clear message” is a manifest feature: a format version plus a minimum-reader-version field in the zip. That works just as well with XML inside. Allowing older versions to open newer files read-only, or with a warning, may be friendlier than a hard refusal. Also I am not convinced that one has to get rid of the old format completely. If you look at ODF or OOXML they also have a "flat" version where the binaries are still base64 serialized. The problem in the moment is that the xml export is all over the place. For me there are three layers:
Today toXml/fromXml is spread over many classes. A small interface with one serializer per type, registered centrally, lets the legacy .qet and .qetz simply be two writers of the same data. The binaries are probably the main selling point and elements/titleblocks avoiding xml escape constructions. What about a structure like this (Claude helped me): XML references the hash (plus original name, type); the hash is checked on load to allow to use two versions in one project. Unused media are removed on save (garbage cleaner). Elements and title blocks become ordinary files which they are already today. Hashes in the manifest let QET detect when a project copy differs from the collection. The version manifest is used for: a newer file is refused or opened with a warning, instead of data being silently dropped or having to deduced from the presents of certain xml keys which version it could be. |
|
Thanks — agreed on dropping KArchive, given #907. One thing on the LZMA code: what's in I measured the compression methods on the 302 projects attached to the forum (126 MB as
The best saves 13 % over Deflate, and unpacking is about 2 ms per project either way. Deflate is the only one Windows Explorer, macOS Finder and every unzip tool open, and it's what ODF and For the library I'd suggest miniz: one |
|
Recommendation for the
Why:
|
|
I think Qetz will only be useful for images or embedded PDFs; users are using more and more images in their projects, and Base64 encoding and decoding on XML .qet really slows down a very large project with a lot of pictures. I suggest we stick to these two files – ‘pictures’ and ‘PDF import’ – and if everyone’s OK with that, we don’t even need to wait for the next release. |
|
AI is 80% though the build and it is massive Lets see what it comes up with, try it out. Don't like it try something else. |
|
Hello everyone, Thank you for all your work on this important evolution of QElectroTech! I'll be following the progress of this project with great interest, especially regarding the possibilities it could bring to residential electrical installations. I previously suggested introducing a TAG system for elements, allowing users to classify and search for symbols by function, field of application, or applicable standards (RGIE, IEC, etc.), without changing the existing library structure. I wonder whether this new data storage architecture could also make such a feature easier to implement in the future. Thanks again to everyone for your dedication and contributions! |
|
In theory this is the base for everything........ At the moment all data is stored on the XML file (This is how electrial autoCAD works) It trying to move this to a SQL database (This is how EPLAN works) Once we have a place to store data the sky is the limit for features I underestiamed how big this project is im about 2/3 throught the total build. On the plus side it will be transperiant to most users, they will not notice any difference. Backwards compatable is very hard |
|
Yes, by design. XML now holds the drawings, and the database holds the engineering data. Inside a .qetz (format 3):
Plain .qet files: still the single XML file they always were. They open forever, and "Save a copy for an older QElectroTech" writes one. Why keep XML for drawings: it matches Joshua's split (the database for engineering data, the folio XML for where the ink goes). The drawings stay readable and diffable, and old files keep working. Putting the drawings themselves into SQLite is listed under "Avoid" in the plan. |
|
Everything on the plan is built. It isn't quite ready to push, and I wouldn't send it as one PR. What's left before pushing:
Earlier runs on almost the same code all passed, including the 342-project gates, but this last one isn't confirmed yet. Is it a big PR? Yes, very. At the last count (before today's additions) it was:
Today's work (wire edits by uuid, D3b, the MCP server support, the test fix) adds more on top, so it's probably 8,000+ lines of QElectroTech's own code now. I haven't recounted. It touches loading, saving, the project database, the scripting interface and the file format all at once. |
|
The work is now up as three PRs, overview in #1464:
|
|
Why are basically all fields TEXT? E.g. element / freezeLabel is a TEXT which writes "false" instead of a BOOLEAN. |
|
@arummler can you review with the updates I addessed as many concerns as i could. A couple very big projects so i have left them for now. |
|
https://www.sqlite.org/howtocorrupt.html |
Uh oh!
There was an error while loading. Please reload this page.
In #865 scorpio810 said he was "very ok" with a zipped
.qetzfile, as inJoshua's roadmap note. Before anyone writes C++ for it, I built a
converter outside QElectroTech to check one thing: can every old project
go into the new file and come back without losing anything?
The new file would be a zip holding:
information, symbol information, coil–contact links, wires (ends,
number, colour, section, cable);
(pictures no longer base64).
I tried it on 38 projects: the 25 examples, 9 bugtracker
attachments made with QElectroTech 0.4 to 0.100, and 4 GitHub attachments
(the largest has 148 folios). Converted to
.qetzand back:resaves the original; the 38th it cannot resave the same way twice even
without the converter (a separate bug I will report on its own);
.qetbecame 9.3 MB of.qetz.What it would mean for users: old
.qetfiles keep opening for ever, theold file is never overwritten, and Save a copy for an older
QElectroTech writes a normal
.qet. A.qetzfrom a newer version isrefused with a clear message instead of opened with data silently missing,
which is what happens to new data in old versions today.
Questions, each with what I would do if nobody minds:
.qetz?the zip with today's XML still in charge?
version cannot drop (Where QET stores cable data: a short agreement before more cable tools are built #1288)?
.qetzbefore any release saves it by default?
them? It runs on your own computer and sends nothing.
Converter and full results: https://github.com/ispyisail/qelectrotech-source-mirror/tree/qet-container-converter
All reactions