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

feat: add api to serve files under repositories #851

Merged
merged 6 commits into from
Nov 24, 2023

Conversation

darknight
Copy link
Contributor

For closing #815

Changes include:

  • Add 2 public APIs
    • resolve for fetching file or dir info from local repository located at ~/.tabby/repositories/
    • meta for fetching dataset info from file ~/.tabby/dataset/files.jsonl
  • Add api spec doc

Please check ee/tabby-webserver/docs/api_spec.md for response examples.

@wsxiaoys wsxiaoys added this to the Tabby 0.7.0 milestone Nov 21, 2023
ee/tabby-webserver/docs/api_spec.md Outdated Show resolved Hide resolved
ee/tabby-webserver/docs/api_spec.md Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/lib.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/routes/repositories.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/routes/repositories.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/Cargo.toml Outdated Show resolved Hide resolved
ee/tabby-webserver/Cargo.toml Show resolved Hide resolved
ee/tabby-webserver/Cargo.toml Outdated Show resolved Hide resolved
@wsxiaoys wsxiaoys marked this pull request as draft November 21, 2023 23:47
@darknight darknight force-pushed the i815-repo-api branch 2 times, most recently from 8a34a3b to fa529c0 Compare November 22, 2023 14:36
Copy link
Member

@wsxiaoys wsxiaoys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly coding style / api style suggestions

crates/tabby-common/src/config.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/lib.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories/repo.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories/repo.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories/repo.rs Outdated Show resolved Hide resolved
Copy link
Member

@wsxiaoys wsxiaoys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

ee/tabby-webserver/src/repositories/resolve.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories/resolve.rs Outdated Show resolved Hide resolved
@darknight
Copy link
Contributor Author

Btw, the ci always failed on Install Rust step.

ee/tabby-webserver/src/repositories/resolve.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories/resolve.rs Outdated Show resolved Hide resolved
Copy link
Member

@wsxiaoys wsxiaoys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last round of nits!

ee/tabby-webserver/src/repositories/resolve.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories/resolve.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories/resolve.rs Outdated Show resolved Hide resolved
@wsxiaoys
Copy link
Member

Please also fix the ci

@wsxiaoys wsxiaoys marked this pull request as ready for review November 23, 2023 08:32
@darknight darknight force-pushed the i815-repo-api branch 2 times, most recently from 9c65bbf to b989ee7 Compare November 23, 2023 08:56
@darknight darknight closed this Nov 23, 2023
@darknight darknight reopened this Nov 23, 2023
ee/tabby-webserver/src/repositories.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories/resolve.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories/resolve.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories/resolve.rs Outdated Show resolved Hide resolved
@wsxiaoys wsxiaoys enabled auto-merge (squash) November 24, 2023 01:56
@wsxiaoys wsxiaoys merged commit e78cc1f into TabbyML:main Nov 24, 2023
5 checks passed
@darknight darknight deleted the i815-repo-api branch November 24, 2023 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants