Skip to content

Commit

Permalink
BUG: Invalid imports
Browse files Browse the repository at this point in the history
BUG: adding import

BUG: updating imports for alembic

BUG: updating config import for alembic

Revert "BUG: adding import"

This reverts commit 5a158bc.

FIX: merge conflict

Revert "BUG: updating config import for alembic"

This reverts commit 41a7f7a

BUG: reverting imports and ignore __init__ for ruff

WIP: trying a different way of formatting

WIP: add two more files to exclude

WIP: going back to just excluding init
  • Loading branch information
ivanjohnson-lab authored and mbrzus committed Feb 9, 2024
1 parent e2e1441 commit 96e5a78
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 3 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ repos:
# Run the linter.
- id: ruff
args: [ --fix , --ignore , "F403" ]
exclude: "__init__"
1 change: 1 addition & 0 deletions job-monitoring-app/backend/app/internal/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .crypto import get_password_hash, verify_password, generate_apikey
8 changes: 8 additions & 0 deletions job-monitoring-app/backend/app/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from .api_key import Apikey
from .base import Base
from .event import Event
from .job import Job
from .job_configuration import JobConfiguration
from .metadata_configuration import MetadataConfiguration
from .step_configuration import StepConfiguration
from .user import User
7 changes: 7 additions & 0 deletions job-monitoring-app/backend/app/routers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from .api_keys import router as apikeys_router
from .auth import router as auth_router
from .jobs import router as jobs_router
from .users import router as users_router
from .events import router as events_router
from .job_configurations import router as job_configurations_router
from .reporting import router as reporting_router
6 changes: 6 additions & 0 deletions job-monitoring-app/backend/app/schemas/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
from app.schemas.api_key import *
from app.schemas.event import Event, EventCreatePublic, EventPure
from app.schemas.job import Job, JobCreate, JobPure
from app.schemas.job_configuration import JobConfiguration, JobConfigurationCreate
from app.schemas.metadata_configuration import MetadataConfigurationCreate
from app.schemas.step_configuration import StepConfigurationCreate, StepConfiguration
from app.schemas.user import User, UserCreate
1 change: 1 addition & 0 deletions job-monitoring-app/backend/config/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .config import config
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def test_get_list_of_latest_versions_for_all_job_configurations_with_version_lat

assert response.status_code == 200
assert len(response.json()) == 2
# TODO Check this test, why is only job configuration 3 and 4 used?

assert response.json()[0]["id"] == job_configuration3.id
assert response.json()[0]["provider_id"] == job_configuration3.provider_id
assert response.json()[0]["created_at"] is not None
Expand Down
8 changes: 6 additions & 2 deletions job-monitoring-app/trackerapi/tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@

import pytest

from trackerapi import JobConfig, JobConfigManager, StepConfig
from trackerapi.helpers import DuplicateJobConfigException, MissingJobConfigException
from trackerapi.schemas import JobConfig, StepConfig
from trackerapi.helpers import (
DuplicateJobConfigException,
MissingJobConfigException,
JobConfigManager,
)

test_job_config = JobConfig(
name="Test Job",
Expand Down
7 changes: 7 additions & 0 deletions job-monitoring-app/trackerapi/trackerapi/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from .api import TrackerApi
from .helpers import (
JobConfigManager,
load_job_configurations_from_json,
load_job_configuration_from_json,
)
from .schemas import JobConfig, StepConfig, JobConfigs

0 comments on commit 96e5a78

Please sign in to comment.