Skip to content

Commit

Permalink
Merge pull request #77 from ral-facilities/75_fix_paths
Browse files Browse the repository at this point in the history
#75: Change paths
  • Loading branch information
keiranjprice101 authored Oct 10, 2019
2 parents 1cf7dd9 + 6d1f323 commit 71393af
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
class Config(object):

def __init__(self):
with open(Path("config.json")) as target:
config_path = Path(__file__).parent.parent / "config.json"
with open(config_path) as target:

self.config = json.load(target)
target.close()

Expand Down
2 changes: 1 addition & 1 deletion common/logger_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from common.config import config

log_level = "DEBUG"
LOG_FILE_NAME = Path("logs.log")
LOG_FILE_NAME = Path(__file__).parent.parent / "logs.log"
logger_config = {
"version": 1,
"formatters": {"default": {
Expand Down
2 changes: 1 addition & 1 deletion src/swagger/swagger_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def get_spec_as_dict(self):


class SwaggerGenerator(object):
FILE_PATH = Path.cwd() / "swagger" / "openapi.yaml"
FILE_PATH = Path.cwd() / "src" / "swagger" / "openapi.yaml"

def __init__(self):
self.endpoints = []
Expand Down

0 comments on commit 71393af

Please sign in to comment.