mine 4.2.3__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.3 → mine-4.3}/PKG-INFO +12 -9
  2. {mine-4.2.3 → mine-4.3}/README.md +1 -1
  3. {mine-4.2.3 → mine-4.3}/mine/manager.py +13 -2
  4. {mine-4.2.3 → mine-4.3}/mine/models/data.py +0 -1
  5. {mine-4.2.3 → mine-4.3}/mine/tests/conftest.py +16 -0
  6. {mine-4.2.3 → mine-4.3}/mine/tests/test_cli.py +2 -0
  7. {mine-4.2.3 → mine-4.3}/mine/tests/test_manager.py +10 -3
  8. {mine-4.2.3 → mine-4.3}/pyproject.toml +27 -22
  9. {mine-4.2.3 → mine-4.3}/LICENSE.md +0 -0
  10. {mine-4.2.3 → mine-4.3}/mine/__init__.py +0 -0
  11. {mine-4.2.3 → mine-4.3}/mine/cli.py +0 -0
  12. {mine-4.2.3 → mine-4.3}/mine/common.py +0 -0
  13. {mine-4.2.3 → mine-4.3}/mine/daemon.py +0 -0
  14. {mine-4.2.3 → mine-4.3}/mine/models/__init__.py +0 -0
  15. {mine-4.2.3 → mine-4.3}/mine/models/application.py +0 -0
  16. {mine-4.2.3 → mine-4.3}/mine/models/computer.py +0 -0
  17. {mine-4.2.3 → mine-4.3}/mine/models/config.py +0 -0
  18. {mine-4.2.3 → mine-4.3}/mine/models/status.py +0 -0
  19. {mine-4.2.3 → mine-4.3}/mine/models/timestamp.py +0 -0
  20. {mine-4.2.3 → mine-4.3}/mine/services.py +0 -0
  21. {mine-4.2.3 → mine-4.3}/mine/settings.py +0 -0
  22. {mine-4.2.3 → mine-4.3}/mine/tests/__init__.py +0 -0
  23. {mine-4.2.3 → mine-4.3}/mine/tests/files/.gitignore +0 -0
  24. {mine-4.2.3 → mine-4.3}/mine/tests/files/mine-in.yml +0 -0
  25. {mine-4.2.3 → mine-4.3}/mine/tests/files/mine-out.yml +0 -0
  26. {mine-4.2.3 → mine-4.3}/mine/tests/test_models_application.py +0 -0
  27. {mine-4.2.3 → mine-4.3}/mine/tests/test_models_computer.py +0 -0
  28. {mine-4.2.3 → mine-4.3}/mine/tests/test_models_config.py +0 -0
  29. {mine-4.2.3 → mine-4.3}/mine/tests/test_models_data.py +0 -0
  30. {mine-4.2.3 → mine-4.3}/mine/tests/test_models_status.py +0 -0
  31. {mine-4.2.3 → mine-4.3}/mine/tests/test_models_timestamp.py +0 -0
  32. {mine-4.2.3 → 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.3
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,18 +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
18
  Classifier: Programming Language :: Python :: 3.11
20
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
21
23
  Classifier: Topic :: System
22
24
  Classifier: Topic :: System :: Monitoring
23
25
  Classifier: Topic :: Utilities
24
26
  Requires-Dist: crayons (>=0.4,<0.5)
25
- Requires-Dist: datafiles (>=2.1,<3.0)
26
- 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)
27
29
  Requires-Dist: psutil (>=5.6,<5.7)
28
- Requires-Dist: universal-startfile (>=0.2,<0.3)
30
+ Requires-Dist: universal-startfile
29
31
  Project-URL: Documentation, https://mine.readthedocs.io
32
+ Project-URL: Homepage, https://pypi.org/project/mine
30
33
  Project-URL: Repository, https://github.com/jacebrowning/mine
31
34
  Description-Content-Type: text/markdown
32
35
 
@@ -61,7 +64,7 @@ and some just don't make sense to keep running on all your computers:
61
64
 
62
65
  ### Requirements
63
66
 
64
- - Python 3.10+
67
+ - Python 3.11+
65
68
 
66
69
  ### Installation
67
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
 
@@ -216,13 +216,24 @@ class WindowsManager(Manager): # pragma: no cover (manual)
216
216
  FRIENDLY = NAME
217
217
 
218
218
  def is_running(self, application):
219
- 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
220
224
 
221
225
  def start(self, application):
222
226
  pass
223
227
 
224
228
  def stop(self, application):
225
- 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
226
237
 
227
238
 
228
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.3"
4
+ version = "4.3"
5
5
  description = "Share application state across computers using Dropbox."
6
6
 
7
7
  license = "MIT"
@@ -25,9 +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",
30
29
  "Programming Language :: Python :: 3.12",
30
+ "Programming Language :: Python :: 3.13",
31
+ "Programming Language :: Python :: 3.14",
32
+ "Programming Language :: Python :: 3.15",
31
33
  "Topic :: System",
32
34
  "Topic :: System :: Monitoring",
33
35
  "Topic :: Utilities",
@@ -35,49 +37,52 @@ classifiers = [
35
37
 
36
38
  [tool.poetry.dependencies]
37
39
 
38
- python = "^3.10"
40
+ python = "^3.11"
39
41
 
40
- datafiles = "^2.1"
42
+ datafiles = "^2.6"
41
43
  psutil = "~5.6"
42
44
  crayons = "~0.4"
43
- minilog = "^2.1"
44
- universal-startfile = "^0.2"
45
+ minilog = "^2.3.1"
46
+ universal-startfile = "*"
45
47
 
46
- [tool.poetry.dev-dependencies]
48
+ [tool.poetry.group.dev.dependencies]
47
49
 
48
50
  # Formatters
49
- black = "^23.7"
50
- isort = "^5.12"
51
+ black = ">=24.8,<27.0"
52
+ isort = "^5.13"
51
53
 
52
54
  # Linters
53
- mypy = "^1.4"
54
- pydocstyle = "^6.1"
55
- pylint = "~2.15"
56
- wrapt = "*" # missing 'pylint' dependency
55
+ mypy = "^1.3"
56
+ pydocstyle = "*"
57
+ pylint = "^3.3"
57
58
  types-setuptools = "*"
58
59
 
59
60
  # Testing
60
- pytest = "^7.4"
61
- pytest-describe = "^2.0"
61
+ pytest = "^8.3"
62
+ pytest-cov = "^5.0"
63
+ pytest-describe = "^2.2"
62
64
  pytest-expecter = "^3.0"
63
65
  pytest-random = "*"
64
- pytest-cov = "^4.0"
65
66
  freezegun = "*"
66
67
 
67
68
  # Reports
68
- coveragespace = "^6.0"
69
+ coveragespace = "^6.2"
69
70
 
70
71
  # Documentation
71
- mkdocs = "^1.4"
72
- pygments = "^2.11"
72
+ mkdocs = "^1.2.3"
73
+ pygments = "^2.15.0"
73
74
 
74
75
  # Tooling
75
- pyinstaller = "*"
76
+ pyinstaller = { version = "*", python = "<3.16" }
76
77
  sniffer = "*"
77
- MacFSEvents = { version = "*", platform = "darwin" }
78
+ MacFSEvents = { version = "*", platform = "darwin", python = "<3.13" }
78
79
  pync = { version = "*", platform = "darwin" }
79
80
  ipython = "^8.10.0"
80
81
 
82
+ [tool.poetry.requires-plugins]
83
+
84
+ poetry-plugin-export = ">=1.8"
85
+
81
86
  [tool.poetry.scripts]
82
87
 
83
88
  mine = "mine.cli:main"
@@ -115,7 +120,7 @@ addopts = """
115
120
 
116
121
  cache_dir = ".cache/pytest/"
117
122
 
118
- markers = ["linux_only", "mac_only", "windows_only"]
123
+ markers = ["linux_only", "mac_only", "windows_only", "requires_dropbox"]
119
124
 
120
125
  [build-system]
121
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