-
Notifications
You must be signed in to change notification settings - Fork 31
PoC for ragna-base package with just base dependencies
#405
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
Closed
Closed
Changes from 22 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
96297b8
Update pyproject.toml: to add dynamic optional dependencies
arjxn-py 960a2c8
Merge branch 'main' into ragna-base-poc
arjxn-py f9b8c39
Add concurrent `setup.py` with almost same configurations as `pyproje…
arjxn-py 65753f1
Use multiple pyproject in `scripts/` and wrap it inside nox to build …
arjxn-py aa565b8
Merge branch 'main' into ragna-base-poc
arjxn-py 3201c1f
Also add pyproject in root for CI build and testing
arjxn-py 551924d
Ignore semver warning in pyproject (this change was overlooked while …
arjxn-py a1a4f4f
Use `setup.py` as shim
arjxn-py 12ac91f
Add some helping logging points in `setup`
arjxn-py ca5f58b
Add basic workflow to test build
arjxn-py 43c2ec8
Use pipdeptree to visualise dependency tree of built package
arjxn-py 75a040d
Merge branch 'Quansight:main' into ragna-base-poc
arjxn-py 6c8f614
Temporarily run build workflow on PRs
arjxn-py 05411b7
Build package with `nox` in workflow
arjxn-py 0028f4e
Fix syntax error in workflow
arjxn-py fab9c7d
Delete splitted pyprojects & Switch to traditional build for now
arjxn-py c396b55
Try using pipx to build package
arjxn-py bd65487
Get rid of `noxfile` & `setup` try using helper script instead
arjxn-py 7a36ba5
Merge branch 'main' into ragna-base-poc
arjxn-py 241fab5
Fix dependency conflicts for docker build
arjxn-py 855025d
Try fixing docker lockfile dailure
arjxn-py f042769
Modity `update_optional_dependencies` to update `requirements.txt`
arjxn-py a7c9a01
Apply suggestions from code review
arjxn-py 2e70229
Modify `update_requirements_txt` -> `create_requirements_txt`
arjxn-py 9b0f1c2
Bump `setuptools` & `setuptools_scm`
arjxn-py ba60010
Merge branch 'main' into ragna-base-poc
arjxn-py ed1cfde
Replace base dependencies in `requirements.txt` by `ragna-base`
arjxn-py 079093e
Merge branch 'main' into ragna-base-poc
arjxn-py File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: Build Package | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - release/* | ||
|
|
||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| package: | ||
| - ragna | ||
| - ragna-base | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.10" | ||
|
|
||
| - name: Install build dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install build toml | ||
|
|
||
| - name: Modify pyproject.toml | ||
| run: python scripts/build_helper.py ${{ matrix.package }} | ||
|
|
||
| - name: Build distribution | ||
| run: | | ||
| echo "Building package: ${{ matrix.package }}" | ||
| python -m build | ||
| echo "Build complete for ${{ matrix.package }}" | ||
|
|
||
| - name: Verify package | ||
| run: | | ||
| echo "Verifying package: ${{ matrix.package }}" | ||
| pip install dist/*.whl | ||
| pip check | ||
|
|
||
| - name: Visualize dependency tree of built package | ||
| run: | | ||
| pip install pipdeptree | ||
| pipdeptree -d 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| aiofiles | ||
| emoji | ||
| fastapi | ||
| httpx | ||
| importlib_metadata>=4.6; python_version<'3.10' | ||
| packaging | ||
| panel==1.4.2 | ||
| pydantic>=2 | ||
| pydantic-core | ||
| pydantic-settings>=2 | ||
| PyJWT | ||
| python-multipart | ||
| redis | ||
| questionary | ||
| rich | ||
| sqlalchemy>=2 | ||
| starlette | ||
| tomlkit | ||
| typer | ||
| uvicorn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| aiofiles | ||
| emoji | ||
| fastapi | ||
| httpx | ||
| importlib_metadata>=4.6; python_version<'3.10' | ||
| packaging | ||
| panel==1.4.2 | ||
| pydantic>=2 | ||
| pydantic-core | ||
| pydantic-settings>=2 | ||
| PyJWT | ||
| python-multipart | ||
| redis | ||
| questionary | ||
| rich | ||
| sqlalchemy>=2 | ||
| starlette | ||
| tomlkit | ||
| typer | ||
| uvicorn | ||
| chromadb>=0.4.13 | ||
| httpx_sse | ||
| ijson | ||
| lancedb>=0.2 | ||
| pyarrow | ||
| pymupdf>=1.23.6 | ||
| python-docx | ||
| python-pptx | ||
| tiktoken |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import toml | ||
|
|
||
|
|
||
| def modify_pyproject(package_name): | ||
| with open("pyproject.toml", "r") as f: | ||
| pyproject_data = toml.load(f) | ||
|
|
||
| pyproject_data["project"]["name"] = package_name | ||
|
|
||
| if package_name == "ragna-base": | ||
| pyproject_data["tool"]["setuptools"]["dynamic"]["dependencies"] = { | ||
arjxn-py marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "file": ["requirements-base.txt"] | ||
| } | ||
| else: | ||
| pyproject_data["tool"]["setuptools"]["dynamic"]["dependencies"] = { | ||
| "file": ["requirements.txt"] | ||
| } | ||
arjxn-py marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| with open("pyproject.toml", "w") as f: | ||
| toml.dump(pyproject_data, f) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| import sys | ||
arjxn-py marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| package_name = sys.argv[1] | ||
| if package_name not in ["ragna", "ragna-base"]: | ||
| print("Invalid package name. Must be 'ragna' or 'ragna-base'.") | ||
| sys.exit(1) | ||
| modify_pyproject(package_name) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.