Skip to content

Commit

Permalink
Merge pull request #14 from facebookresearch/release-utils2
Browse files Browse the repository at this point in the history
include logging file in manifest
  • Loading branch information
anupambhatnagar authored Jan 7, 2023
2 parents 8051faf + a3b898e commit 1bd87fe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
include requirements.txt
include docs/conf.py
include hta/configs/logging.config
include hta/configs/trace_analyzer.json
6 changes: 4 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
7 changes: 3 additions & 4 deletions hta/configs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 1bd87fe

Please sign in to comment.