diff --git a/MANIFEST.in b/MANIFEST.in index 637ff9b..c76cf7d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,4 @@ include requirements.txt include docs/conf.py +include hta/configs/logging.config +include hta/configs/trace_analyzer.json diff --git a/RELEASE.md b/RELEASE.md index e6f4ac7..e0a405d 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -2,12 +2,14 @@ 1. Pull the most recent tags: `git fetch --all --tags`. 1. Create a new branch from main, say `release-vX.Y.Z` where X.Y.Z is the new release number. 1. Bump the version in `hta/version.py`. Versions must adhere to [Semantic Versioning](https://semver.org/). +1. Make a tag, `git tag vX.Y.Z`. +1. Merge the release branch along **with the tag** into main through a PR `git push --tags -u origin + [branch_name]` 1. Install `twine` and `build` locally: `pip install --upgrade twine build`. 1. Build the source distribution and wheel files: `python3 -m build`. 1. Verify the new package can be installed using pip: - 1. In a new conda environment execute: `pip install dist/HolisticTraceAnalysis1.X.Y.Z.tar.gz` + 1. In a new conda environment execute: `pip install dist/HolisticTraceAnalysis-X.Y.Z.tar.gz` 1. Verify version of the new package: `python -c 'import hta; print(hta.__version__)'` -1. Merge the release branch into main through a PR. 1. Upload the release to PyPI: `twine upload dist/*` (requires PyPI account). 1. Create a new release on [this page](https://github.com/facebookresearch/HolisticTraceAnalysis/releases) on Github. diff --git a/hta/configs/config.py b/hta/configs/config.py index 61d29db..708dd97 100644 --- a/hta/configs/config.py +++ b/hta/configs/config.py @@ -15,12 +15,11 @@ ConfigValue = Union[None, bool, int, float, str, Dict[str, Any], List[Any], Set[Any]] -def setup_logger(config_file: str = "$HTA/configs/logging.config") -> logging.Logger: +def setup_logger(config_file: str = "logging.config") -> logging.Logger: global logger if config_file: - if config_file.startswith("$HTA"): - config_file = str(Path(hta.__file__).parent.joinpath(config_file[5:])) - logging.config.fileConfig(config_file) + log_filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), "logging.config") + logging.config.fileConfig(log_filepath) logger = logging.getLogger("hta") elif logger is None: logger = logging.getLogger()