Skip to content

Commit d3ea066

Browse files
committed
fix: replace astroquery_cli imports with src
- Fix module import errors - Replace all 'from astroquery_cli' with 'from src' - Ensure package structure consistency
1 parent a4bc5a5 commit d3ea066

18 files changed

Lines changed: 37 additions & 37 deletions

src/common_options.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import typer
2-
from astroquery_cli import i18n
3-
from astroquery_cli.debug import debug_manager
2+
from src import i18n
3+
from src.debug import debug_manager
44

55
def add_debug_options(callback_func):
66
"""Decorator to add common debug and verbose options to a command callback."""

src/main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,18 @@ def _new_init_log():
5656
# Suppress astroquery log messages globally (moved to __init__.py for earlier execution)
5757
# Monkey patch for astroquery.logger._init_log (moved to __init__.py for earlier execution)
5858

59-
from astroquery_cli import config # Import config first
59+
from src import config # Import config first
6060

6161
# Load configuration from ~/.aqc/config.ini
6262
config.load_config()
6363

6464
# Force early translation initialization (will be re-initialized in callback)
65-
from astroquery_cli import i18n
65+
from src import i18n
6666

6767
i18n.init_translation(i18n.INITIAL_LANG)
6868
builtins._ = i18n._
6969

70-
from astroquery_cli.debug import debug_manager
70+
from src.debug import debug_manager
7171

7272

7373
def save_default_lang(lang):
@@ -241,7 +241,7 @@ def main_callback(
241241
"Debug Mode": debug,
242242
"Verbose Mode": verbose or debug,
243243
"Selected Language": selected_lang,
244-
"Config Path": config.CONFIG_FILE_PATH, # Use the correct config path from astroquery_cli.config
244+
"Config Path": config.CONFIG_FILE_PATH, # Use the correct config path from src.config
245245
"Config File Exists": os.path.exists(config.CONFIG_FILE_PATH),
246246
"Config Content": config_lang if config_lang else "None",
247247
}
@@ -307,12 +307,12 @@ def custom_gettext(message):
307307
)
308308

309309
if ping:
310-
from astroquery_cli.options.ping import run_ping
310+
from src.options.ping import run_ping
311311

312312
run_ping()
313313
raise typer.Exit()
314314
if field:
315-
from astroquery_cli.options.field import run_field
315+
from src.options.field import run_field
316316

317317
run_field()
318318
raise typer.Exit()

src/modules/ads_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import re # Import re
1616
from io import StringIO # Import StringIO
1717
from contextlib import redirect_stdout # Import redirect_stdout
18-
from astroquery_cli.common_options import setup_debug_context # Import setup_debug_context
19-
from astroquery_cli.debug import debug # Import debug function
18+
from src.common_options import setup_debug_context # Import setup_debug_context
19+
from src.debug import debug # Import debug function
2020

2121
def get_app():
2222
import builtins

src/modules/alma_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
from io import StringIO # Import StringIO
1919
from contextlib import redirect_stdout # Import redirect_stdout
2020
import sys # Import sys
21-
from astroquery_cli.common_options import setup_debug_context # Import setup_debug_context
22-
from astroquery_cli.debug import debug # Import debug function
21+
from src.common_options import setup_debug_context # Import setup_debug_context
22+
from src.debug import debug # Import debug function
2323

2424
def get_app():
2525
import builtins

src/modules/esasky_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import re # Import re
1717
from io import StringIO # Import StringIO
1818
from contextlib import redirect_stdout # Import redirect_stdout
19-
from astroquery_cli.common_options import setup_debug_context # Import setup_debug_context
20-
from astroquery_cli.debug import debug # Import debug function
19+
from src.common_options import setup_debug_context # Import setup_debug_context
20+
from src.debug import debug # Import debug function
2121

2222
def get_app():
2323
import builtins

src/modules/eso_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import re
1616
from io import StringIO
1717
from contextlib import redirect_stdout
18-
from astroquery_cli.common_options import setup_debug_context
19-
from astroquery_cli.debug import debug
18+
from src.common_options import setup_debug_context
19+
from src.debug import debug
2020

2121
def get_app():
2222
import builtins

src/modules/exoplanet_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import re
1616
from io import StringIO
1717
from contextlib import redirect_stdout
18-
from astroquery_cli.common_options import setup_debug_context
19-
from astroquery_cli.debug import debug
18+
from src.common_options import setup_debug_context
19+
from src.debug import debug
2020

2121
def get_app():
2222
import builtins

src/modules/gaia_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import re # Import re
1717
from io import StringIO # Import StringIO
1818
from contextlib import redirect_stdout # Import redirect_stdout
19-
from astroquery_cli.common_options import setup_debug_context # Import setup_debug_context
20-
from astroquery_cli.debug import debug # Import debug function
19+
from src.common_options import setup_debug_context # Import setup_debug_context
20+
from src.debug import debug # Import debug function
2121

2222
def get_app():
2323
import builtins

src/modules/heasarc_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import re
1616
from io import StringIO
1717
from contextlib import redirect_stdout
18-
from astroquery_cli.common_options import setup_debug_context
19-
from astroquery_cli.debug import debug
18+
from src.common_options import setup_debug_context
19+
from src.debug import debug
2020

2121
def get_app():
2222
import builtins

src/modules/irsa_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
global_keyboard_interrupt_handler
2222
)
2323
from ..i18n import get_translator
24-
from astroquery_cli.common_options import setup_debug_context # Added for dust
25-
from astroquery_cli.debug import debug # Added for dust
24+
from src.common_options import setup_debug_context # Added for dust
25+
from src.debug import debug # Added for dust
2626

2727
def get_app():
2828
import builtins

0 commit comments

Comments
 (0)