Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- [#128] The error message for a missing config file now shows the full path where the
file was expected to be found.

## [1.1.0] - 2021-06-08
### Added
- [#55] Informative message is displayed when appmap.yml is missing.
Expand Down
2 changes: 1 addition & 1 deletion appmap/_implementation/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def packages(self):
@property
@lru_cache(maxsize=None)
def _config(self):
path = Path(Env.current.get("APPMAP_CONFIG", "appmap.yml"))
path = Path(Env.current.get("APPMAP_CONFIG", "appmap.yml")).resolve()
if path.is_file():
ret = yaml.safe_load(path.read_text())
logger.info('config: %s', ret)
Expand Down
4 changes: 3 additions & 1 deletion appmap/test/test_configuration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Test Configuration"""
# pylint: disable=missing-function-docstring

from pathlib import Path
import pytest

import appmap
Expand Down Expand Up @@ -34,7 +35,8 @@ def test_config_not_found(caplog):
})
assert Config().name is None
assert not appmap.enabled()
assert '"notfound.yml" is missing' in caplog.text
not_found = Path('notfound.yml').resolve()
assert f'"{not_found}" is missing' in caplog.text


cf = lambda: ConfigFilter(NullFilter())
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ python = "^3.6"
PyYAML = "~5.3.0"
inflection = "~0.3.0"
importlib-metadata = ">=0.8"
Django = { version = "^3.1.6", python = "^3.6", optional = true }

[tool.poetry.dev-dependencies]
httpretty = "^1.0.5"
Expand All @@ -48,7 +49,6 @@ pyfakefs = "^4.3.2"
pprintpp = "^0.4.0"
coverage = "^5.3"
pytest-mock = "^3.5.1"
Django = { version = "^3.1.6", python = "^3.6", optional = true }
flask = "^1.1.2"
SQLAlchemy = { version = "^1.4.11", python = "^3.6"}
tox = "^3.22.0"
Expand Down