Skip to content
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

changed: packaging for publishing #2245

Merged
merged 3 commits into from
May 22, 2024
Merged

changed: packaging for publishing #2245

merged 3 commits into from
May 22, 2024

Conversation

tcztzy
Copy link
Contributor

@tcztzy tcztzy commented May 14, 2024

…d relative.

Pull Request Checklist

  • Target branch: Pull requests should target the dev branch.
  • Description: Briefly describe the changes in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests for the changes?
  • Code Review: Have you self-reviewed your code and addressed any coding standard issues?

Description

Packaging open-webui as a Python package with minimum modification. It is not rye-only, any package support PEP 517 can build and package at the root of this project.

I also noticed that openwebui is currently not token in pypi.org, maybe it is a better choice?

after packaging and publishing to pypi, we can declare namespace package as plugin system, then langchain agent support could be easily implemented.


Changelog Entry

Added

  • Python packaging

Changed

  • Use file relative (relative path to backend/config.py) instead of pwd relative path in backend/config.py, so it can start backend at the root directory of this project.

Additional Information

  • now we can produce the wheel file and sdist for publishing
$ rye build   # file will place at dist/
$ rye publish  # after you config pypi account, you can upload the backend file to Pypi.org
  • backend/requirements.txt, backend/dev.sh, backend/start.sh and backend/start_windows.bat now can be removed, but weather delete them or not is depend on you.

@tcztzy
Copy link
Contributor Author

tcztzy commented May 14, 2024

related to #1885

@tjbck
Copy link
Contributor

tjbck commented May 16, 2024

@tcztzy Are you on our discord server? I'd prefer to setup a high bandwidth communication channel to configure this.

@tcztzy
Copy link
Contributor Author

tcztzy commented May 17, 2024

@tcztzy Are you on our discord server? I'd prefer to setup a high bandwidth communication channel to configure this.

OK, now I login in discord as tcztzy

@tcztzy
Copy link
Contributor Author

tcztzy commented May 20, 2024

Now I realize following features:

  1. pip install open-webui && open-webui serve
  2. Add a ci.yml github workflow, every time main branch has pull event, it will release to pypi.org.

@tcztzy tcztzy changed the title changed: packaging using rye and use file relative path instead of pw… changed: packaging for publishing May 20, 2024
@tjbck tjbck added this to the v1.0 milestone May 21, 2024
@tjbck tjbck added the help wanted Extra attention is needed label May 21, 2024
@mak448a
Copy link
Contributor

mak448a commented May 22, 2024

You may want to claim both open-webui and openwebui just in case someone decides to post malware to pypi.

@tjbck
Copy link
Contributor

tjbck commented May 22, 2024

I'll merge this for now, Thanks!

@tjbck tjbck merged commit e645679 into open-webui:dev May 22, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants