Skip to content

Commit eefc8a9

Browse files
Renames plugin to pythonanywhere-briefcase-plugin.
Original name was based on beeware/briefcase#2678 discussion, but subsequent conversation made it clear that it would be better to clearly distinguish that package as third party one.
1 parent c11b27b commit eefc8a9

File tree

10 files changed

+79
-79
lines changed

10 files changed

+79
-79
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
PYPROJECT_VERSION=$(grep '^version =' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
3333
echo "pyproject.toml version: $PYPROJECT_VERSION"
3434
35-
INIT_VERSION=$(grep '^__version__ =' src/briefcase_pythonanywhere/__init__.py | sed 's/__version__ = "\(.*\)"/\1/')
35+
INIT_VERSION=$(grep '^__version__ =' src/pythonanywhere_briefcase_plugin/__init__.py | sed 's/__version__ = "\(.*\)"/\1/')
3636
echo "__init__.py version: $INIT_VERSION"
3737
3838
if [ "$TAG_VERSION_NO_PREFIX" != "$PYPROJECT_VERSION" ]; then

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# briefcase-pythonanywhere
1+
# pythonanywhere-briefcase-plugin
22

33
A [Briefcase](https://briefcase.readthedocs.io/) publication channel plugin for deploying static web apps to [PythonAnywhere](https://www.pythonanywhere.com/).
44

@@ -15,7 +15,7 @@ A [Briefcase](https://briefcase.readthedocs.io/) publication channel plugin for
1515
## Installation
1616
1717
```console
18-
$ pip install briefcase-pythonanywhere
18+
$ pip install pythonanywhere-briefcase-plugin
1919
```
2020
2121
## Quick start
@@ -51,8 +51,8 @@ Full documentation is available at [https://briefcase.pythonanywhere.com/](https
5151
Development requires [uv](https://docs.astral.sh/uv/getting-started/installation/).
5252

5353
```console
54-
$ git clone https://github.com/pythonanywhere/briefcase-pythonanywhere.git
55-
$ cd briefcase-pythonanywhere
54+
$ git clone https://github.com/pythonanywhere/pythonanywhere-briefcase-plugin.git
55+
$ cd pythonanywhere-briefcase-plugin
5656
$ uv sync
5757
$ uvx pre-commit install
5858
$ uv run pytest

docs/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pip install git+https://github.com/beeware/briefcase@main
2020
Install the plugin into your Briefcase project's virtual environment:
2121

2222
```console
23-
(venv) $ pip install briefcase-pythonanywhere
23+
(venv) $ pip install pythonanywhere-briefcase-plugin
2424
```
2525

2626
## Quick start
@@ -45,7 +45,7 @@ Then publish:
4545
(venv) $ briefcase publish web static
4646
```
4747

48-
If `briefcase-pythonanywhere` is the only publication channel installed, it will be selected automatically. If you have multiple channels installed, specify the channel explicitly:
48+
If `pythonanywhere-briefcase-plugin` is the only publication channel installed, it will be selected automatically. If you have multiple channels installed, specify the channel explicitly:
4949

5050
```console
5151
(venv) $ briefcase publish web static --channel pythonanywhere
@@ -98,8 +98,8 @@ Development requires [uv](https://docs.astral.sh/uv/getting-started/installation
9898
Clone the repository and install the development dependencies:
9999

100100
```console
101-
$ git clone https://github.com/pythonanywhere/briefcase-pythonanywhere.git
102-
$ cd briefcase-pythonanywhere
101+
$ git clone https://github.com/pythonanywhere/pythonanywhere-briefcase-plugin.git
102+
$ cd pythonanywhere-briefcase-plugin
103103
$ uv sync
104104
```
105105

mkdocs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
site_name: briefcase-pythonanywhere
1+
site_name: pythonanywhere-briefcase-plugin
22
site_description: A Briefcase publication channel plugin for deploying static web apps to PythonAnywhere.
33
site_url: https://briefcase.pythonanywhere.com/
4-
repo_url: https://github.com/pythonanywhere/briefcase-pythonanywhere
5-
repo_name: pythonanywhere/briefcase-pythonanywhere
4+
repo_url: https://github.com/pythonanywhere/pythonanywhere-briefcase-plugin
5+
repo_name: pythonanywhere/pythonanywhere-briefcase-plugin
66

77
docs_dir: docs
88

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[project]
2-
name = "briefcase-pythonanywhere"
2+
name = "pythonanywhere-briefcase-plugin"
33
version = "0.0.1a2"
44
description = "A Briefcase publication channel plugin for deploying static web apps to PythonAnywhere."
55
requires-python = ">= 3.10"
@@ -44,7 +44,7 @@ dev = [
4444
]
4545

4646
[project.entry-points."briefcase.channels.web.static"]
47-
pythonanywhere = "briefcase_pythonanywhere:PythonAnywherePublicationChannel"
47+
pythonanywhere = "pythonanywhere_briefcase_plugin:PythonAnywherePublicationChannel"
4848

4949
[tool.pytest.ini_options]
5050
testpaths = ["tests"]
@@ -56,7 +56,7 @@ extend-select = [
5656

5757
[tool.coverage.run]
5858
branch = true
59-
source_pkgs = ["briefcase_pythonanywhere"]
59+
source_pkgs = ["pythonanywhere_briefcase_plugin"]
6060

6161
[tool.coverage.report]
6262
show_missing = true

src/briefcase_pythonanywhere/__init__.py

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from pythonanywhere_briefcase_plugin.channel import PythonAnywherePublicationChannel
2+
3+
__version__ = "0.0.1a2"
4+
__all__ = ["PythonAnywherePublicationChannel"]

src/briefcase_pythonanywhere/channel.py renamed to src/pythonanywhere_briefcase_plugin/channel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from pythonanywhere_core.files import Files
1818
from pythonanywhere_core.webapp import Webapp
1919

20-
import briefcase_pythonanywhere
20+
import pythonanywhere_briefcase_plugin
2121

2222
if TYPE_CHECKING:
2323
from briefcase.channels.base import PublishCommandAPI
@@ -53,7 +53,7 @@ def publish_app(self, app: AppConfig, command: PublishCommandAPI, **options):
5353
)
5454

5555
os.environ["PYTHONANYWHERE_CLIENT"] = (
56-
f"briefcase-pythonanywhere/{briefcase_pythonanywhere.__version__}"
56+
f"pythonanywhere-briefcase-plugin/{pythonanywhere_briefcase_plugin.__version__}"
5757
)
5858

5959
username = self._resolve_username(app)

tests/test_channel.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
PythonAnywhereApiException,
1010
)
1111

12-
from briefcase_pythonanywhere import PythonAnywherePublicationChannel
12+
from pythonanywhere_briefcase_plugin import PythonAnywherePublicationChannel
1313

1414

1515
def test_is_subclass_of_base():
@@ -29,7 +29,7 @@ def test_resolve_username_from_app_config(mock_app):
2929

3030
def test_resolve_username_falls_back_to_core(mock_app, mocker):
3131
mocker.patch(
32-
"briefcase_pythonanywhere.channel.get_username",
32+
"pythonanywhere_briefcase_plugin.channel.get_username",
3333
return_value="coreuser",
3434
)
3535
channel = PythonAnywherePublicationChannel()
@@ -63,7 +63,7 @@ def test_publish_missing_api_token(mock_app, mock_command, dist_zip, mocker):
6363
mock_app.pythonanywhere_username = "testuser"
6464

6565
mocker.patch(
66-
"briefcase_pythonanywhere.channel.Files"
66+
"pythonanywhere_briefcase_plugin.channel.Files"
6767
).return_value.tree_post.side_effect = NoTokenError("no token")
6868

6969
channel = PythonAnywherePublicationChannel()
@@ -75,7 +75,7 @@ def test_publish_auth_error(mock_app, mock_command, dist_zip, mocker):
7575
mock_app.pythonanywhere_username = "testuser"
7676

7777
mocker.patch(
78-
"briefcase_pythonanywhere.channel.Files"
78+
"pythonanywhere_briefcase_plugin.channel.Files"
7979
).return_value.tree_post.side_effect = AuthenticationError("bad token")
8080

8181
channel = PythonAnywherePublicationChannel()
@@ -86,8 +86,8 @@ def test_publish_auth_error(mock_app, mock_command, dist_zip, mocker):
8686
def test_publish_creates_new_webapp(mock_app, mock_command, dist_zip, mocker):
8787
mock_app.pythonanywhere_username = "testuser"
8888

89-
mock_files_cls = mocker.patch("briefcase_pythonanywhere.channel.Files")
90-
mock_webapp_cls = mocker.patch("briefcase_pythonanywhere.channel.Webapp")
89+
mock_files_cls = mocker.patch("pythonanywhere_briefcase_plugin.channel.Files")
90+
mock_webapp_cls = mocker.patch("pythonanywhere_briefcase_plugin.channel.Webapp")
9191
mock_webapp = mock_webapp_cls.return_value
9292
mock_webapp.get.side_effect = PythonAnywhereApiException("not found")
9393

@@ -116,27 +116,27 @@ def test_publish_sets_pythonanywhere_client_env(
116116
mock_app.pythonanywhere_username = "testuser"
117117
monkeypatch.delenv("PYTHONANYWHERE_CLIENT", raising=False)
118118

119-
mocker.patch("briefcase_pythonanywhere.channel.Files")
120-
mock_webapp_cls = mocker.patch("briefcase_pythonanywhere.channel.Webapp")
119+
mocker.patch("pythonanywhere_briefcase_plugin.channel.Files")
120+
mock_webapp_cls = mocker.patch("pythonanywhere_briefcase_plugin.channel.Webapp")
121121
mock_webapp_cls.return_value.get.return_value = {"id": 1}
122122

123123
import os
124124

125-
import briefcase_pythonanywhere
125+
import pythonanywhere_briefcase_plugin
126126

127127
channel = PythonAnywherePublicationChannel()
128128
channel.publish_app(mock_app, mock_command)
129129

130130
assert os.environ["PYTHONANYWHERE_CLIENT"] == (
131-
f"briefcase-pythonanywhere/{briefcase_pythonanywhere.__version__}"
131+
f"pythonanywhere-briefcase-plugin/{pythonanywhere_briefcase_plugin.__version__}"
132132
)
133133

134134

135135
def test_publish_extracts_zip_before_upload(mock_app, mock_command, dist_zip, mocker):
136136
mock_app.pythonanywhere_username = "testuser"
137137

138-
mock_files_cls = mocker.patch("briefcase_pythonanywhere.channel.Files")
139-
mock_webapp_cls = mocker.patch("briefcase_pythonanywhere.channel.Webapp")
138+
mock_files_cls = mocker.patch("pythonanywhere_briefcase_plugin.channel.Files")
139+
mock_webapp_cls = mocker.patch("pythonanywhere_briefcase_plugin.channel.Webapp")
140140
mock_webapp_cls.return_value.get.return_value = {"id": 1}
141141

142142
uploaded_local_dir = None
@@ -160,7 +160,7 @@ def test_publish_api_error_wrapped(mock_app, mock_command, dist_zip, mocker):
160160
mock_app.pythonanywhere_username = "testuser"
161161

162162
mocker.patch(
163-
"briefcase_pythonanywhere.channel.Files"
163+
"pythonanywhere_briefcase_plugin.channel.Files"
164164
).return_value.tree_post.side_effect = PythonAnywhereApiException("upload failed")
165165

166166
channel = PythonAnywherePublicationChannel()
@@ -171,8 +171,8 @@ def test_publish_api_error_wrapped(mock_app, mock_command, dist_zip, mocker):
171171
def test_publish_updates_existing_webapp(mock_app, mock_command, dist_zip, mocker):
172172
mock_app.pythonanywhere_username = "testuser"
173173

174-
mocker.patch("briefcase_pythonanywhere.channel.Files")
175-
mock_webapp_cls = mocker.patch("briefcase_pythonanywhere.channel.Webapp")
174+
mocker.patch("pythonanywhere_briefcase_plugin.channel.Files")
175+
mock_webapp_cls = mocker.patch("pythonanywhere_briefcase_plugin.channel.Webapp")
176176
mock_webapp = mock_webapp_cls.return_value
177177
mock_webapp.get.return_value = {"id": 123}
178178

uv.lock

Lines changed: 43 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)