ipyvizzu icon indicating copy to clipboard operation
ipyvizzu copied to clipboard

separate lib, ipyvizzu, streamlit modules - multiple packages

Open veghdev opened this issue 2 years ago • 4 comments

Working draft for lib separation.

  • [ ] review python code
  • [x] fix unit tests
  • [x] separate and expand unit tests
  • [ ] update doc
  • [x] fix release wf
  • [ ] define final names of lib and stpyvizzu

veghdev avatar May 23 '22 16:05 veghdev

@nyirog I created a working prototype to separate the "lib" code and integrate "ipyvizzu" into streamlit. Could you please review and add some tips to improve it?

veghdev avatar May 24 '22 15:05 veghdev

I refactored a bit, now, the lib can be used itself (not an abstract class). It generates a valid html code, which can be displayed in a browser (if chart.show()'s return value will be saved into a html file).

veghdev avatar May 29 '22 14:05 veghdev

@nyirog python -m build can not handle multiple setup calls in the setup.py. I found a solution - check sys.argv in setup.py and select package, see the examples below (but I don't know is this the best?)

python setup.py install   # install the lib
python setup.py install --ipyvizzu
python setup.py install --stpyvizzu

python setup.py sdist bdist_wheel
python setup.py sdist bdist_wheel --ipyvizzu
python setup.py sdist bdist_wheel --stpyvizzu

veghdev avatar Jun 01 '22 13:06 veghdev

@nyirog python -m build can not handle multiple setup calls in the setup.py. I found a solution - check sys.argv in setup.py and select package, see the examples below (but I don't know is this the best?)

python setup.py install   # install the lib
python setup.py install --ipyvizzu
python setup.py install --stpyvizzu

python setup.py sdist bdist_wheel
python setup.py sdist bdist_wheel --ipyvizzu
python setup.py sdist bdist_wheel --stpyvizzu

I have to drop this solution, because can not be able to install packages from the created tar.gz files.

The other solution is the install and release make targets create a PKG.cfg file (which is under gitignore) and write the selected package name into it. setup.py reads the content of PKG.cfg and select the actual package.

veghdev avatar Jun 05 '22 09:06 veghdev