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

Bugfixes #76

Merged
merged 7 commits into from
Feb 4, 2021
Merged

Bugfixes #76

merged 7 commits into from
Feb 4, 2021

Conversation

javierggt
Copy link
Contributor

@javierggt javierggt commented Jan 29, 2021

Description

This is an omnibus PR to fix a collection of small bugs:

Testing

  • Passes unit tests on MacOS, linux, Windows (at least one required)
  • Functional testing
    cp $SKA/data/agasc/* .
    export AGASC_DIR=`pwd`
    agasc-supplement-obs-status --obs-status-file status[_obs|_bad].yml 
    agasc-supplement-update --start 2021:011 --stop 2021:012 [--report]
    agasc-supplement-update # (to check --start==two weeks ago)
    

For functional testing, I have a file called status.yml which contains this:

bad:
  77073552: 11
  23434: 10
obs:
  - obsid: 56311
    ok: false
  - obsid: 56308
    ok: true
    agasc_id: [806750112]
  - obsid: 11849
    ok: false
    agasc_id: [1019348536, 1019350904]
    comments: just removed them

I also made copies of the file including only the obs/bad part. I ran the scripts mentioned. Opened the HDF5 file in ipython and checked that the dtypes were correct, that the values in obs/bad were the ones in the file, and that the mags table times correspond to what was requested.

@taldcroft
Copy link
Member

Let me know when this is ready for review.

@javierggt javierggt mentioned this pull request Jan 29, 2021
2 tasks
@javierggt javierggt force-pushed the bugfixes branch 3 times, most recently from 3ef02be to e5fde6f Compare January 29, 2021 18:31
@javierggt javierggt mentioned this pull request Jan 29, 2021
2 tasks
@taldcroft
Copy link
Member

For functional testing, do you have some canonical test data files to start from? In other words, how can I replicate and verify your functional testing?

@taldcroft
Copy link
Member

And not that I don't believe you, just want a starting point of something that is expected to work and help me learn about running the code.

@javierggt
Copy link
Contributor Author

Actually... for that, you can do it on PR #78, which includes these changes and you see the progress bar.

if start:
logger.warning('Ignoring --start argument from commant line (--whole-history)')
logger.warning('Ignoring --start argument from commant line')
Copy link
Member

Choose a reason for hiding this comment

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

In general, incompatible command line arguments should raise an exception, not warn. Otherwise the program is guessing what the user really wanted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@javierggt javierggt force-pushed the bugfixes branch 2 times, most recently from 7faca45 to 2c32066 Compare February 2, 2021 19:08
Copy link
Member

@taldcroft taldcroft left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@javierggt javierggt merged commit dda17b1 into master Feb 4, 2021
@javierggt javierggt deleted the bugfixes branch February 4, 2021 13:25
@javierggt javierggt mentioned this pull request Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants