claudesync 0.3.3__tar.gz → 0.3.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {claudesync-0.3.3/src/claudesync.egg-info → claudesync-0.3.4}/PKG-INFO +1 -1
  2. {claudesync-0.3.3 → claudesync-0.3.4}/pyproject.toml +1 -1
  3. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync/cli/project.py +1 -1
  4. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync/cli/sync.py +2 -2
  5. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync/provider_factory.py +4 -3
  6. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync/providers/claude_ai.py +19 -16
  7. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync/utils.py +1 -0
  8. {claudesync-0.3.3 → claudesync-0.3.4/src/claudesync.egg-info}/PKG-INFO +1 -1
  9. {claudesync-0.3.3 → claudesync-0.3.4}/tests/test_utils.py +2 -1
  10. {claudesync-0.3.3 → claudesync-0.3.4}/LICENSE +0 -0
  11. {claudesync-0.3.3 → claudesync-0.3.4}/README.md +0 -0
  12. {claudesync-0.3.3 → claudesync-0.3.4}/setup.cfg +0 -0
  13. {claudesync-0.3.3 → claudesync-0.3.4}/setup.py +0 -0
  14. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync/__init__.py +0 -0
  15. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync/cli/__init__.py +0 -0
  16. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync/cli/api.py +0 -0
  17. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync/cli/main.py +0 -0
  18. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync/cli/organization.py +0 -0
  19. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync/config_manager.py +0 -0
  20. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync/exceptions.py +0 -0
  21. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync/providers/__init__.py +0 -0
  22. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync.egg-info/SOURCES.txt +0 -0
  23. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync.egg-info/dependency_links.txt +0 -0
  24. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync.egg-info/entry_points.txt +0 -0
  25. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync.egg-info/requires.txt +0 -0
  26. {claudesync-0.3.3 → claudesync-0.3.4}/src/claudesync.egg-info/top_level.txt +0 -0
  27. {claudesync-0.3.3 → claudesync-0.3.4}/tests/test_config_manager.py +0 -0
  28. {claudesync-0.3.3 → claudesync-0.3.4}/tests/test_provider_factory.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: claudesync
3
- Version: 0.3.3
3
+ Version: 0.3.4
4
4
  Summary: A tool to synchronize local files with Claude.ai projects
5
5
  Author-email: Jahziah Wagner <jahziah.wagner+pypi@gmail.com>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "claudesync"
7
- version = "0.3.3"
7
+ version = "0.3.4"
8
8
  authors = [
9
9
  {name = "Jahziah Wagner", email = "jahziah.wagner+pypi@gmail.com"},
10
10
  ]
@@ -63,7 +63,7 @@ def archive(config):
63
63
  if 1 <= selection <= len(projects):
64
64
  selected_project = projects[selection - 1]
65
65
  if click.confirm(
66
- f"Are you sure you want to archive '{selected_project['name']}'?"
66
+ f"Are you sure you want to archive '{selected_project['name']}'?"
67
67
  ):
68
68
  provider.archive_project(active_organization_id, selected_project["id"])
69
69
  click.echo(f"Project '{selected_project['name']}' has been archived.")
@@ -71,7 +71,7 @@ def sync(config):
71
71
  active_organization_id, active_project_id, remote_file["uuid"]
72
72
  )
73
73
  with open(
74
- os.path.join(local_path, local_file), "r", encoding="utf-8"
74
+ os.path.join(local_path, local_file), "r", encoding="utf-8"
75
75
  ) as file:
76
76
  content = file.read()
77
77
  provider.upload_file(
@@ -82,7 +82,7 @@ def sync(config):
82
82
  else:
83
83
  click.echo(f"Uploading new file {local_file} to remote...")
84
84
  with open(
85
- os.path.join(local_path, local_file), "r", encoding="utf-8"
85
+ os.path.join(local_path, local_file), "r", encoding="utf-8"
86
86
  ) as file:
87
87
  content = file.read()
88
88
  provider.upload_file(
@@ -3,6 +3,7 @@ from .providers.claude_ai import ClaudeAIProvider
3
3
 
4
4
  # Import other providers here as they are added
5
5
 
6
+
6
7
  def get_provider(provider_name=None, session_key=None):
7
8
  """
8
9
  Retrieve an instance of a provider class based on the provider name and session key.
@@ -12,9 +13,9 @@ def get_provider(provider_name=None, session_key=None):
12
13
  name is specified but not found in the registry, it raises a ValueError. If a session key is provided, it
13
14
  is passed to the provider class constructor.
14
15
 
15
- Args:
16
- provider_name (str, optional): The name of the provider to retrieve. If None, returns a list of available provider names.
17
- session_key (str, optional): The session key to be used by the provider for authentication. Defaults to None.
16
+ Args: provider_name (str, optional): The name of the provider to retrieve. If None, returns a list of available
17
+ provider names. session_key (str, optional): The session key to be used by the provider for authentication.
18
+ Defaults to None.
18
19
 
19
20
  Returns:
20
21
  object: An instance of the requested provider class if both provider_name and session_key are provided.
@@ -42,15 +42,21 @@ class ClaudeAIProvider:
42
42
 
43
43
  def _configure_logging(self):
44
44
  """
45
- Configures the logging level for the application based on the configuration.
46
- This method sets the global logging configuration to the level specified in the application's configuration.
47
- If the log level is not specified in the configuration, it defaults to "INFO".
48
- It ensures that all log messages across the application are handled at the configured log level.
49
- """
45
+ Configures the logging level for the application based on the configuration.
46
+ This method sets the global logging configuration to the level specified in the application's configuration.
47
+ If the log level is not specified in the configuration, it defaults to "INFO".
48
+ It ensures that all log messages across the application are handled at the configured log level.
49
+ """
50
50
 
51
- log_level = self.config.get("log_level", "INFO") # Retrieve log level from config, default to "INFO"
52
- logging.basicConfig(level=getattr(logging, log_level)) # Set global logging configuration
53
- logger.setLevel(getattr(logging, log_level)) # Set logger instance to the specified log level
51
+ log_level = self.config.get(
52
+ "log_level", "INFO"
53
+ ) # Retrieve log level from config, default to "INFO"
54
+ logging.basicConfig(
55
+ level=getattr(logging, log_level)
56
+ ) # Set global logging configuration
57
+ logger.setLevel(
58
+ getattr(logging, log_level)
59
+ ) # Set logger instance to the specified log level
54
60
 
55
61
  def login(self):
56
62
  """
@@ -98,19 +104,16 @@ class ClaudeAIProvider:
98
104
  Returns:
99
105
  list of dict: A list of dictionaries, each containing the 'id' and 'name' of an organization.
100
106
  """
101
- account_info = self._make_request("GET", "/bootstrap")
102
- if (
103
- "account" not in account_info
104
- or "memberships" not in account_info["account"]
105
- ):
107
+ organizations = self._make_request("GET", "/organizations")
108
+ if not organizations:
106
109
  raise ProviderError("Unable to retrieve organization information")
107
110
 
108
111
  return [
109
112
  {
110
- "id": membership["organization"]["uuid"],
111
- "name": membership["organization"]["name"],
113
+ "id": org["uuid"],
114
+ "name": org["name"],
112
115
  }
113
- for membership in account_info["account"]["memberships"]
116
+ for org in organizations
114
117
  ]
115
118
 
116
119
  def get_projects(self, organization_id, include_archived=False):
@@ -242,6 +242,7 @@ def validate_and_store_local_path(config):
242
242
  This function uses `click.prompt` to interact with the user, providing a default path (the current working directory)
243
243
  and validating the user's input to ensure it meets the criteria for an absolute path to a directory.
244
244
  """
245
+
245
246
  def get_default_path():
246
247
  return os.getcwd()
247
248
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: claudesync
3
- Version: 0.3.3
3
+ Version: 0.3.4
4
4
  Summary: A tool to synchronize local files with Claude.ai projects
5
5
  Author-email: Jahziah Wagner <jahziah.wagner+pypi@gmail.com>
6
6
  License: MIT License
@@ -54,7 +54,8 @@ class TestUtils(unittest.TestCase):
54
54
  self.assertIn("file1.txt", local_files)
55
55
  self.assertIn("file2.py", local_files)
56
56
  self.assertIn(os.path.join("subdir", "file3.txt"), local_files)
57
- self.assertEqual(len(local_files), 3) # Ensure ignored files not included
57
+ # Ensure ignored files not included
58
+ self.assertEqual(len(local_files), 3)
58
59
 
59
60
 
60
61
  if __name__ == "__main__":
File without changes
File without changes
File without changes
File without changes