diffpy.apps 0.1.0rc3__tar.gz → 0.1.1rc0__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 (33) hide show
  1. {diffpy_apps-0.1.0rc3/src/diffpy.apps.egg-info → diffpy_apps-0.1.1rc0}/PKG-INFO +10 -1
  2. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/README.rst +9 -0
  3. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/pyproject.toml +2 -2
  4. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/src/diffpy/apps/app_agentify.py +20 -0
  5. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0/src/diffpy.apps.egg-info}/PKG-INFO +10 -1
  6. diffpy_apps-0.1.1rc0/src/diffpy.apps.egg-info/entry_points.txt +3 -0
  7. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/tests/test_agentify.py +7 -1
  8. diffpy_apps-0.1.0rc3/src/diffpy.apps.egg-info/entry_points.txt +0 -3
  9. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/AUTHORS.rst +0 -0
  10. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/LICENSE.rst +0 -0
  11. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/MANIFEST.in +0 -0
  12. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/requirements/build.txt +0 -0
  13. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/requirements/conda.txt +0 -0
  14. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/requirements/docs.txt +0 -0
  15. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/requirements/pip.txt +0 -0
  16. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/requirements/tests.txt +0 -0
  17. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/setup.cfg +0 -0
  18. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/src/diffpy/__init__.py +0 -0
  19. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/src/diffpy/apps/__init__.py +0 -0
  20. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/src/diffpy/apps/app_runmacro.py +0 -0
  21. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/src/diffpy/apps/apps.py +0 -0
  22. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/src/diffpy/apps/pdfadapter.py +0 -0
  23. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/src/diffpy/apps/version.py +0 -0
  24. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/src/diffpy.apps.egg-info/SOURCES.txt +0 -0
  25. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/src/diffpy.apps.egg-info/dependency_links.txt +0 -0
  26. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/src/diffpy.apps.egg-info/requires.txt +0 -0
  27. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/src/diffpy.apps.egg-info/top_level.txt +0 -0
  28. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/tests/conftest.py +0 -0
  29. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/tests/data/Ni.cif +0 -0
  30. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/tests/data/Ni.gr +0 -0
  31. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/tests/helper.py +0 -0
  32. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/tests/test_pdfadapter.py +0 -0
  33. {diffpy_apps-0.1.0rc3 → diffpy_apps-0.1.1rc0}/tests/test_runmacro.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: diffpy.apps
3
- Version: 0.1.0rc3
3
+ Version: 0.1.1rc0
4
4
  Summary: User applications to help with tasks using diffpy packages
5
5
  Author-email: Yuchen Xiao <yx2924@columbia.edu>, Simon Billinge <sbillinge@ucsb.edu>
6
6
  Maintainer-email: Yuchen Xiao <yx2924@columbia.edu>, Simon Billinge <sbillinge@ucsb.edu>
@@ -102,6 +102,15 @@ The output should print the latest version displayed on the badges above.
102
102
 
103
103
  If the above does not work, you can use ``pip`` to download and install the latest release from
104
104
  `Python Package Index <https://pypi.python.org>`_.
105
+
106
+ You still need to install some of its dependencies from ``conda`` ::
107
+
108
+ git clone https://github.com/diffpy/diffpy.apps.git
109
+ cd diffpy.apps
110
+ conda activate diffpy.apps_env
111
+ conda install --file requirements/conda.txt
112
+
113
+
105
114
  To install using ``pip`` into your ``diffpy.apps_env`` environment, type ::
106
115
 
107
116
  pip install diffpy.apps
@@ -72,6 +72,15 @@ The output should print the latest version displayed on the badges above.
72
72
 
73
73
  If the above does not work, you can use ``pip`` to download and install the latest release from
74
74
  `Python Package Index <https://pypi.python.org>`_.
75
+
76
+ You still need to install some of its dependencies from ``conda`` ::
77
+
78
+ git clone https://github.com/diffpy/diffpy.apps.git
79
+ cd diffpy.apps
80
+ conda activate diffpy.apps_env
81
+ conda install --file requirements/conda.txt
82
+
83
+
75
84
  To install using ``pip`` into your ``diffpy.apps_env`` environment, type ::
76
85
 
77
86
  pip install diffpy.apps
@@ -51,8 +51,8 @@ exclude = [] # exclude packages matching these glob patterns (empty by default)
51
51
  namespaces = false # to disable scanning PEP 420 namespaces (true by default)
52
52
 
53
53
  [project.scripts]
54
- "diffpy.apps" = "diffpy.apps.apps:main"
55
- "diffpy.app" = "diffpy.apps.apps:main"
54
+ "diffpy-apps" = "diffpy.apps.apps:main"
55
+ "diffpy-app" = "diffpy.apps.apps:main"
56
56
 
57
57
  [tool.setuptools.dynamic]
58
58
  dependencies = {file = ["requirements/pip.txt"]}
@@ -1,4 +1,5 @@
1
1
  import shutil
2
+ import socket
2
3
  import subprocess
3
4
  import tempfile
4
5
  from pathlib import Path
@@ -7,7 +8,26 @@ REPO_URL = "https://github.com/diffpy/cmi-agent-skills"
7
8
  DIR_NAME = "cmi-skill"
8
9
 
9
10
 
11
+ def ensure_setup():
12
+ def internet_available():
13
+ try:
14
+ socket.create_connection(("github.com", 443), timeout=3)
15
+ return True
16
+ except OSError:
17
+ return False
18
+
19
+ git_available = shutil.which("git") is not None
20
+ agentify_available = internet_available() and git_available
21
+ return agentify_available
22
+
23
+
10
24
  def agentify(args):
25
+ if not ensure_setup():
26
+ raise ValueError(
27
+ "Internet connection or git unavailable. "
28
+ "Please ensure git is installed and you have an active internet "
29
+ f"connection to {REPO_URL}."
30
+ )
11
31
  agent = args.agent
12
32
  system_flag = args.system
13
33
  if agent == "claude":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: diffpy.apps
3
- Version: 0.1.0rc3
3
+ Version: 0.1.1rc0
4
4
  Summary: User applications to help with tasks using diffpy packages
5
5
  Author-email: Yuchen Xiao <yx2924@columbia.edu>, Simon Billinge <sbillinge@ucsb.edu>
6
6
  Maintainer-email: Yuchen Xiao <yx2924@columbia.edu>, Simon Billinge <sbillinge@ucsb.edu>
@@ -102,6 +102,15 @@ The output should print the latest version displayed on the badges above.
102
102
 
103
103
  If the above does not work, you can use ``pip`` to download and install the latest release from
104
104
  `Python Package Index <https://pypi.python.org>`_.
105
+
106
+ You still need to install some of its dependencies from ``conda`` ::
107
+
108
+ git clone https://github.com/diffpy/diffpy.apps.git
109
+ cd diffpy.apps
110
+ conda activate diffpy.apps_env
111
+ conda install --file requirements/conda.txt
112
+
113
+
105
114
  To install using ``pip`` into your ``diffpy.apps_env`` environment, type ::
106
115
 
107
116
  pip install diffpy.apps
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ diffpy-app = diffpy.apps.apps:main
3
+ diffpy-apps = diffpy.apps.apps:main
@@ -6,7 +6,13 @@ from unittest import mock
6
6
 
7
7
  import pytest
8
8
 
9
- from diffpy.apps.app_agentify import agentify
9
+ from diffpy.apps.app_agentify import agentify, ensure_setup
10
+
11
+ pytestmark = pytest.mark.skipif(
12
+ not ensure_setup(),
13
+ reason="Internet connection or git unavailable. Skipping agentify tests.",
14
+ allow_module_level=True,
15
+ )
10
16
 
11
17
 
12
18
  @pytest.mark.parametrize(
@@ -1,3 +0,0 @@
1
- [console_scripts]
2
- diffpy.app = diffpy.apps.apps:main
3
- diffpy.apps = diffpy.apps.apps:main
File without changes