Merge ~bloodearnest/snapstore-client:rename into snapstore-client:master

Proposed by Simon Davy
Status: Merged
Approved by: Simon Davy
Approved revision: 9a61cdbcb3a365acc781f413e7f4c2d48172a9fc
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~bloodearnest/snapstore-client:rename
Merge into: snapstore-client:master
Diff against target: 210 lines (+32/-23)
10 files modified
.gitignore (+3/-0)
Makefile (+1/-1)
docs/en/client.md (+7/-7)
snap/snapcraft.yaml (+9/-5)
snapstore_client/config.py (+1/-1)
snapstore_client/logic/overrides.py (+3/-3)
snapstore_client/logic/tests/test_overrides.py (+3/-3)
snapstore_client/tests/factory.py (+1/-1)
snapstore_client/tests/test_config.py (+2/-1)
snapstore_client/tests/testfixtures.py (+2/-1)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+349640@code.launchpad.net

Commit message

rename snap to snap-store-proxy-client

To post a comment you must log in.
e41ce07... by Simon Davy

remove state files

893e8e5... by Simon Davy

remove debugging

Revision history for this message
Colin Watson (cjwatson) :
review: Approve
Revision history for this message
Simon Davy (bloodearnest) :
9a61cdb... by Simon Davy

add clarifying comment about py3.5

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/.gitignore b/.gitignore
index 5d2c033..5d9d1bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,6 @@ __pycache__/
4/.coverage4/.coverage
5/htmlcov5/htmlcov
6docs/build6docs/build
7parts
8prime
9stage
diff --git a/Makefile b/Makefile
index a3b3b78..d8f1bd4 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ $(SNAPSTORE_DEPENDENCY_DIR):
16 git clone $(DEPENDENCY_REPO) $(SNAPSTORE_DEPENDENCY_DIR)16 git clone $(DEPENDENCY_REPO) $(SNAPSTORE_DEPENDENCY_DIR)
1717
18$(ENV)/prod: | $(SNAPSTORE_DEPENDENCY_DIR)18$(ENV)/prod: | $(SNAPSTORE_DEPENDENCY_DIR)
19 virtualenv $(ENV) --python=python319 virtualenv $(ENV) --python=python3.5 # pin to 3.5 as that is what core 16 is
20 $(PIP) install -f $(SNAPSTORE_DEPENDENCY_DIR) --no-index -r requirements.txt20 $(PIP) install -f $(SNAPSTORE_DEPENDENCY_DIR) --no-index -r requirements.txt
21 touch $@21 touch $@
2222
diff --git a/docs/en/client.md b/docs/en/client.md
index a1cfc9e..6a23103 100644
--- a/docs/en/client.md
+++ b/docs/en/client.md
@@ -7,7 +7,7 @@ Installation
77
8The snapstore client can be installed from the snap store:8The snapstore client can be installed from the snap store:
99
10 snap install snapstore-client10 snap install snap-store-proxy-client
1111
12Configuration12Configuration
13=============13=============
@@ -18,19 +18,19 @@ the [Ubuntu SSO provider](https://login.ubuntu.com).
1818
19From the command line on the machine that has the Proxy installed, run:19From the command line on the machine that has the Proxy installed, run:
2020
21 sudo snapstore add-admin becky@example.com21 sudo snap-proxy add-admin becky@example.com
2222
23Once the user has been registered, the client can login:23Once the user has been registered, the client can login:
2424
25 snapstore-client login25 snap-store-proxy-client login [address of proxy]
2626
27Usage27Usage
28=====28=====
2929
30snapstore-client provides the same command line interface for managing overrides30snap-store-proxy-client provides the same command line interface for managing overrides
31as the CLI client installed with the Proxy. It cannot configure any system31as the CLI client installed with the Proxy. It cannot configure any system
32settings for the Proxy.32settings for the Proxy.
3333
34 snapstore-client list-overrides34 snap-store-proxy-client list-overrides
35 snapstore-client override foo stable=1035 snap-store-proxy-client override foo stable=10
36 snapstore-client delete-override foo36 snap-store-proxy-client delete-override foo
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index ff7c8a6..f234ee1 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -1,15 +1,15 @@
1name: snapstore-client1name: snap-store-proxy-client
2version: 1.0beta2version: 1.0
3summary: Canonical snapstore administration client.3summary: Canonical snap store proxy administration client.
4description: |4description: |
5 The Canonical snapstore client is used to manage a snapstore.5 The Canonical snapstore client is used to manage a snap store proxy.
66
7# Defaults, but snapcraft prints ugly yellow messages without them.7# Defaults, but snapcraft prints ugly yellow messages without them.
8confinement: strict8confinement: strict
9grade: stable9grade: stable
1010
11apps:11apps:
12 snapstore-client:12 snap-store-proxy-client:
13 command: ./snapstore13 command: ./snapstore
14 plugs:14 plugs:
15 - network15 - network
@@ -26,3 +26,7 @@ parts:
26 stage:26 stage:
27 - ./snapstore27 - ./snapstore
28 - ./snapstore_client/28 - ./snapstore_client/
29 override-prime: |
30 snapcraftctl prime
31 /snap/core/current/usr/bin/python3 -m compileall -q -j0 snapstore_client
32
diff --git a/snapstore_client/config.py b/snapstore_client/config.py
index ca7beb9..a01e975 100644
--- a/snapstore_client/config.py
+++ b/snapstore_client/config.py
@@ -12,7 +12,7 @@ from xdg import BaseDirectory
1212
13class Config:13class Config:
1414
15 xdg_name = 'snapstore-client'15 xdg_name = 'snap-store-proxy-client'
1616
17 def __init__(self):17 def __init__(self):
18 self.parser = configparser.ConfigParser()18 self.parser = configparser.ConfigParser()
diff --git a/snapstore_client/logic/overrides.py b/snapstore_client/logic/overrides.py
index 5749988..667bd0a 100644
--- a/snapstore_client/logic/overrides.py
+++ b/snapstore_client/logic/overrides.py
@@ -20,13 +20,13 @@ logger = logging.getLogger(__name__)
2020
21def _log_credentials_error(e):21def _log_credentials_error(e):
22 logger.error('%s', e)22 logger.error('%s', e)
23 logger.error('Try to "snapstore-client login" again.')23 logger.error('Try to "snap-store-proxy-client login" again.')
2424
2525
26def _log_authorized_error():26def _log_authorized_error():
27 logger.error(("Perhaps you have not been registered as an "27 logger.error(("Perhaps you have not been registered as an "
28 "admin with the proxy."))28 "admin with the proxy."))
29 logger.error("Try 'snapstore add-admin' on the proxy host.")29 logger.error("Try 'snap-proxy add-admin' on the proxy host.")
3030
3131
32def _check_default_store(cfg):32def _check_default_store(cfg):
@@ -36,7 +36,7 @@ def _check_default_store(cfg):
36 if not store.get('gw_url'):36 if not store.get('gw_url'):
37 logger.error(37 logger.error(
38 'No store configuration found. '38 'No store configuration found. '
39 'Have you run "snapstore-client login"?')39 'Have you run "snap-store-proxy-client login"?')
40 return None40 return None
41 return store41 return store
4242
diff --git a/snapstore_client/logic/tests/test_overrides.py b/snapstore_client/logic/tests/test_overrides.py
index 08a85af..1f2f2d0 100644
--- a/snapstore_client/logic/tests/test_overrides.py
+++ b/snapstore_client/logic/tests/test_overrides.py
@@ -29,7 +29,7 @@ class OverridesTests(TestCase):
29 self.assertEqual(29 self.assertEqual(
30 logger.output,30 logger.output,
31 'No store configuration found. '31 'No store configuration found. '
32 'Have you run "snapstore-client login"?\n')32 'Have you run "snap-store-proxy-client login"?\n')
3333
34 @responses.activate34 @responses.activate
35 def test_list_overrides(self):35 def test_list_overrides(self):
@@ -68,7 +68,7 @@ class OverridesTests(TestCase):
68 self.assertEqual(68 self.assertEqual(
69 logger.output,69 logger.output,
70 'No store configuration found. '70 'No store configuration found. '
71 'Have you run "snapstore-client login"?\n')71 'Have you run "snap-store-proxy-client login"?\n')
7272
73 @responses.activate73 @responses.activate
74 def test_override(self):74 def test_override(self):
@@ -123,7 +123,7 @@ class OverridesTests(TestCase):
123 self.assertEqual(123 self.assertEqual(
124 logger.output,124 logger.output,
125 'No store configuration found. '125 'No store configuration found. '
126 'Have you run "snapstore-client login"?\n')126 'Have you run "snap-store-proxy-client login"?\n')
127127
128 @responses.activate128 @responses.activate
129 def test_delete_override(self):129 def test_delete_override(self):
diff --git a/snapstore_client/tests/factory.py b/snapstore_client/tests/factory.py
index b7f77c6..f9d4ba5 100644
--- a/snapstore_client/tests/factory.py
+++ b/snapstore_client/tests/factory.py
@@ -2,7 +2,7 @@
22
3"""Test Factory.3"""Test Factory.
44
5Since snapstore-client does not have any database, its persistence layer5Since snap-store-proxy-client does not have any database, its persistence layer
6consists of making requests to other services in the store.6consists of making requests to other services in the store.
77
8The test factory therefore makes it easy to create payloads that are8The test factory therefore makes it easy to create payloads that are
diff --git a/snapstore_client/tests/test_config.py b/snapstore_client/tests/test_config.py
index 2ddbc5c..320b51c 100644
--- a/snapstore_client/tests/test_config.py
+++ b/snapstore_client/tests/test_config.py
@@ -28,7 +28,8 @@ class ConfigTests(TestCase):
2828
29 def test_save(self):29 def test_save(self):
30 xdg_path = self.useFixture(XDGConfigDirFixture()).path30 xdg_path = self.useFixture(XDGConfigDirFixture()).path
31 config_ini = os.path.join(xdg_path, 'snapstore-client', 'config.ini')31 config_ini = os.path.join(
32 xdg_path, 'snap-store-proxy-client', 'config.ini')
32 self.assertFalse(os.path.exists(config_ini))33 self.assertFalse(os.path.exists(config_ini))
3334
34 cfg = Config()35 cfg = Config()
diff --git a/snapstore_client/tests/testfixtures.py b/snapstore_client/tests/testfixtures.py
index 0342388..10f714e 100644
--- a/snapstore_client/tests/testfixtures.py
+++ b/snapstore_client/tests/testfixtures.py
@@ -50,7 +50,8 @@ class ConfigFixture(Fixture):
5050
51 def _setUp(self):51 def _setUp(self):
52 xdg_config_path = self.useFixture(XDGConfigDirFixture()).path52 xdg_config_path = self.useFixture(XDGConfigDirFixture()).path
53 app_config_path = os.path.join(xdg_config_path, 'snapstore-client')53 app_config_path = os.path.join(
54 xdg_config_path, 'snap-store-proxy-client')
54 os.makedirs(app_config_path)55 os.makedirs(app_config_path)
55 if self.empty:56 if self.empty:
56 return57 return

Subscribers

People subscribed via source and target branches

to all changes: