-
Notifications
You must be signed in to change notification settings - Fork 13
Conversation
Hi @danmarshall !
What is your take on this @z3dev ? |
@danmarshall I believe that another such request has been made for the website, so obviously such a call back would be necessary. I think this would be the JavaScript way to implement such functionality. Some formats provide an indication of 'size' so a progress would be possible. For STL, I would guess that file size could be used to approximate the number of faces. |
Thanks @kaosat-dev & @z3dev ! I renamed the property to Should I also add it to de-serializers? |
@danmarshall Please make the changes to both serializers and deserializers. Let us know if you have any questions. |
OK, this is code complete. Some of the deserializers which parse xml are event based, so we don't really know the percentage complete. But at least we have 0% - 50% - 100% for everything minimally. I wasn't able to run the ava test suite. Is there another way to test this? |
@kaosat-dev @z3dev can you take a look? :) |
Thanks for all the additions @danmarshall !
Did you try |
Looks fine. @danmarshall thanks for the quick turnaround! |
On a separate, clean clone, I get an error running the tests:
|
@kaosat-dev @z3dev it seems like we need a test for the dxf serializer first. |
Don't bother now, as I'm working on the deserializer at the moment, and will revisit the serialzer next. |
@danmarshall as @z3dev do not worry about the dxf serializer , but please add some very simple tests for the callback system for those who already have some unit tests (I think in most cases you can just copy / paste tests, and just check if the callback is fired correctly). Then we can merge :) Btw in test.cb(t => {
t.plan(1) // how many checks
someAsyncFunction(() => {
t.pass()
t.end() // will not work without this
});
}) |
Hi guys, I'm not able to get any of the ava tests to run. I don't think it's specific to the dxf-serializer project. Even if I go into the amf-serializer project, I get:
of course, I first needed to Can you try a clean install and see if any of the tests works for you? |
@danmarshall are you getting the same errors when running |
Basically since all the repos are interconnected, |
(Yet another) fresh clone - I get the same result as I did above. |
damn, sorry @danmarshall, I have no Windows machine to test it on , and the ava testing paths are simple enough './test.j' ... |
Or, you can clone my fork, and run the tests on your machine. That would give us both a better sense of confidence :) |
haha yes that is a good option indeed ;) but let us not forget Travis CI seems to think it is all good so far, as all tests are passing there ! |
Seems like the problem might be between lerna and ava. Since lerna is the manager, and there seems to be an open issue in ava about cwd. |
ok, added a test for progress status callback 🤠 |
Ok will merge & release and add the rest of the tests. |
btw @danmarshall are you planning of using the modules in this repo directly or the openjscad package ? |
@kaosat-dev thanks!! I am planning on using the individual modules directly. I also may use the UI Viewer alone without the Processor. |
Hello,
I just wanted to get your thoughts on support for a status callback. This can allow scenarios which can inform what the worker is doing - such as updating a percent complete.
I've only added it to STLASCII, but if you like this idea I can do it to each format.
Serializers:
Deserializers: