From b39d44d55545a17851f3c05ce9f313c6e4c36a01 Mon Sep 17 00:00:00 2001 From: Anupam Bhatnagar Date: Fri, 6 Jan 2023 17:03:05 -0800 Subject: [PATCH 1/3] include logging file in manifest --- MANIFEST.in | 2 ++ RELEASE.md | 4 +++- hta/configs/config.py | 7 +++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 637ff9b..d54c269 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,4 @@ include requirements.txt +include hta/configs/logging.config +include hta/configs/trace_analyzer.json include docs/conf.py diff --git a/RELEASE.md b/RELEASE.md index e6f4ac7..27475d0 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 `gith push --tags 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. 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() From 7fc93fb425c1fdfa07a75838c89a5f76c2a8f526 Mon Sep 17 00:00:00 2001 From: Anupam Bhatnagar Date: Fri, 6 Jan 2023 17:06:13 -0800 Subject: [PATCH 2/3] fix typo --- RELEASE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 27475d0..6ebdc36 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -3,12 +3,12 @@ 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 `gith push --tags origin +1. Merge the release branch along **with the tag** into main through a PR `gith 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. Upload the release to PyPI: `twine upload dist/*` (requires PyPI account). 1. Create a new release on [this From a3b898e4b18c787cf57fd269fb4fc675b28468a0 Mon Sep 17 00:00:00 2001 From: Anupam Bhatnagar Date: Fri, 6 Jan 2023 17:15:50 -0800 Subject: [PATCH 3/3] [skip ci] fix more typos --- MANIFEST.in | 2 +- RELEASE.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index d54c269..c76cf7d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ include requirements.txt +include docs/conf.py include hta/configs/logging.config include hta/configs/trace_analyzer.json -include docs/conf.py diff --git a/RELEASE.md b/RELEASE.md index 6ebdc36..e0a405d 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -3,7 +3,7 @@ 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 `gith push --tags -u origin +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`.