byteface / domonic

Create HTML with python 3 using a standard DOM API. Includes a python port of JavaScript for interoperability and tons of other cool features. A fast prototyping library.
https://domonic.readthedocs.io/
MIT License
131 stars 13 forks source link

requirements upper bounds #47

Closed ShoGinn closed 2 years ago

ShoGinn commented 2 years ago

I've been enjoying your library, it has some of the better implementations in an easy to implement way (ex. _methods)

One thing I've noticed is that you have specified that your requirements are all static (requests/urllib for example).

Because your implementation of those requirements are not really integrated into your library, would it not make more sense to create a major version upper limit?

my rec:

requests~=2.26
urllib3~=1.26

Im of course ready to be corrected on this.

byteface commented 2 years ago

thanks. I just looked into what this means exactly. https://stackoverflow.com/questions/39590187/in-requirements-txt-what-does-tilde-equals-mean

I think it sounds like a great idea. if you want u can submit a pull request so it makes you a contributer. i assume that will also work in the setup.py file. I think it needs adding there as well for packaging.

do you know if install requires uses the same tilde?... i.e

  install_requires=[
      'requests==2.26.0', 'python-dateutil==2.8.2', 'urllib3==1.26.7', "elementpath==2.4.0"
  ],
byteface commented 2 years ago

"thanks so much. that's going to save me doing it in 2 places. also strange i never linted the setup.py file. good for spotting that one. I'm still in process of adopting the linting style as preference. I'll get it in the next release which will likely be within a week."

ShoGinn commented 2 years ago

"thanks so much. that's going to save me doing it in 2 places. also strange i never linted the setup.py file. good for spotting that one. I'm still in process of adopting the linting style as preference. I'll get it in the next release which will likely be within a week."

Have you considered using poetry and then incorporating tox to catch things like project linting as well as a tests factory?

I'm a bit bored I'll create a poetry branch and link it in a new issue for you to investigate at your leisure.

byteface commented 2 years ago

Hi. sadly poetry didn't work on the PC i tested it on. I have an open ticket on the poetry repo. no response with about 5 users with the same issue. I don't mind the makefile. but I have considered it. I was massively put off by it not working on PC. for me that's the only reason i could think it useful as I test the python versions via the github workflows. I'd be keen to see the setup. but can't promise i'll merge it if they can't fix they bug.

byteface commented 2 years ago

Im not saying no. I want tox and poetry. I have for about a year. But it did appear for PC users easier to install make with chocolately that make poetry work?... i'm willing to try again with guidance. i.e. your help. but i lost 3 hours last time. i have a poetry branch that went to shit 6 months ago. @ShoGinn

ShoGinn commented 2 years ago

Sorry to hear that, I'll take a look at your poetry repo ticket and see as well. Poetry has been a godsend for projects I've worked, pyproject.toml might still be a good way forward as well though (in general!)

I feel your pain on wasting time on essentially dependency management and package deployment! (I wasted my time on pipenv for a while)

byteface commented 2 years ago

ye. i have 2 bugs at the moment. the pc/mac can't run separate tests which stops me generating the coverage report automatically. these thigns i think poetry will fix.

ShoGinn commented 2 years ago

I'll hold off then for poetry (since why fix what isn't broken)

byteface commented 2 years ago

@ShoGinn the poetry bug i mentioned was here. https://github.com/python-poetry/poetry/issues/2746#issuecomment-955718400 but it's probably out of my depth to look into.

byteface commented 2 years ago

FYI, I was thinking @ShoGinn of using your poetry changes on https://github.com/byteface/htmlx/tree/master/htmlx and giving it another try. so thanks for making that version.