Skip to content

Commit d144666

Browse files
committed
Fixed black precommit hook by upgrading to new version.
Reformatted all files.
1 parent e015238 commit d144666

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+131
-120
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
repos:
2-
# - repo: https://github.com/psf/black
3-
# rev: "19.3b0"
4-
# hooks:
5-
# - id: black
2+
- repo: https://github.com/psf/black
3+
rev: "26.1.0"
4+
hooks:
5+
- id: black
66
- repo: https://github.com/pre-commit/mirrors-prettier
77
rev: "v2.2.1"
88
hooks:

arch.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Taiga uses a hybrid storage approach:
2121
- **S3**: Stores the actual data files (raw files, converted files, etc.)
2222

2323
The database schema is managed through SQLAlchemy ORM with Alembic for migrations. Key models include:
24+
2425
- `User`: User accounts and authentication
2526
- `Entry`: Base class for all content (folders, datasets, etc.)
2627
- `Folder`: Directory-like containers for organizing content
@@ -30,9 +31,9 @@ The database schema is managed through SQLAlchemy ORM with Alembic for migration
3031

3132
In other words the schema is like:
3233

33-
* Dataset has many
34-
* DataVersions has many
35-
* DataFile
34+
- Dataset has many
35+
- DataVersions has many
36+
- DataFile
3637

3738
Those all have a "ownership model" (meaning, if you delete a dataset, all the versions and files should also be deleted).
3839

@@ -48,6 +49,7 @@ The backend is built with Flask and Connexion (for OpenAPI/Swagger integration):
4849
4. **File Processing**: Conversion between different file formats (CSV, HDF5, etc.)
4950

5051
Key components:
52+
5153
- `taiga2/controllers/endpoint.py`: API endpoint implementations
5254
- `taiga2/controllers/models_controller.py`: Database operations
5355
- `taiga2/conv/`: File conversion utilities
@@ -102,4 +104,3 @@ Taiga is deployed as a containerized application:
102104
1. **Authentication**: Token-based authentication
103105
2. **Authorization**: Group-based access control (This is not really fully implemented. If there is code about group-based access, I am willing to bet it is half-implement if at all)
104106
3. **Secure Storage**: Taiga will sign URLs for fetching data from S3 and give them to the client, so that the transfer of large data happens directly between client and S3.
105-

autoapp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
"""Create an application instance."""
3+
34
import os
45

56
from taiga2.api_app import create_app

migrations/versions/028f07e95137_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
Create Date: 2017-07-19 13:50:47.429002
66
77
"""
8+
89
from alembic import op
910
import sqlalchemy as sa
1011

11-
1212
# revision identifiers, used by Alembic.
1313
revision = "028f07e95137"
1414
down_revision = "adb36ec6d16c"

migrations/versions/1cde9ea7a48f_.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
"""empty message
22
33
Revision ID: 1cde9ea7a48f
4-
Revises:
4+
Revises:
55
Create Date: 2017-04-07 13:37:50.512285
66
77
"""
8+
89
from alembic import op
910
import sqlalchemy as sa
1011

11-
1212
# revision identifiers, used by Alembic.
1313
revision = "1cde9ea7a48f"
1414
down_revision = None

migrations/versions/2af60fdf97d1_update_started_log.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
Create Date: 2019-07-18 16:50:09.398289
66
77
"""
8+
89
from alembic import op
910
import sqlalchemy as sa
1011

11-
1212
# revision identifiers, used by Alembic.
1313
revision = "2af60fdf97d1"
1414
down_revision = "c9d2700c78d4"
@@ -20,8 +20,7 @@ def upgrade():
2020
# ### commands auto generated by Alembic - please adjust! ###
2121
# ### end Alembic commands ###
2222
op.execute("delete from activities")
23-
op.execute(
24-
"""
23+
op.execute("""
2524
INSERT into activities (id, user_id, dataset_id, type, dataset_name, dataset_description, dataset_version, timestamp)
2625
SELECT uuid_in(md5(random()::text || clock_timestamp()::text)::cstring), u.id, v.dataset_id, 'started_log', de.name, ve.description, v.version, CURRENT_TIMESTAMP
2726
FROM dataset_versions v
@@ -30,8 +29,7 @@ def upgrade():
3029
JOIN entries de on de.id = d.id,
3130
users u
3231
WHERE u.name = 'admin'
33-
"""
34-
)
32+
""")
3533
op.execute("update entries set description = null where type = 'Dataset'")
3634

3735

migrations/versions/2d1729557360_replace_figshare_oauth_w_personal_token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
Create Date: 2021-01-05 11:39:13.077740
66
77
"""
8+
89
from alembic import op
910
import sqlalchemy as sa
1011

11-
1212
# revision identifiers, used by Alembic.
1313
revision = "2d1729557360"
1414
down_revision = "b1e146e20467"

migrations/versions/3b8cc444f691_add_figshare_update_article.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
Create Date: 2020-04-29 11:56:21.180582
66
77
"""
8+
89
from alembic import op
910
import sqlalchemy as sa
1011

11-
1212
# revision identifiers, used by Alembic.
1313
revision = "3b8cc444f691"
1414
down_revision = "e04e7eb4fb16"

migrations/versions/42d37b47160c_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
Create Date: 2018-09-12 14:04:00.510194
66
77
"""
8+
89
from alembic import op
910
import sqlalchemy as sa
1011
from sqlalchemy.dialects import postgresql
1112

12-
1313
# revision identifiers, used by Alembic.
1414
revision = "42d37b47160c"
1515
down_revision = "9c0d7f0a89e8"

migrations/versions/6bf0d302380c_add_compressed_field.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
Create Date: 2020-02-12 10:58:23.610440
66
77
"""
8+
89
from alembic import op
910
import sqlalchemy as sa
1011

11-
1212
# revision identifiers, used by Alembic.
1313
revision = "6bf0d302380c"
1414
down_revision = "946c898fcded"

0 commit comments

Comments
 (0)