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

Add utility functions, add units tests and package properly #16

Merged
merged 7 commits into from
Aug 27, 2021

Conversation

taldcroft
Copy link
Member

@taldcroft taldcroft commented Aug 25, 2021

Description

This does a few things. The scope expanded because I needed to update the package structure in order to add unit tests.

  • Add get_sun_pitch_yaw and apply_sun_pitch_yaw functions
  • Add unit tests. These are fairly minimal but better than nothing.
  • Update setup.py and other infrastructure to modern standards.
  • Put files into Ska/Sun/ instead of Ska/

Testing

  • Passes unit tests on MacOS
  • Functional testing

Functional test

pip install --user .
cd  # get out of repo
ipython --classic
>>> import Ska.Sun                                                                                                                                        

>>> Ska.Sun.__version__                                                                                                                                   
'3.6.1.dev6+g4303874'

>>> Ska.Sun.test()                                                                                                                                        
================================================================== test session starts ===================================================================
platform darwin -- Python 3.8.3, pytest-6.2.0, py-1.9.0, pluggy-0.13.1
rootdir: /Users/aldcroft/.local/lib/python3.8/site-packages
collected 7 items                                                                                                                                        

Ska/Sun/test_sun.py .......                                                                                                                        [100%]

=================================================================== 7 passed in 0.03s ====================================================================
<ExitCode.OK: 0>

@taldcroft taldcroft changed the title WIP add get_sun_pitch_yaw and apply_sun_pitch_yaw functions Add utility functions, add units tests and package properly Aug 26, 2021
@javierggt
Copy link
Contributor

Looks good to me. I am assuming the functional tests are procedures you have used since before this change, right?

I would have put the test inside a tests directory, thinking of future additions, but no need to change it from what it is.

I also note that this PR requires sot/Quaternion/pull/36

@taldcroft
Copy link
Member Author

taldcroft commented Aug 27, 2021

@javierggt - I moved the test into tests/. Agreed that this is a more standard layout.

About the functional tests, I just made those up as a quick test to ensure that the packaging is right and the test infrastructure in __init__.py is working. This gives me good hope that the conda package build and subsequent skare3 testing will work, but I wouldn't bet my house on it.

After the update I re-ran the functional install testing and also confirmed that unit tests still pass.

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