Domonic

Latest version: v0.9.12

Safety actively analyzes 682244 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 17

0.6.1

Arrays have been juiced up a bit.

I often rush ahead and just print stubs with weak assumptions in the code. Then come back later and unit test properly.

Anything printing to the console when tests runs is basically bad as it means it's not got an assertion yet.

I began fixing up js array unit tests but somehow got sucked into making a start on the ArrayBuffers and Typed Arrays. Typical.

They may not work propery I don't yet have use cases for them. But they are passing initial tests. They were a port of a shim however I may be able to swap out some byte calls to use stuct. Will test more later as I find some use cases. i.e. parsing something.

The existing Javascript Array will now relay any missing method calls to the native python one. so you get the best of both.

The docs have also had a bit of a refresh. It's worth cloning the repo just for the sphinx template ;)

Also some good tips on parsing can be found in the ticket for parsers after a question from a user.

0.6.0

Added pretty printing via the format dunder

so you can:

print(f"mydom")

for a better looking output.

this is useful as gives us mulitple ways to output and without breaking any existing implementations.

Talking of breaking existing implementations. most tag languages are now being moved to xml pacakges.

So lots of the cool stuff basically now lives in xml instead. from sitemap generation to 3d worlds. it's all in the xml folder.

Docs gets 3-4 times more traffic that the repo. So if anyone likes writing documentation get in touch. Same goes for unit tests.

More dom methods added making further compatibility with other things.

0.5.1

Slots added by contributer Jordan-Cottle

__enter__ added to tag with context attribute to build with. So you can do this...

d = html()
with d:
with head():
div()
with body():
div()
print('DONE!')

oh and also __pyml__ added as a way to render template from a document.
you can go render(mydoc, 'output.pyml', 'pyml') to get a dump. will be buggy as only just started it and not test for it yet.

The other big excitement since last build was connecting to a decent parser and tree builder too. so check out the notes on the 'parser' issue ticket if you're interested.

0.5.0

More DOM classes started i.e. DocumentType, TextNode change to Text etc few others stubbed out.

As domonic started as a tag builder faking a few dom methods, it is now evolved a lot more than that as I integrate things like d3 and expatBuilder it has to perform more like a regular DOM so have been plumbing in more parts.

Attr upgraded a bit and method around namepaces etc.

The create_element methods on dom and html now check first if there is an existing tag. not sure how to access module methods so doing it via a globals lookup on that module which seems to work i think.

ParseString is started but you probably shouldn't use unless for really strict xml type documents. But it may be better than my parser for basic stuff and is helping drive the DOM so is there to tinker with.

Likely to be lots of bugs on new features as its a very stubby commit. As always don't trust undocumented features.

Assertions added to make it a bit more reliable to change things and to quieten the tests a bit.

0.4.8

mostly d3. working hard to get selection working. still very buggy. but the working parts are certainly powerful and it's hepling to drive the development of the DOM and the javascript modules.

new window module due to the componentregistry. i find this of most interest at the momet as I've been looking for various ways to bind custom componenets over sockets and that seems like a potential for one that has it's class registered on the server side. so could be an area for play or investigation.

there's a new downstream repo called esx for the javascript only. But it's worth pointing out that domonic is only 1mb uncompressed as a total package. 'esx' is downstream from this one and will only be updated irregularly. If it becomes popular it could feed this one. but for now it will be this way around.

updated docs. DOCS GET 2-4x more traffic than the repo. So updating the docs is almost now more 2-4x more important than coding. As you can write code but if no-one knows it's there or what it can do there's not much point.

also finally fixed my linting issue that was stopping 'typing' from correctly syntax coloring. I basically had too many python linting packages installed and all fighting with each other. So you may see more type hinting appear when I'm feeling useless and unable to code and just want to piss around the edges of things padding it out and being a pedantic prick. I'm take it or leave it with typing (as I come from languages with it). So It's not a strict design design by me to omit or use them.

I feel it's getting better all the time. Never too late to start contributing. I'm still less than half way complete and that's taken over a year. So always a good time to send a pull request.

0.4.7

been a long time coming for these 2 methods. I can't take the credit this time. I've been avoiding them after the time it took me to do setInterval.

But many thanks to Jordan Cottle for being brave enough to wade through my mess of badly done tests to add some very cool stuff!! I learned a lot from that push also in the unit tests, so thanks.

What I also did was register all the global methods onto the module. Not sure how that will go down with people that import * but I figured it was nice to have those in 3 places. window. Global and just.. there. anyway, maybe window could extend global??...

hope you enjoy the 2 javascript classics!

Page 6 of 17

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.