ipyvizzu
ipyvizzu copied to clipboard
separate lib, ipyvizzu, streamlit modules - multiple packages
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
@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?
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).
@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
@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.