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

Remove Michael's password from default config file #52

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

mtauraso
Copy link
Collaborator

  • Also make it easier to run fibad commands by using ./fibad_config.toml as the user-supplied config in situations where no config is specified explicitly

An example config you will probably need after this change merges looks something like:

[download]
username = "mtauraso@local"
password = "cCw+nX53lmNLHMy+JbizpH/dl4t7sxljiNm6a7k1"
fits_file = "../hscplay/temp.fits"
cutout_dir = "../hscplay/cutouts/"

[data_loader]
name = "HSCDataLoader"
path = "../hscplay/cutouts"

For downloader and data loader.

If this merges I'm planning to reset my HSC password shortly thereafter in order to avoid the current situation where our pubic repo has live credentials to their system.

- Also make it easier to run fibad commands by using ./fibad_config.toml
  as the user-supplied config in situations where no config is specified
  explicitly
@mtauraso mtauraso self-assigned this Aug 27, 2024
@mtauraso mtauraso requested a review from drewoldag August 27, 2024 19:57
@mtauraso mtauraso linked an issue Aug 27, 2024 that may be closed by this pull request
@mtauraso mtauraso requested a review from aritraghsh09 August 27, 2024 19:57
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 43.98%. Comparing base (79293c8) to head (8ecc563).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/fibad/config_utils.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
+ Coverage   43.86%   43.98%   +0.12%     
==========================================
  Files          16       16              
  Lines         554      557       +3     
==========================================
+ Hits          243      245       +2     
- Misses        311      312       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Before [79293c8] After [01aa988] Ratio Benchmark (Parameter)
2.53±1s 2.13±1s ~0.84 benchmarks.time_computation
1.05k 1.94k 1.85 benchmarks.mem_list

Click here to view all benchmarks.

@@ -38,6 +39,10 @@ def get_runtime_config(
with open(default_config_filepath, "r") as f:
default_runtime_config = toml.load(f)

# If a named config exists in cwd, and no config specified on cmdline, use cwd.
if runtime_config_filepath is None and DEFAULT_USER_CONFIG_FILEPATH.exists():
runtime_config_filepath = DEFAULT_USER_CONFIG_FILEPATH
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing that this is meant to be a convenience so that you don't have to pass in a user config, yeah? If that's the case, I can understand where you're coming from.

However, it also feels like it might open a door for unintended settings. i.e. A user has a fibad_config.toml and a fibad_config2.toml, and fails to pass the config when they want to use the "2" version.

Maybe I'm misinterpreting the utility here though. Let me know if I'm missing a broader point.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's not a broader point to this part beyond the convenience of not passing --runtime-config or config= every time.

@drewoldag
Copy link
Collaborator

Generally this looks fine, but I would like to get your response to the comment I left, just to make sure I understand the intention.

@mtauraso mtauraso merged commit eec383c into main Aug 29, 2024
9 checks passed
@mtauraso mtauraso deleted the issue/44/remove-personal-config branch August 29, 2024 18:12
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.

Remove Michael's credentials for HSC from the default config file.
2 participants