Skip to content

Commit

Permalink
Remove data steward email from config
Browse files Browse the repository at this point in the history
  • Loading branch information
TheByronHimes committed Mar 19, 2024
1 parent a0ac46c commit 54da00f
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 33 deletions.
2 changes: 0 additions & 2 deletions .devcontainer/.dev_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,4 @@ kafka_servers: ["kafka:9092"]

download_access_url: "http://127.0.0.1:8080/download-access"

data_steward_email: "[email protected]"

auth_key: "{}"
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@ ars --help
### Parameters

The service requires the following configuration parameters:
- **`data_steward_email`**: An email address that can be used to notify data stewards.

- **Any of**

- *string, format: email*

- *null*

- **`access_upfront_max_days`** *(integer)*: The maximum lead time in days to request access grants. Default: `180`.

- **`access_grant_min_days`** *(integer)*: The minimum number of days that the access will be granted. Default: `7`.
Expand Down
14 changes: 0 additions & 14 deletions config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@
"additionalProperties": false,
"description": "Modifies the orginal Settings class provided by the user",
"properties": {
"data_steward_email": {
"anyOf": [
{
"format": "email",
"type": "string"
},
{
"type": "null"
}
],
"description": "An email address that can be used to notify data stewards",
"title": "Data Steward Email"
},
"access_upfront_max_days": {
"default": 180,
"description": "The maximum lead time in days to request access grants",
Expand Down Expand Up @@ -357,7 +344,6 @@
}
},
"required": [
"data_steward_email",
"download_access_url",
"access_request_events_topic",
"access_request_created_type",
Expand Down
1 change: 0 additions & 1 deletion example_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ cors_allow_credentials: false
cors_allowed_headers: []
cors_allowed_methods: []
cors_allowed_origins: []
data_steward_email: [email protected]
db_connection_str: '**********'
db_name: access-requests
docs_url: /docs
Expand Down
7 changes: 1 addition & 6 deletions src/ars/core/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from ghga_service_commons.auth.ghga import AuthContext, has_role
from ghga_service_commons.utils.utc_dates import now_as_utc
from pydantic import EmailStr, Field
from pydantic import Field
from pydantic_settings import BaseSettings

from ars.core.models import (
Expand All @@ -43,10 +43,6 @@
class AccessRequestConfig(BaseSettings):
"""Config parameters needed for the AccessRequestRepository."""

data_steward_email: Optional[EmailStr] = Field(
..., description="An email address that can be used to notify data stewards"
)

access_upfront_max_days: int = Field(
default=6 * 30,
description="The maximum lead time in days to request access grants",
Expand Down Expand Up @@ -76,7 +72,6 @@ def __init__(
self._max_lead_time = timedelta(days=config.access_upfront_max_days)
self._min_duration = timedelta(days=config.access_grant_min_days)
self._max_duration = timedelta(days=config.access_grant_max_days)
self._data_steward_email = config.data_steward_email
self._dao = access_request_dao
self._event_publisher = event_publisher
self._access_grants = access_grants
Expand Down
1 change: 0 additions & 1 deletion tests/fixtures/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ async def joint_fixture_function(
config = Config(
auth_key=AUTH_KEY_PAIR.export_public(), # pyright: ignore
download_access_url="http://access",
data_steward_email="[email protected]",
**kafka_fixture.config.model_dump(),
**mongodb_fixture.config.model_dump(),
)
Expand Down
1 change: 0 additions & 1 deletion tests/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
access_upfront_max_days=365,
access_grant_min_days=30,
access_grant_max_days=2 * 365,
data_steward_email=auth_context_steward.email,
)


Expand Down

0 comments on commit 54da00f

Please sign in to comment.