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

Suppress the setuptools_scm warning #52

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

taldcroft
Copy link
Member

@taldcroft taldcroft commented Dec 17, 2023

Description

This suppresses a warning that gets emitted any time you import astropy_healpix from within a git repo that has files for scm_setuptools.

Interface impacts

None, apart from suppressing that warning.

Testing

Unit tests

  • Mac
(ska3) ➜  ska_helpers git:(suppress-healpix-version-warning) git rev-parse HEAD                         
f9561666f4cb7149765aed42b18bfb9794ea686a
(ska3) ➜  ska_helpers git:(suppress-healpix-version-warning) pytest
=================================================== test session starts ====================================================
platform darwin -- Python 3.10.8, pytest-7.2.1, pluggy-1.0.0
rootdir: /Users/aldcroft/git, configfile: pytest.ini
plugins: timeout-2.1.0, anyio-3.6.2
collected 72 items                                                                                                         

ska_helpers/retry/tests/test_retry.py ..........                                                                     [ 13%]
ska_helpers/tests/test_chandra_models.py ..................                                                          [ 38%]
ska_helpers/tests/test_git_helpers.py s                                                                              [ 40%]
ska_helpers/tests/test_intervals.py .................                                                                [ 63%]
ska_helpers/tests/test_paths.py ......                                                                               [ 72%]
ska_helpers/tests/test_run_info.py ..                                                                                [ 75%]
ska_helpers/tests/test_utils.py ..................                                                                   [100%]

============================================== 71 passed, 1 skipped in 5.83s ===============================================

Independent check of unit tests by [REVIEWER NAME]

  • [PLATFORM]:

Functional tests

Including this PR in the Python path fixes the problem as long as any Ska3 package is imported prior to the import of astropy_healpix.

(ska3) ➜  kadi git:(observations-from-cmds) cd ~/git/kadi           
(ska3) ➜  kadi git:(observations-from-cmds) python -c "import agasc"
/Users/aldcroft/miniconda3/envs/ska3/lib/python3.10/site-packages/setuptools_scm/git.py:295: UserWarning: git archive did not support describe output
  warnings.warn("git archive did not support describe output")
(ska3) ➜  kadi git:(observations-from-cmds) env PYTHONPATH=/Users/aldcroft/git/ska_helpers python -c "import agasc"

@taldcroft taldcroft changed the title WIP: Suppress the setuptools_scm warning Suppress the setuptools_scm warning Jan 2, 2024
@taldcroft taldcroft requested a review from javierggt January 2, 2024 23:59
@taldcroft taldcroft merged commit d8d5e97 into master Jan 4, 2024
2 checks passed
@taldcroft taldcroft deleted the suppress-healpix-version-warning branch January 4, 2024 13:33
@javierggt javierggt mentioned this pull request Feb 6, 2024
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.

2 participants