Skip to content

Commit

Permalink
Added endpoint alias to file deletion events (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
mephenor authored Nov 21, 2023
1 parent 6d09a4e commit f7269ba
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 46 deletions.
1 change: 1 addition & 0 deletions .deprecated_files
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ setup.cfg

.pylintrc
.flake8
.editorconfig
30 changes: 5 additions & 25 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,15 @@
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"files.eol": "\n",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash"
}
},
"sqltools.connections": [
{
"name": "Container database",
"driver": "PostgreSQL",
"previewLimit": 50,
"server": "localhost",
"port": 5432,
"database": "postgres",
"username": "postgres",
"password": "postgres"
}
],
"python.pythonPath": "/usr/local/bin/python",
"python.languageServer": "Pylance",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.formatting.provider": "black",
"python.analysis.typeCheckingMode": "basic",
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint",
"python.testing.pytestPath": "/usr/local/py-utils/bin/pytest",
"python.testing.pytestArgs": [
"--profile"
Expand All @@ -52,6 +30,7 @@
"editor.rulers": [
88
],
"editor.defaultFormatter": "ms-python.black-formatter",
"licenser.license": "Custom",
"licenser.customHeaderFile": "/workspace/.devcontainer/license_header.txt"
},
Expand All @@ -60,7 +39,6 @@
"mikestead.dotenv",
"ms-azuretools.vscode-docker",
"ms-python.python",
"ms-python.isort",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"njpwerner.autodocstring",
Expand All @@ -73,7 +51,9 @@
"yzhang.markdown-all-in-one",
"visualstudioexptteam.vscodeintellicode",
"ymotongpoo.licenser",
"editorconfig.editorconfig"
"charliermarsh.ruff",
"ms-python.black-formatter",
"ms-python.mypy-type-checker"
]
}
},
Expand Down
14 changes: 0 additions & 14 deletions .editorconfig

This file was deleted.

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ dmypy.json
# ignore VS Code settings:
.vscode/

# key stores
*.key
*.rnd
.keystore
.ssl/

# desktop settings and thumbnails
.DS_Store
desktop.ini
Expand Down
1 change: 0 additions & 1 deletion .mandatory_files
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

.devcontainer/dev_launcher
.devcontainer/docker-compose.yml
.devcontainer/Dockerfile

tests/__init__.py
tests/fixtures/__init__.py
Expand Down
1 change: 0 additions & 1 deletion .static_files
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ scripts/README.md
example_data/README.md

.coveragerc
.editorconfig
.gitattributes
.gitignore
.mypy.ini
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "ghga_event_schemas"
version = "1.0.0"
version = "2.0.0"
description = "GHGA Event Schemas: A package that collects schemas used for events exchanged between GHGA service."
readme = "README.md"
authors = [
Expand Down
3 changes: 3 additions & 0 deletions scripts/license_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@
"xml",
"yaml",
"yml",
"tsv",
"fastq",
"gz",
]

# exclude any files with names that match any of the following regex:
Expand Down
13 changes: 9 additions & 4 deletions src/ghga_event_schemas/pydantic_.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class FileUploadReceived(UploadDateModel):
s3_endpoint_alias: str = Field(
...,
description="Alias for the object storage location where the given object is stored."
+ "This can be uniquely mapped to an endpoint URL in the service configuration.",
+ "This can be uniquely mapped to an endpoint configuration in the service.",
)
submitter_public_key: str = Field(
...,
Expand Down Expand Up @@ -194,7 +194,7 @@ class FileUploadValidationSuccess(UploadDateModel):
s3_endpoint_alias: str = Field(
...,
description="Alias for the object storage location where the given object is stored."
+ "This can be uniquely mapped to an endpoint URL in the service configuration.",
+ "This can be uniquely mapped to an endpoint configuration in the service.",
)
decrypted_size: int = Field(
...,
Expand Down Expand Up @@ -260,7 +260,7 @@ class FileUploadValidationFailure(UploadDateModel):
s3_endpoint_alias: str = Field(
...,
description="Alias for the object storage location where the given object is stored."
+ "This can be uniquely mapped to an endpoint URL in the service configuration.",
+ "This can be uniquely mapped to an endpoint configuration in the service.",
)
reason: str = Field(
...,
Expand Down Expand Up @@ -314,7 +314,7 @@ class NonStagedFileRequested(BaseModel):
s3_endpoint_alias: str = Field(
...,
description="Alias for the object storage location where the given object is stored."
+ "This can be uniquely mapped to an endpoint URL in the service configuration.",
+ "This can be uniquely mapped to an endpoint configuration in the service.",
)
decrypted_sha256: str = Field(
...,
Expand Down Expand Up @@ -380,6 +380,11 @@ class FileDeletionRequested(BaseModel):
file_id: str = Field(
..., description="The public ID of the file as present in the metadata catalog."
)
s3_endpoint_alias: str = Field(
...,
description="Alias for the object storage location where the given object is stored."
+ "This can be uniquely mapped to an endpoint configuration in the service.",
)
model_config = ConfigDict(title="file_deletion_requested")


Expand Down

0 comments on commit f7269ba

Please sign in to comment.