taraqueue 0.3.0__tar.gz → 0.4.0__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 (43) hide show
  1. {taraqueue-0.3.0 → taraqueue-0.4.0}/CHANGES.rst +7 -0
  2. {taraqueue-0.3.0 → taraqueue-0.4.0}/PKG-INFO +1 -1
  3. {taraqueue-0.3.0 → taraqueue-0.4.0}/compose.yml +1 -1
  4. {taraqueue-0.3.0 → taraqueue-0.4.0}/taraqueue/testing/queue.py +2 -2
  5. {taraqueue-0.3.0 → taraqueue-0.4.0}/taraqueue/testing/services.py +15 -26
  6. taraqueue-0.4.0/tests/test_redis.py +6 -0
  7. {taraqueue-0.3.0 → taraqueue-0.4.0}/.editorconfig +0 -0
  8. {taraqueue-0.3.0 → taraqueue-0.4.0}/.gitattributes +0 -0
  9. {taraqueue-0.3.0 → taraqueue-0.4.0}/.github/CODEOWNERS +0 -0
  10. {taraqueue-0.3.0 → taraqueue-0.4.0}/.github/actions/setup-uv-env/action.yml +0 -0
  11. {taraqueue-0.3.0 → taraqueue-0.4.0}/.github/renovate.json +0 -0
  12. {taraqueue-0.3.0 → taraqueue-0.4.0}/.github/workflows/publish.yml +0 -0
  13. {taraqueue-0.3.0 → taraqueue-0.4.0}/.github/workflows/renovate.yaml +0 -0
  14. {taraqueue-0.3.0 → taraqueue-0.4.0}/.github/workflows/test.yml +0 -0
  15. {taraqueue-0.3.0 → taraqueue-0.4.0}/.gitignore +0 -0
  16. {taraqueue-0.3.0 → taraqueue-0.4.0}/.vscode/extensions.json +0 -0
  17. {taraqueue-0.3.0 → taraqueue-0.4.0}/.vscode/launch.json +0 -0
  18. {taraqueue-0.3.0 → taraqueue-0.4.0}/.vscode/settings.json +0 -0
  19. {taraqueue-0.3.0 → taraqueue-0.4.0}/CONTRIBUTING.rst +0 -0
  20. {taraqueue-0.3.0 → taraqueue-0.4.0}/LICENSE.rst +0 -0
  21. {taraqueue-0.3.0 → taraqueue-0.4.0}/Makefile +0 -0
  22. {taraqueue-0.3.0 → taraqueue-0.4.0}/README.rst +0 -0
  23. {taraqueue-0.3.0 → taraqueue-0.4.0}/STYLE_GUIDE.rst +0 -0
  24. {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/changes.rst +0 -0
  25. {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/conf.py +0 -0
  26. {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/contributing.rst +0 -0
  27. {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/index.rst +0 -0
  28. {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/license.rst +0 -0
  29. {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/modules.rst +0 -0
  30. {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/style_guide.rst +0 -0
  31. {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/taraqueue.rst +0 -0
  32. {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/taraqueue.testing.rst +0 -0
  33. {taraqueue-0.3.0 → taraqueue-0.4.0}/pyproject.toml +0 -0
  34. {taraqueue-0.3.0 → taraqueue-0.4.0}/taraqueue/__init__.py +0 -0
  35. {taraqueue-0.3.0 → taraqueue-0.4.0}/taraqueue/memory.py +0 -0
  36. {taraqueue-0.3.0 → taraqueue-0.4.0}/taraqueue/redis.py +0 -0
  37. {taraqueue-0.3.0 → taraqueue-0.4.0}/taraqueue/registry.py +0 -0
  38. {taraqueue-0.3.0 → taraqueue-0.4.0}/taraqueue/testing/__init__.py +0 -0
  39. {taraqueue-0.3.0 → taraqueue-0.4.0}/taraqueue/testing/compose.py +0 -0
  40. {taraqueue-0.3.0 → taraqueue-0.4.0}/tests/test_compose.py +0 -0
  41. {taraqueue-0.3.0 → taraqueue-0.4.0}/tests/test_queue.py +0 -0
  42. {taraqueue-0.3.0 → taraqueue-0.4.0}/tests/test_registry.py +0 -0
  43. {taraqueue-0.3.0 → taraqueue-0.4.0}/uv.lock +0 -0
@@ -1,3 +1,10 @@
1
+ Version 0.4.0
2
+ -------------
3
+
4
+ Released 2026-05-07
5
+
6
+ - Namespace generic pytest fixtures.
7
+
1
8
  Version 0.3.0
2
9
  -------------
3
10
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: taraqueue
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: Python queue abstraction layer
5
5
  Project-URL: Repository, https://github.com/taradix/taraqueue
6
6
  Author-email: Marc Tardif <marc@taram.ca>
@@ -1,4 +1,4 @@
1
1
  services:
2
2
  redis:
3
- image: redis:8.6.2-alpine
3
+ image: redis:8.6.3-alpine
4
4
  command: redis-server --requirepass ${REDIS_PASSWORD:-test}
@@ -14,13 +14,13 @@ def memory_queue():
14
14
 
15
15
 
16
16
  @pytest.fixture
17
- def redis_queue(redis_service, env_vars):
17
+ def redis_queue(redis_service, taraqueue_env_vars):
18
18
  """Redis queue fixture."""
19
19
  url = URL.build(
20
20
  scheme="redis",
21
21
  host=redis_service.ip,
22
22
  port=6379,
23
- password=env_vars["REDIS_PASSWORD"],
23
+ password=taraqueue_env_vars["REDIS_PASSWORD"],
24
24
  )
25
25
  return Queue.from_url(url)
26
26
 
@@ -1,6 +1,5 @@
1
1
  """Service fixtures."""
2
2
 
3
- from functools import partial
4
3
  from pathlib import Path
5
4
 
6
5
  import pytest
@@ -9,35 +8,31 @@ from taraqueue.testing.compose import ComposeServer
9
8
 
10
9
 
11
10
  @pytest.fixture(scope="session")
12
- def project():
13
- return "test"
14
-
15
-
16
- @pytest.fixture(scope="session")
17
- def env_vars(project):
11
+ def taraqueue_env_vars():
18
12
  """Environment variables for the services."""
19
13
  return {
20
- "COMPOSE_PROJECT_NAME": project,
14
+ "COMPOSE_PROJECT_NAME": "test",
21
15
  "REDIS_PASSWORD": "test",
22
16
  }
23
17
 
24
18
 
25
19
  @pytest.fixture(scope="session")
26
- def env_file(env_vars, request):
27
- """Environment file containing `env_vars`.
20
+ def taraqueue_env_file(taraqueue_env_vars, request):
21
+ """Environment file containing `taraqueue_env_vars`.
28
22
 
29
23
  Cached for troubleshooting purposes.
30
24
  """
31
25
  env_file = request.config.cache.makedir("compose") / "env"
32
26
  with env_file.open("w") as f:
33
- for k, v in env_vars.items():
27
+ for k, v in taraqueue_env_vars.items():
34
28
  f.write(f"{k}={v}\n")
35
29
 
36
30
  return env_file
37
31
 
38
32
 
39
33
  @pytest.fixture(scope="session")
40
- def compose_files(request):
34
+ def taraqueue_compose_files(request):
35
+ """Use the compose files from the project - not this library."""
41
36
  directory = Path(request.config.rootdir)
42
37
  filenames = ["docker-compose.yml", "compose.yaml", "compose.yml"]
43
38
  while True:
@@ -55,26 +50,20 @@ def compose_files(request):
55
50
 
56
51
 
57
52
  @pytest.fixture(scope="session")
58
- def compose_server(project, env_file, compose_files, process):
59
- return partial(
60
- ComposeServer,
61
- project=project,
62
- env_file=env_file,
63
- compose_files=compose_files,
53
+ def redis_service(process, taraqueue_env_file, taraqueue_compose_files):
54
+ """Redis service fixture."""
55
+ server = ComposeServer(
56
+ pattern="Ready to accept connections tcp",
57
+ env_file=taraqueue_env_file,
58
+ compose_files=taraqueue_compose_files,
64
59
  process=process,
65
60
  )
66
-
67
-
68
- @pytest.fixture(scope="session")
69
- def redis_service(compose_server):
70
- """Redis service fixture."""
71
- server = compose_server("Ready to accept connections tcp")
72
61
  with server.run("redis") as service:
73
62
  yield service
74
63
 
75
64
 
76
65
  @pytest.fixture(scope="session")
77
- def redis_client(redis_service, env_vars):
66
+ def redis_client(redis_service, taraqueue_env_vars):
78
67
  """Redis client to the service fixture."""
79
68
  from redis import StrictRedis
80
69
 
@@ -83,5 +72,5 @@ def redis_client(redis_service, env_vars):
83
72
  port=6379,
84
73
  decode_responses=True,
85
74
  db=0,
86
- password=env_vars["REDIS_PASSWORD"],
75
+ password=taraqueue_env_vars["REDIS_PASSWORD"],
87
76
  )
@@ -0,0 +1,6 @@
1
+ """Integration tests for the Redis service."""
2
+
3
+
4
+ def test_redis_service(redis_client):
5
+ """The Redis service should return true on PING."""
6
+ assert redis_client.ping()
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
File without changes
File without changes