-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from DSD-DBS/license-headers
License headers
- Loading branch information
Showing
368 changed files
with
2,012 additions
and
688 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright DB Netz AG and the capella-collab-manager contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
repos: | ||
- repo: https://github.com/Lucas-C/pre-commit-hooks | ||
rev: v1.1.13 | ||
hooks: | ||
- id: insert-license | ||
name: Insert Licence for Python, YAML and Dockerfiles | ||
files: '\.py$|\.yaml$|^Dockerfile$|^Makefile$' | ||
args: | ||
- --license-filepath | ||
- license_header.txt | ||
- --comment-style | ||
- '#' | ||
- id: insert-license | ||
name: Insert Licence for HTML files | ||
files: '\.html$' | ||
args: | ||
- --license-filepath | ||
- license_header.txt | ||
- --comment-style | ||
- '<!--| ~| -->' | ||
- id: insert-license | ||
name: Insert Licence for Typescript files | ||
files: '\.ts$' | ||
args: | ||
- --license-filepath | ||
- license_header.txt | ||
- --comment-style | ||
- '//' | ||
- id: insert-license | ||
name: Insert Licence for CSS files | ||
files: '\.css$' | ||
args: | ||
- --license-filepath | ||
- license_header.txt | ||
- --comment-style | ||
- '/*| *| */' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Copyright DB Netz AG and the capella-collab-manager contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
import setuptools | ||
|
||
setuptools.setup() |
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
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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/0a16fb85f762_add_t4c_username_to_ease_backup.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/1b4c1dc944d6_remove_rdp_username.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/279ec954b302_session_add_passwords_for_rdp_and_.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/2eeda6a7bd66_add_notices_datastructures.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/377b60de4441_link_git_repositories_with_projects.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/52aec4f341a5_use_repository_name_instead_of_.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/687484695147_add_persistent_enum.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/6a8bdec1dccb_add_databaseproject.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/9259062f0f62_remove_unique_constraint_for_project.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/bfafdd03e30c_add_git_models_for_repositories.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/c926d3e402a8_merge_branches_permissions_and_.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/caa0ecb7b28d_add_ease_backup_table.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/d3c85f34aae6_add_host_to_session.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/d6a23ac7f263_add_credentials_for_gitmodels.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/d7fe491603c3_add_cascades.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/f3ed32b2cfb0_add_jenkinspipeline.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/f3efdcedfdde_add_read_write_access.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
3 changes: 3 additions & 0 deletions
3
backend/t4cclient/alembic/versions/fc6250459067_use_project_id_as_reference_instead_of_.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Copyright DB Netz AG and the capella-collab-manager contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
from sqlalchemy import create_engine | ||
from sqlalchemy.ext.declarative import declarative_base | ||
from sqlalchemy.orm import sessionmaker | ||
from t4cclient import config | ||
|
||
engine = create_engine(config.DATABASE_URL) | ||
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) | ||
|
||
Base = declarative_base() | ||
|
||
|
||
def get_db(): | ||
db = SessionLocal() | ||
try: | ||
yield db | ||
finally: | ||
db.close() | ||
# Copyright DB Netz AG and the capella-collab-manager contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
from sqlalchemy import create_engine | ||
from sqlalchemy.ext.declarative import declarative_base | ||
from sqlalchemy.orm import sessionmaker | ||
from t4cclient import config | ||
|
||
engine = create_engine(config.DATABASE_URL) | ||
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) | ||
|
||
Base = declarative_base() | ||
|
||
|
||
def get_db(): | ||
db = SessionLocal() | ||
try: | ||
yield db | ||
finally: | ||
db.close() |
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
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,25 +1,28 @@ | ||
import typing as t | ||
|
||
from sqlalchemy.orm import Session | ||
from t4cclient.sql_models.repositories import DatabaseRepository | ||
|
||
|
||
def get_repository(db: Session, name: str): | ||
return db.query(DatabaseRepository).filter(DatabaseRepository.name == name).first() | ||
|
||
|
||
def get_all_repositories(db: Session) -> t.List[DatabaseRepository]: | ||
return db.query(DatabaseRepository).all() | ||
|
||
|
||
def create_repository(db: Session, name: str): | ||
repo = DatabaseRepository(name=name, users=[]) | ||
db.add(repo) | ||
db.commit() | ||
db.refresh(repo) | ||
return repo | ||
|
||
|
||
def delete_repository(db: Session, name: str): | ||
db.query(DatabaseRepository).filter(DatabaseRepository.name == name).delete() | ||
db.commit() | ||
# Copyright DB Netz AG and the capella-collab-manager contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
import typing as t | ||
|
||
from sqlalchemy.orm import Session | ||
from t4cclient.sql_models.repositories import DatabaseRepository | ||
|
||
|
||
def get_repository(db: Session, name: str): | ||
return db.query(DatabaseRepository).filter(DatabaseRepository.name == name).first() | ||
|
||
|
||
def get_all_repositories(db: Session) -> t.List[DatabaseRepository]: | ||
return db.query(DatabaseRepository).all() | ||
|
||
|
||
def create_repository(db: Session, name: str): | ||
repo = DatabaseRepository(name=name, users=[]) | ||
db.add(repo) | ||
db.commit() | ||
db.refresh(repo) | ||
return repo | ||
|
||
|
||
def delete_repository(db: Session, name: str): | ||
db.query(DatabaseRepository).filter(DatabaseRepository.name == name).delete() | ||
db.commit() |
Oops, something went wrong.