forked from tsileo/microblog.pub
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged @JD557 upkeeping and improvements.
- Loading branch information
Showing
89 changed files
with
3,032 additions
and
1,721 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
max-line-length = 120 | ||
extend-ignore = E203 | ||
exclude = alembic/versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Unit Tests | ||
on: push | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Setup poetry | ||
uses: Gr1N/setup-poetry@v8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
poetry install --no-root --no-interaction | ||
- name: Run lint | ||
run: | | ||
poetry run inv lint | ||
- name: Run test suite | ||
run: | | ||
poetry run inv tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
*.db | ||
*.log | ||
__pycache__/ | ||
.mypy_cache/ | ||
.pytest_cache/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,9 @@ Kevin Wallace <[email protected]> | |
Miguel Jacq <[email protected]> | ||
Alexey Shpakovsky <[email protected]> | ||
Josh Washburne <[email protected]> | ||
João Costa <[email protected]> | ||
Sam <[email protected]> | ||
Ash McAllan <[email protected]> | ||
Cassio Zen <[email protected]> | ||
Cocoa <[email protected]> | ||
Jane <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
alembic/versions/2022_12_12_1926-9b404c47970a_add_option_to_hide_announces_from_actor.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"""Add option to hide announces from actor | ||
Revision ID: 9b404c47970a | ||
Revises: fadfd359ce78 | ||
Create Date: 2022-12-12 19:26:36.912763+00:00 | ||
""" | ||
import sqlalchemy as sa | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '9b404c47970a' | ||
down_revision = 'fadfd359ce78' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('actor', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('are_announces_hidden_from_stream', sa.Boolean(), server_default='0', nullable=False)) | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('actor', schema=None) as batch_op: | ||
batch_op.drop_column('are_announces_hidden_from_stream') | ||
|
||
# ### end Alembic commands ### |
48 changes: 48 additions & 0 deletions
48
alembic/versions/2022_12_16_1730-4ab54becec04_add_oauth_client.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
"""Add OAuth client | ||
Revision ID: 4ab54becec04 | ||
Revises: 9b404c47970a | ||
Create Date: 2022-12-16 17:30:54.520477+00:00 | ||
""" | ||
import sqlalchemy as sa | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '4ab54becec04' | ||
down_revision = '9b404c47970a' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('oauth_client', | ||
sa.Column('id', sa.Integer(), nullable=False), | ||
sa.Column('created_at', sa.DateTime(timezone=True), nullable=False), | ||
sa.Column('client_name', sa.String(), nullable=False), | ||
sa.Column('redirect_uris', sa.JSON(), nullable=True), | ||
sa.Column('client_uri', sa.String(), nullable=True), | ||
sa.Column('logo_uri', sa.String(), nullable=True), | ||
sa.Column('scope', sa.String(), nullable=True), | ||
sa.Column('client_id', sa.String(), nullable=False), | ||
sa.Column('client_secret', sa.String(), nullable=False), | ||
sa.PrimaryKeyConstraint('id'), | ||
sa.UniqueConstraint('client_secret') | ||
) | ||
with op.batch_alter_table('oauth_client', schema=None) as batch_op: | ||
batch_op.create_index(batch_op.f('ix_oauth_client_client_id'), ['client_id'], unique=True) | ||
batch_op.create_index(batch_op.f('ix_oauth_client_id'), ['id'], unique=False) | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('oauth_client', schema=None) as batch_op: | ||
batch_op.drop_index(batch_op.f('ix_oauth_client_id')) | ||
batch_op.drop_index(batch_op.f('ix_oauth_client_client_id')) | ||
|
||
op.drop_table('oauth_client') | ||
# ### end Alembic commands ### |
36 changes: 36 additions & 0 deletions
36
alembic/versions/2022_12_18_1126-a209f0333f5a_add_oauth_refresh_token_support.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
"""Add OAuth refresh token support | ||
Revision ID: a209f0333f5a | ||
Revises: 4ab54becec04 | ||
Create Date: 2022-12-18 11:26:31.976348+00:00 | ||
""" | ||
import sqlalchemy as sa | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'a209f0333f5a' | ||
down_revision = '4ab54becec04' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('indieauth_access_token', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('refresh_token', sa.String(), nullable=True)) | ||
batch_op.add_column(sa.Column('was_refreshed', sa.Boolean(), server_default='0', nullable=False)) | ||
batch_op.create_index(batch_op.f('ix_indieauth_access_token_refresh_token'), ['refresh_token'], unique=True) | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('indieauth_access_token', schema=None) as batch_op: | ||
batch_op.drop_index(batch_op.f('ix_indieauth_access_token_refresh_token')) | ||
batch_op.drop_column('was_refreshed') | ||
batch_op.drop_column('refresh_token') | ||
|
||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.