splent-feature-github 0.1.0__py3-none-any.whl
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.
- splent_feature_github-0.1.0.dist-info/METADATA +99 -0
- splent_feature_github-0.1.0.dist-info/RECORD +23 -0
- splent_feature_github-0.1.0.dist-info/WHEEL +5 -0
- splent_feature_github-0.1.0.dist-info/licenses/COPYING +674 -0
- splent_feature_github-0.1.0.dist-info/licenses/COPYING.LESSER +165 -0
- splent_feature_github-0.1.0.dist-info/top_level.txt +1 -0
- splent_io/splent_feature_github/__init__.py +30 -0
- splent_io/splent_feature_github/assets/css/github.css +70 -0
- splent_io/splent_feature_github/config.py +18 -0
- splent_io/splent_feature_github/hooks.py +58 -0
- splent_io/splent_feature_github/migrations/alembic.ini +36 -0
- splent_io/splent_feature_github/migrations/env.py +9 -0
- splent_io/splent_feature_github/migrations/script.py.mako +24 -0
- splent_io/splent_feature_github/migrations/versions/7ace6050fb3f_splent_feature_github.py +43 -0
- splent_io/splent_feature_github/models.py +31 -0
- splent_io/splent_feature_github/repositories.py +11 -0
- splent_io/splent_feature_github/routes.py +110 -0
- splent_io/splent_feature_github/services.py +305 -0
- splent_io/splent_feature_github/signals.py +14 -0
- splent_io/splent_feature_github/templates/hooks/github_login_button.html +7 -0
- splent_io/splent_feature_github/templates/hooks/github_profile_row.html +31 -0
- splent_io/splent_feature_github/translations/es/LC_MESSAGES/messages.mo +0 -0
- splent_io/splent_feature_github/translations/es/LC_MESSAGES/messages.po +28 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: splent_feature_github
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
License-Expression: LGPL-3.0-or-later
|
|
5
|
+
Requires-Python: >=3.13
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
License-File: COPYING
|
|
8
|
+
License-File: COPYING.LESSER
|
|
9
|
+
Dynamic: license-file
|
|
10
|
+
|
|
11
|
+
# splent_feature_github
|
|
12
|
+
|
|
13
|
+
The `github` feature of a [SPLENT](https://splent.io) product line.
|
|
14
|
+
|
|
15
|
+
Sign in and sign up with GitHub, and connect a GitHub account to an account
|
|
16
|
+
from its profile. A new account takes the email GitHub shares, or else the
|
|
17
|
+
verified primary address of the GitHub account, and the name it gives. A
|
|
18
|
+
GitHub account always signs in to the account it is linked to, and never to
|
|
19
|
+
an existing account because the email matches. It needs `auth`, `profile`
|
|
20
|
+
and `identities`, which keeps the linked accounts and the shared OAuth
|
|
21
|
+
registry.
|
|
22
|
+
|
|
23
|
+
A SPLENT feature is a Python package that a product composes with others.
|
|
24
|
+
Its models, routes, services, templates and hooks are registered when the
|
|
25
|
+
product starts. What this feature provides and requires is listed in the
|
|
26
|
+
`[tool.splent.contract]` section of `pyproject.toml`, which
|
|
27
|
+
`splent feature:contract --write` keeps in sync with the source.
|
|
28
|
+
|
|
29
|
+
## Settings
|
|
30
|
+
|
|
31
|
+
| Setting | Default | What it is |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| `GITHUB_CLIENT_ID` | empty | The client id of the OAuth app registered at https://github.com/settings/developers |
|
|
34
|
+
| `GITHUB_CLIENT_SECRET` | empty | Its secret |
|
|
35
|
+
|
|
36
|
+
Without both, GitHub sign-in fails with a message and the app logs a warning
|
|
37
|
+
at startup.
|
|
38
|
+
|
|
39
|
+
## Where it shows
|
|
40
|
+
|
|
41
|
+
It fills the slots other features open, by name, so it composes with
|
|
42
|
+
whatever the product has and overrides nothing.
|
|
43
|
+
|
|
44
|
+
| Slot | Opened by | What GitHub draws |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| `auth.login.providers` | auth | The GitHub button, under "or continue with" |
|
|
47
|
+
| `signup.providers` | signup, when the product has it | The same button, after the sign-up form |
|
|
48
|
+
| `profile.edit.sections` | profile | The linked account with a disconnect button, or a "Connect GitHub" link |
|
|
49
|
+
| `layout.head.css` | the product's app shell | Its stylesheet, `assets/css/github.css` |
|
|
50
|
+
|
|
51
|
+
It takes order 10 in the first three, before ORCID's 20. The button carries
|
|
52
|
+
where the reader was heading (`?next=`), and only a path on this site. The
|
|
53
|
+
disconnect button opens identities' modal.
|
|
54
|
+
|
|
55
|
+
GitHub's dark grey is in `assets/css/github.css`, never on the elements. The
|
|
56
|
+
public shell loads the file from the asset registry (`register_asset`), and
|
|
57
|
+
the app shell, which does not render the registry, through
|
|
58
|
+
`layout.head.css`. A product that wants another look overrides
|
|
59
|
+
`.btn.btn-github` and the `github-identity__*` classes in a stylesheet of its
|
|
60
|
+
own.
|
|
61
|
+
|
|
62
|
+
## A product without signup
|
|
63
|
+
|
|
64
|
+
A product that does not install `splent_feature_signup` is closed, and its
|
|
65
|
+
accounts are opened by an administrator. GitHub follows the rule identities
|
|
66
|
+
holds for every provider.
|
|
67
|
+
|
|
68
|
+
| Visitor | With signup | Without signup |
|
|
69
|
+
|---|---|---|
|
|
70
|
+
| Signs in with a GitHub account already linked | Signed in | Signed in |
|
|
71
|
+
| Connects GitHub from their profile | Linked | Linked |
|
|
72
|
+
| Signs in with a GitHub account linked to nobody | A new account is opened | Sent back to the login page with a translated message that asks them to request access from an administrator, or to connect GitHub from their profile if they have an account |
|
|
73
|
+
|
|
74
|
+
## Translations
|
|
75
|
+
|
|
76
|
+
The edit-profile row ships with a Spanish catalog.
|
|
77
|
+
|
|
78
|
+
## Use it in a product
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
splent feature:add splent_feature_github
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Develop
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
splent feature:test splent_feature_github
|
|
88
|
+
splent feature:contract splent_feature_github
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Release
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
splent feature:release splent_feature_github --dry-run --bump patch
|
|
95
|
+
splent feature:release splent_feature_github
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The first command rehearses the release and changes nothing. The second
|
|
99
|
+
publishes it to the git forge and to PyPI, and a PyPI version is permanent.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
splent_feature_github-0.1.0.dist-info/licenses/COPYING,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
|
2
|
+
splent_feature_github-0.1.0.dist-info/licenses/COPYING.LESSER,sha256=2n6rt7r999OuXp8iOqW9we7ORaxWncIbOwN1ILRGR2g,7651
|
|
3
|
+
splent_io/splent_feature_github/__init__.py,sha256=0RGjnjOWq-clO2kQRBwgEh2W4UUvzCeJzbPGRKWDUrw,1043
|
|
4
|
+
splent_io/splent_feature_github/config.py,sha256=jvMhRCliD6Agt267xYAUOvh4S63mmJGRiglw9Bj_5fo,463
|
|
5
|
+
splent_io/splent_feature_github/hooks.py,sha256=6j9gknDwMmx0y3n2VTb7tPb4lWQBuHRfDCXAtM_3Nb0,2184
|
|
6
|
+
splent_io/splent_feature_github/models.py,sha256=8a4VtZS9A0_IYTUABSBt7Cy9E9ZnAQOrIU3nzbbfubo,998
|
|
7
|
+
splent_io/splent_feature_github/repositories.py,sha256=vHqRbXWUyK8MO4O7AGDjnzaC_5Nrf_E36w3zVWSGFpY,367
|
|
8
|
+
splent_io/splent_feature_github/routes.py,sha256=VEiOgYvvvglb0fbIk84SBU7ZMx7UsQNCAN6lVjACTS8,4035
|
|
9
|
+
splent_io/splent_feature_github/services.py,sha256=YGNA4kOqlKf_ANXsJs9xxEFIRV0YiWXUoyPQ4QsY1-U,12506
|
|
10
|
+
splent_io/splent_feature_github/signals.py,sha256=GDdwKZ22_mt5K7y9-qmBMj1MI9fHtB-GgM2fW_aFeqo,591
|
|
11
|
+
splent_io/splent_feature_github/assets/css/github.css,sha256=f2EBGgG1I0Lem0DikND_SSkJ3aM4pJFkY3BxWM0QiUc,1969
|
|
12
|
+
splent_io/splent_feature_github/migrations/alembic.ini,sha256=WA1biGHSZpXO-M7uFtAZVRSV5Fih0VIQY-Yp7G7xGTk,517
|
|
13
|
+
splent_io/splent_feature_github/migrations/env.py,sha256=2JeB8GO8qfNikGJL-VH-__hrC5T9aa_KoBDFIBkN17M,315
|
|
14
|
+
splent_io/splent_feature_github/migrations/script.py.mako,sha256=8_xgA-gm_OhehnO7CiIijWgnm00ZlszEHtIHrAYFJl0,494
|
|
15
|
+
splent_io/splent_feature_github/migrations/versions/7ace6050fb3f_splent_feature_github.py,sha256=u2zqW9gzPM44iXq8anUTWzKGAPfY1Prr7zSkvOaUDHI,1147
|
|
16
|
+
splent_io/splent_feature_github/templates/hooks/github_login_button.html,sha256=M_XZrdiJeNMCG9_xXjr-bPW81NfUJfOvsw-7SN7J8e4,335
|
|
17
|
+
splent_io/splent_feature_github/templates/hooks/github_profile_row.html,sha256=WR-YtrYCptl-nJzVev-lsuMjEW_7x1JH8oVVP3LREtM,3350
|
|
18
|
+
splent_io/splent_feature_github/translations/es/LC_MESSAGES/messages.mo,sha256=KF1a_E0TSpx3auPu7R2JjVSclrSWTY9bVg38yeuYCCs,531
|
|
19
|
+
splent_io/splent_feature_github/translations/es/LC_MESSAGES/messages.po,sha256=LwswsEuVa7bGLLCG98FeadNfj3Bh5OnGACsY-NHnldc,905
|
|
20
|
+
splent_feature_github-0.1.0.dist-info/METADATA,sha256=bId2_M-DRMKdkQUl1uPTiK3t4jrv5SDcOcsf-xPaR3Y,3780
|
|
21
|
+
splent_feature_github-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
22
|
+
splent_feature_github-0.1.0.dist-info/top_level.txt,sha256=nksrfdr_edPhGPUsCqz08kyNRLBkNc2sInZYzmbZ4TA,10
|
|
23
|
+
splent_feature_github-0.1.0.dist-info/RECORD,,
|