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

Remove use of Ska.Shell #269

Merged
merged 1 commit into from
May 12, 2022
Merged

Remove use of Ska.Shell #269

merged 1 commit into from
May 12, 2022

Conversation

javierggt
Copy link
Contributor

@javierggt javierggt commented Apr 22, 2022

Description

Remove uses of Ska.Shell that can be handled with builtin functions.

Interface impacts

None

Testing

Unit tests

  • Linux (on HEAD)

Independent check of unit tests by Jean

  • Linux

Functional tests

  • Do the following on HEAD:
source /proj/sot/ska3/flight/bin/ska_envs.sh 
cd /proj/sot/ska/jgonzalez/git/mica
git fetch
git co ska-shell
export PYTHONPATH=`pwd`
cd test-pr-269/

and then in python:

from mica.report import report
import getpass
import Ska.DBI
from pathlib import Path

user = getpass.getuser()
cwd = Path().absolute()
db = Ska.DBI.DBI(server='sqlsao', dbi='sybase', user=user, database='axafvv')  # as in test_write_reports
report.REPORT_ROOT = str(cwd)
report.REPORT_SERVER = str(cwd / 'test.db3')

for obsid in [20001, 15175, 54778]:
    report.main(obsid)

and check that all image links are there as expected (dir contents are the same as with the latest release and links are not broken).

Also checked that the bash history does not show the older ln -s ... statements.

@taldcroft
Copy link
Member

The changes look good on the surface. @jeanconn - do you have any suggestions for how to test this?

@jeanconn
Copy link
Contributor

Sure. The current report writing test really just confirms the report writing code runs without error... I don't think it would catch if an underlying symlink were broken. To explicitly test that, I'd probably just do what test_write_reports is doing, but stop and inspect the outputs before just removing the reports (which is the cleanup at the end of test_write_reports).

Copy link
Contributor

@jeanconn jeanconn left a comment

Choose a reason for hiding this comment

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

Looks great to me with that test report.

@javierggt javierggt merged commit 7b71d02 into master May 12, 2022
@javierggt javierggt deleted the ska-shell branch May 12, 2022 16:05
@javierggt javierggt mentioned this pull request May 31, 2022
@javierggt javierggt mentioned this pull request Aug 3, 2022
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.

3 participants