Skip to content

Commit 8ecc563

Browse files
committed
Remove Michael's password from default config file
- 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
1 parent 79293c8 commit 8ecc563

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/fibad/config_utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import toml
55

66
DEFAULT_CONFIG_FILEPATH = Path(__file__).parent.resolve() / "fibad_default_config.toml"
7+
DEFAULT_USER_CONFIG_FILEPATH = Path.cwd() / "fibad_config.toml"
78

89

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

42+
# If a named config exists in cwd, and no config specified on cmdline, use cwd.
43+
if runtime_config_filepath is None and DEFAULT_USER_CONFIG_FILEPATH.exists():
44+
runtime_config_filepath = DEFAULT_USER_CONFIG_FILEPATH
45+
4146
if runtime_config_filepath is not None:
4247
if not runtime_config_filepath.exists():
4348
raise FileNotFoundError(f"Runtime configuration file not found: {runtime_config_filepath}")

src/fibad/fibad_default_config.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ sh = "22asec"
2222
filter = ["HSC-G", "HSC-R", "HSC-I", "HSC-Z", "HSC-Y"]
2323
type = "coadd"
2424
rerun = "pdr3_wide"
25-
username = "mtauraso@local"
26-
password = "cCw+nX53lmNLHMy+JbizpH/dl4t7sxljiNm6a7k1"
2725
max_connections = 2
28-
fits_file = "../hscplay/temp.fits"
29-
cutout_dir = "../hscplay/cutouts/"
26+
fits_file = "./catalog.fits"
27+
cutout_dir = "./data"
3028
offset = 0
3129
num_sources = 500
3230

0 commit comments

Comments
 (0)