Skip to content

Mask usernames in print_config function (#6471) - #6913

Merged
wyli merged 2 commits into
Project-MONAI:devfrom
anudeepadi:feature/mask-user-info-in-print-config-6471
Aug 29, 2023
Merged

wyli merged 2 commits into
Project-MONAI:devfrom
anudeepadi:feature/mask-user-info-in-print-config-6471

Conversation

@anudeepadi

@anudeepadi anudeepadi commented Aug 29, 2023 •

Copy link
Copy Markdown
Contributor

Fixes #6471

Description

A few sentences describing the changes proposed in this pull request.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@wyli

wyli commented Aug 29, 2023

Copy link
Copy Markdown
Contributor

/black

Signed-off-by: monai-bot <monai.miccai2019@gmail.com>
@wyli

wyli commented Aug 29, 2023

Copy link
Copy Markdown
Contributor

/build

@wyli
wyli enabled auto-merge (squash) August 29, 2023 22:04
@wyli
wyli merged commit 2862f53 into Project-MONAI:dev Aug 29, 2023
@ericspod

Copy link
Copy Markdown
Member

This will work almost always but if home directories are in other locations, eg. networked directories, the regex patterns won't match. I'd suggest a more thorough approach is to get the username with getpass.getuser() or os.path.basename(os.path.expanduser("~")) then replace all instances of that string in the output with "". This will catch more places but will miss paths that might contain other identifying names, but these should be very rare.

KumoLiu pushed a commit to KumoLiu/MONAI that referenced this pull request Aug 30, 2023
…-MONAI#6913)

Fixes Project-MONAI#6471 

### Description

A few sentences describing the changes proposed in this pull request.

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: monai-bot <monai.miccai2019@gmail.com>
Co-authored-by: monai-bot <monai.miccai2019@gmail.com>
Signed-off-by: KumoLiu <yunl@nvidia.com>
@anudeepadi
anudeepadi deleted the feature/mask-user-info-in-print-config-6471 branch August 31, 2023 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

print_config to hide user info

4 participants