Skip to content

p_sync Milestone 1 (Pull operation + CLI + call and load overloads) #61

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

Draft
wants to merge 36 commits into
base: master
Choose a base branch
from

Conversation

AlePouroullis
Copy link
Contributor

@AlePouroullis AlePouroullis commented May 1, 2025

  • Create sync client with support for pulling files from the remote humanloop to local workspace). Includes filters for environment and path (where path can specify specific file or directory)
  • Create CLI with pull + history (shows last <=5 sync operations with some metadata) commands. Uses the click library
  • Overload .call() and .log() functions to use serialized contents of .prompt/.agent local files when use_local_files is set to true when initializing the humanloop client.
  • Address edge cases like specifying path + environment or path + version_id: warn the user that it bypasses the local file and uses the file from remote instead.
  • Cache files in memory after loading from disk using LRU cache
  • Integration tests for pulling and overloading (though needs a fair bit more work)

fern-api bot and others added 30 commits April 28, 2025 16:07
- Make local file access more explicit by throwing errors instead of silent fallbacks
- Add proper error handling for file not found and IO errors
- Improve version/environment handling with clear warnings
- Update docstrings to better document behavior

This change makes the behavior more predictable when use_local_files=True:
- Throws FileNotFoundError/IOError if local file can't be accessed
- Warns and uses remote when version_id/environment is specified
- No more silent fallbacks to remote API
@AlePouroullis AlePouroullis marked this pull request as draft May 1, 2025 16:29
@jamesbaskerville
Copy link
Contributor

think this needs a merge with master -- agents has gone in

pyproject.toml Outdated
@@ -1,13 +1,18 @@
[project]
name = "humanloop"
description = "The Humanloop Python Library"
authors = []
keywords = ["ai", "machine-learning", "llm", "sdk", "humanloop"]
Copy link
Contributor

Choose a reason for hiding this comment

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

don't think machine-learning is appropriate. where is this shown?

Copy link
Contributor Author

@AlePouroullis AlePouroullis May 2, 2025

Choose a reason for hiding this comment

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

These keywords aren't shown, only used for indexing and increasing discoverability.
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#keywords
But perhaps machine learning would not be a good idea. Can just remove this altogether. The main thing was adding the description so it doesn't just say None below the package name
Screenshot 2025-05-02 at 10 51 46

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.

3 participants