-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add testplan to PyPI and npm to simplify install #284
Comments
This would also require us to set up some kind of release schedule & tagging of releases to upload to PyPI and npm. I think that definitely we should use the same version numbers for testplan python and testplan UI, and ideally have some mechanism to keep both in sync (e.g. python testplan 1.2.3 will by install testplan-ui 1.2.3 and not any other version). |
I've been experimenting with this a bit, so far I have seen the following small snags
What I am trying to do internally is to build the interactive interface as part of ci and package the built version inside the wheel, so that an user only needs to install the wheel and not install node etc. on his/her machine, the javascript/css and other components are just blobs as far as python is concerned. |
Hi @francoisverbeek , Thanks for the information. We have to improve the document. OverrideMeOrThereWillBeABuildError is used on the beta feature: URL navigation. Actually, we are considering to package the built version inside the wheel or add it to PyPI. |
Hi @yuxuan-ms, thank you! I've been changing OverrideMeOrThereWillBeABuildError to /api and it did the trick ; looking forward to having it nice and packaged with the ui all-prebuilt on pypi 👍 |
FYI, in case it helps, I figured out a good way to put together a python package with all the JS, HTML, CSS etc. files related to a web app in one of my personal projects. First of all, you need to add a MANIFEST.in file that directs the setup tooling to include the npm build outputs, for example: https://github.com/ryanc414/pytest_commander/blob/master/MANIFEST.in Secondly, you need to specify Then, you can access the data files from python code using the pkg_resources like: https://github.com/ryanc414/pytest_commander/blob/a6941788a98c0903c30f90abb340c612cec1b539/pytest_commander/api.py#L22 To build and publish the package, you need to remember to first build all the web client files before running setup.py to generate a wheel. I used a github action to run this automatically whenever I publish a new release: https://github.com/ryanc414/pytest_commander/blob/master/.github/workflows/python-publish.yml This gives a really nice UX since a user only has to run |
@ryanc414 Indeed that's what I'm doing now; makes me think that I I forgot to mention above that needed to add two things : add the |
I don't think you should need to manually remove any |
Currently, users have to install testplan directly from the github archive (or git clone the source), and run a separate script to build the UI from source. It would be great if we could leverage the standard python/JS package distribution services and make the Testplan python package installable from PyPI via
pip install testplan
and the UI installable from npm vianpm install -g testplan-ui
.Potentially the setup.py could automatically run the npm install command, making the entire install as simple as
pip install testplan
- though possibly it's better to leave the UI install as a separate step, so that users who don't want the UI can install just the Python Testplan framework.The text was updated successfully, but these errors were encountered: