mine 4.2.2__tar.gz → 4.3__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 (32) hide show
  1. {mine-4.2.2 → mine-4.3}/PKG-INFO +13 -12
  2. {mine-4.2.2 → mine-4.3}/README.md +1 -1
  3. {mine-4.2.2 → mine-4.3}/mine/manager.py +14 -2
  4. {mine-4.2.2 → mine-4.3}/mine/models/data.py +0 -1
  5. {mine-4.2.2 → mine-4.3}/mine/tests/conftest.py +16 -0
  6. {mine-4.2.2 → mine-4.3}/mine/tests/test_cli.py +2 -0
  7. {mine-4.2.2 → mine-4.3}/mine/tests/test_manager.py +10 -3
  8. {mine-4.2.2 → mine-4.3}/pyproject.toml +28 -22
  9. {mine-4.2.2 → mine-4.3}/LICENSE.md +0 -0
  10. {mine-4.2.2 → mine-4.3}/mine/__init__.py +0 -0
  11. {mine-4.2.2 → mine-4.3}/mine/cli.py +0 -0
  12. {mine-4.2.2 → mine-4.3}/mine/common.py +0 -0
  13. {mine-4.2.2 → mine-4.3}/mine/daemon.py +0 -0
  14. {mine-4.2.2 → mine-4.3}/mine/models/__init__.py +0 -0
  15. {mine-4.2.2 → mine-4.3}/mine/models/application.py +0 -0
  16. {mine-4.2.2 → mine-4.3}/mine/models/computer.py +0 -0
  17. {mine-4.2.2 → mine-4.3}/mine/models/config.py +0 -0
  18. {mine-4.2.2 → mine-4.3}/mine/models/status.py +0 -0
  19. {mine-4.2.2 → mine-4.3}/mine/models/timestamp.py +0 -0
  20. {mine-4.2.2 → mine-4.3}/mine/services.py +0 -0
  21. {mine-4.2.2 → mine-4.3}/mine/settings.py +0 -0
  22. {mine-4.2.2 → mine-4.3}/mine/tests/__init__.py +0 -0
  23. {mine-4.2.2 → mine-4.3}/mine/tests/files/.gitignore +0 -0
  24. {mine-4.2.2 → mine-4.3}/mine/tests/files/mine-in.yml +0 -0
  25. {mine-4.2.2 → mine-4.3}/mine/tests/files/mine-out.yml +0 -0
  26. {mine-4.2.2 → mine-4.3}/mine/tests/test_models_application.py +0 -0
  27. {mine-4.2.2 → mine-4.3}/mine/tests/test_models_computer.py +0 -0
  28. {mine-4.2.2 → mine-4.3}/mine/tests/test_models_config.py +0 -0
  29. {mine-4.2.2 → mine-4.3}/mine/tests/test_models_data.py +0 -0
  30. {mine-4.2.2 → mine-4.3}/mine/tests/test_models_status.py +0 -0
  31. {mine-4.2.2 → mine-4.3}/mine/tests/test_models_timestamp.py +0 -0
  32. {mine-4.2.2 → mine-4.3}/mine/tests/test_services.py +0 -0
@@ -1,12 +1,12 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: mine
3
- Version: 4.2.2
3
+ Version: 4.3
4
4
  Summary: Share application state across computers using Dropbox.
5
- Home-page: https://pypi.org/project/mine
6
5
  License: MIT
6
+ License-File: LICENSE.md
7
7
  Author: Jace Browning
8
8
  Author-email: jacebrowning@gmail.com
9
- Requires-Python: >=3.10,<4.0
9
+ Requires-Python: >=3.11,<4.0
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Console
12
12
  Classifier: Intended Audience :: End Users/Desktop
@@ -15,20 +15,21 @@ Classifier: Natural Language :: English
15
15
  Classifier: Operating System :: OS Independent
16
16
  Classifier: Programming Language :: Python
17
17
  Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.10
19
- Classifier: Programming Language :: Python :: 3.11
20
- Classifier: Programming Language :: Python :: 3
21
- Classifier: Programming Language :: Python :: 3.10
22
18
  Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Programming Language :: Python :: 3.15
23
23
  Classifier: Topic :: System
24
24
  Classifier: Topic :: System :: Monitoring
25
25
  Classifier: Topic :: Utilities
26
26
  Requires-Dist: crayons (>=0.4,<0.5)
27
- Requires-Dist: datafiles (>=2.1,<3.0)
28
- Requires-Dist: minilog (>=2.1,<3.0)
27
+ Requires-Dist: datafiles (>=2.6,<3.0)
28
+ Requires-Dist: minilog (>=2.3.1,<3.0.0)
29
29
  Requires-Dist: psutil (>=5.6,<5.7)
30
- Requires-Dist: universal-startfile (>=0.2,<0.3)
30
+ Requires-Dist: universal-startfile
31
31
  Project-URL: Documentation, https://mine.readthedocs.io
32
+ Project-URL: Homepage, https://pypi.org/project/mine
32
33
  Project-URL: Repository, https://github.com/jacebrowning/mine
33
34
  Description-Content-Type: text/markdown
34
35
 
@@ -63,7 +64,7 @@ and some just don't make sense to keep running on all your computers:
63
64
 
64
65
  ### Requirements
65
66
 
66
- - Python 3.10+
67
+ - Python 3.11+
67
68
 
68
69
  ### Installation
69
70
 
@@ -29,7 +29,7 @@ and some just don't make sense to keep running on all your computers:
29
29
 
30
30
  ### Requirements
31
31
 
32
- - Python 3.10+
32
+ - Python 3.11+
33
33
 
34
34
  ### Installation
35
35
 
@@ -146,6 +146,7 @@ class MacManager(Manager): # pragma: no cover (manual)
146
146
 
147
147
  IGNORED_APPLICATION_NAMES = [
148
148
  "com.apple.mail.spotlightindexextension",
149
+ "com.apple.notes.intentsextension",
149
150
  "com.apple.notes.spotlightindexextension",
150
151
  "com.apple.notes.widgetextension",
151
152
  "com.apple.podcasts.spotlightindexextension",
@@ -215,13 +216,24 @@ class WindowsManager(Manager): # pragma: no cover (manual)
215
216
  FRIENDLY = NAME
216
217
 
217
218
  def is_running(self, application):
218
- pass
219
+ name = application.versions.windows
220
+ if not name:
221
+ return None
222
+ process = self._get_process(name)
223
+ return process is not None
219
224
 
220
225
  def start(self, application):
221
226
  pass
222
227
 
223
228
  def stop(self, application):
224
- pass
229
+ name = application.versions.windows
230
+ while True:
231
+ process = self._get_process(name)
232
+ if process and process.is_running():
233
+ process.terminate()
234
+ process.wait()
235
+ else:
236
+ break
225
237
 
226
238
 
227
239
  def get_manager(name=None) -> Manager:
@@ -1,6 +1,5 @@
1
1
  """Data structures that combine all program data."""
2
2
 
3
-
4
3
  import crayons
5
4
  import log
6
5
  from datafiles import datafile, field
@@ -13,6 +13,20 @@ ROOT = os.path.dirname(__file__)
13
13
  FILES = os.path.join(ROOT, "files")
14
14
 
15
15
 
16
+ def dropbox_installed() -> bool:
17
+ """Return whether the Dropbox application is available to launch."""
18
+ if platform.system() != "Darwin":
19
+ return True # start() is a no-op on Linux/Windows managers
20
+ for base in (
21
+ "/Applications",
22
+ "/System/Applications",
23
+ os.path.expanduser("~/Applications"),
24
+ ):
25
+ if os.path.exists(os.path.join(base, "Dropbox.app")):
26
+ return True
27
+ return False
28
+
29
+
16
30
  def pytest_configure(config):
17
31
  """Disable verbose output when running tests."""
18
32
  log.init(
@@ -31,3 +45,5 @@ def pytest_runtest_setup(item):
31
45
  pytest.skip("Test can only be run on macOS")
32
46
  if "windows_only" in item.keywords and platform.system() != "Windows":
33
47
  pytest.skip("Test can only be run on Windows")
48
+ if "requires_dropbox" in item.keywords and not dropbox_installed():
49
+ pytest.skip("Requires Dropbox.app")
@@ -48,6 +48,7 @@ class TestMain:
48
48
  cli.main(["-vvvv"])
49
49
  assert mock_log.exception.call_count == 1
50
50
 
51
+ @pytest.mark.requires_dropbox
51
52
  @patch("mine.daemon.application", None)
52
53
  def test_path(self, tmp_path):
53
54
  """Verify a custom setting file path can be used."""
@@ -65,6 +66,7 @@ class TestMain:
65
66
  cli.main(["--daemon", "42"])
66
67
  mock_run.assert_called_once_with(path=None, delay=42)
67
68
 
69
+ @pytest.mark.requires_dropbox
68
70
  @patch("mine.daemon.application", Application("?"))
69
71
  def test_warning_when_daemon_is_not_running(self, tmp_path):
70
72
  with pytest.raises(SystemExit):
@@ -1,3 +1,5 @@
1
+ import subprocess
2
+
1
3
  import pytest
2
4
 
3
5
  from mine.manager import LinuxManager, MacManager, WindowsManager, get_manager
@@ -23,9 +25,14 @@ class TestLinuxManager:
23
25
  @pytest.mark.linux_only
24
26
  def test_is_running_true(self):
25
27
  """Verify a process can be detected as running."""
26
- application = Application("init")
27
- application.versions.linux = "init"
28
- assert True is self.manager.is_running(application)
28
+ application = Application("sleep")
29
+ application.versions.linux = "sleep"
30
+ process = subprocess.Popen(["sleep", "60"])
31
+ try:
32
+ assert True is self.manager.is_running(application)
33
+ finally:
34
+ process.kill()
35
+ process.wait()
29
36
 
30
37
  def test_is_running_none(self):
31
38
  """Verify a process can be detected as untracked."""
@@ -1,7 +1,7 @@
1
1
  [tool.poetry]
2
2
 
3
3
  name = "mine"
4
- version = "4.2.2"
4
+ version = "4.3"
5
5
  description = "Share application state across computers using Dropbox."
6
6
 
7
7
  license = "MIT"
@@ -25,8 +25,11 @@ classifiers = [
25
25
  "Operating System :: OS Independent",
26
26
  "Programming Language :: Python",
27
27
  "Programming Language :: Python :: 3",
28
- "Programming Language :: Python :: 3.10",
29
28
  "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
30
+ "Programming Language :: Python :: 3.13",
31
+ "Programming Language :: Python :: 3.14",
32
+ "Programming Language :: Python :: 3.15",
30
33
  "Topic :: System",
31
34
  "Topic :: System :: Monitoring",
32
35
  "Topic :: Utilities",
@@ -34,49 +37,52 @@ classifiers = [
34
37
 
35
38
  [tool.poetry.dependencies]
36
39
 
37
- python = "^3.10"
40
+ python = "^3.11"
38
41
 
39
- datafiles = "^2.1"
42
+ datafiles = "^2.6"
40
43
  psutil = "~5.6"
41
44
  crayons = "~0.4"
42
- minilog = "^2.1"
43
- universal-startfile = "^0.2"
45
+ minilog = "^2.3.1"
46
+ universal-startfile = "*"
44
47
 
45
- [tool.poetry.dev-dependencies]
48
+ [tool.poetry.group.dev.dependencies]
46
49
 
47
50
  # Formatters
48
- black = "^23.7"
49
- isort = "^5.12"
51
+ black = ">=24.8,<27.0"
52
+ isort = "^5.13"
50
53
 
51
54
  # Linters
52
- mypy = "^1.4"
53
- pydocstyle = "^6.1"
54
- pylint = "~2.15"
55
- wrapt = "*" # missing 'pylint' dependency
55
+ mypy = "^1.3"
56
+ pydocstyle = "*"
57
+ pylint = "^3.3"
56
58
  types-setuptools = "*"
57
59
 
58
60
  # Testing
59
- pytest = "^7.4"
60
- pytest-describe = "^2.0"
61
+ pytest = "^8.3"
62
+ pytest-cov = "^5.0"
63
+ pytest-describe = "^2.2"
61
64
  pytest-expecter = "^3.0"
62
65
  pytest-random = "*"
63
- pytest-cov = "^4.0"
64
66
  freezegun = "*"
65
67
 
66
68
  # Reports
67
- coveragespace = "^6.0"
69
+ coveragespace = "^6.2"
68
70
 
69
71
  # Documentation
70
- mkdocs = "^1.4"
71
- pygments = "^2.11"
72
+ mkdocs = "^1.2.3"
73
+ pygments = "^2.15.0"
72
74
 
73
75
  # Tooling
74
- pyinstaller = "*"
76
+ pyinstaller = { version = "*", python = "<3.16" }
75
77
  sniffer = "*"
76
- MacFSEvents = { version = "*", platform = "darwin" }
78
+ MacFSEvents = { version = "*", platform = "darwin", python = "<3.13" }
77
79
  pync = { version = "*", platform = "darwin" }
78
80
  ipython = "^8.10.0"
79
81
 
82
+ [tool.poetry.requires-plugins]
83
+
84
+ poetry-plugin-export = ">=1.8"
85
+
80
86
  [tool.poetry.scripts]
81
87
 
82
88
  mine = "mine.cli:main"
@@ -114,7 +120,7 @@ addopts = """
114
120
 
115
121
  cache_dir = ".cache/pytest/"
116
122
 
117
- markers = ["linux_only", "mac_only", "windows_only"]
123
+ markers = ["linux_only", "mac_only", "windows_only", "requires_dropbox"]
118
124
 
119
125
  [build-system]
120
126
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes