Skip to content

Commit

Permalink
RM: Removed unneeded or outdated comments and fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Morris authored and zmorris248 committed Mar 5, 2024
1 parent 8c40842 commit beebb7d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 28 deletions.
4 changes: 2 additions & 2 deletions job_monitoring_app/backend/app/models/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class Event(Base, DateMixin):
-----------
id : int
The primary key of the event
job_id : int
The foreign key of the job
study_id : int
The foreign key of the study
event_name : str
The name of the event
kind : str
Expand Down
4 changes: 0 additions & 4 deletions job_monitoring_app/backend/app/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@ class User(Base, DateMixin):
# TODO: Rename these to be more descriptive ? Hospital and TechCompany ?
api_keys : relationship
The api keys associated with the user (one to many)
jobs : relationship
The jobs associated with the user (one to many)
studies : relationship
The studies associated with the user (one to many)
provider_jobs : relationship
The provider jobs associated with the user (one to many)
provider_studies : relationship
The provider studies associated with the user (one to many)
job_configurations : relationship
Expand Down
5 changes: 2 additions & 3 deletions job_monitoring_app/backend/app/services/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
from .job_configuration import get_step_configuration_by_composite_key
from .studies import get_study_by_provider_study_id

# TODO: @Zach - Can you help me understand the differnce is between Provider and User?

# A provider is a user, but a user is not necessarily a provider. A provider is a user that has a role of "provider"
# users can be providers or customers, customers being patients. This will be later removed since we are doing providers
# and hospitals. It is assumed that providers are the only ones creating events since they are running the studies
# users can be providers or hospitals. It is assumed that providers are the only ones creating events since they are running the studies


def create_event(
Expand Down
19 changes: 0 additions & 19 deletions job_monitoring_app/backend/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,6 @@ def random_provider_user_with_api_key(db, random_provider_user):
return random_provider_user


# TODO - remove this fixture
@pytest.fixture
def job_for_random_user_with_api_key(
db, random_provider_user_with_api_key, random_job_configuration_factory
):
job_configuration = random_job_configuration_factory.get()

job = services.create_job(
db,
schemas.JobCreate(
provider_job_id="145254",
customer_id=random_provider_user_with_api_key.id,
tag=job_configuration.tag,
),
provider=random_provider_user_with_api_key,
)
return job


@pytest.fixture
def study_for_random_user_with_api_key(
db, random_provider_user_with_api_key, random_job_configuration_factory
Expand Down

0 comments on commit beebb7d

Please sign in to comment.