Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mask usernames in print_config function (#6471) #6913

Merged

Conversation

anudeepadi
Copy link
Contributor

@anudeepadi anudeepadi commented Aug 29, 2023

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
Copy link
Contributor

wyli commented Aug 29, 2023

/black

Signed-off-by: monai-bot <[email protected]>
@wyli
Copy link
Contributor

wyli commented Aug 29, 2023

/build

@wyli wyli enabled auto-merge (squash) August 29, 2023 22:04
@wyli wyli merged commit 2862f53 into Project-MONAI:dev Aug 29, 2023
32 of 37 checks passed
@ericspod
Copy link
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 <[email protected]>
Co-authored-by: monai-bot <[email protected]>
Signed-off-by: KumoLiu <[email protected]>
@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