-
Notifications
You must be signed in to change notification settings - Fork 6
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
DM-14806: bring demo to standards #20
Changes from 17 commits
39c8da9
629537d
fd8b009
a78e8f2
02dbb7b
db25963
ad431c7
84f2e64
ea2646e
d1dd51a
26a9ded
4800e17
a953643
4897f00
1d8b8ab
9ecc6b8
229c8d3
44d36a8
841b0d2
13a6dfb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
.cache | ||
pytest_session.txt | ||
output | ||
output_small | ||
detected-sources.txt | ||
detected-sources_small.txt | ||
astrometry_sdss.png | ||
bin | ||
|
||
.coverage | ||
.sconf_temp/ | ||
.sconsign.dblite | ||
config.log | ||
python/lsst/lsst/dm/stack/demo/version.py | ||
tests/.tests/ | ||
tests/__pycache__/ | ||
ups/__pycache__/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
sudo: false | ||
language: python | ||
matrix: | ||
include: | ||
- python: '3.6' | ||
install: | ||
- pip install flake8 | ||
script: flake8 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# -*- python -*- | ||
from lsst.sconsUtils import scripts | ||
scripts.BasicSConstruct("lsst_dm_stack_demo", disableCc=True) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# -*- python -*- | ||
from lsst.sconsUtils import scripts | ||
scripts.BasicSConscript.shebang() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[flake8] | ||
max-line-length = 110 | ||
ignore = E133, E226, E228, N802, N803, N806 | ||
exclude = andConfig.py, processCcd.py | ||
|
||
[tool:pytest] | ||
addopts = --flake8 | ||
flake8-ignore = E133 E226 E228 N802 N803 N806 | ||
processCcd.py ALL | ||
andConfig.py ALL | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New line needed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# -*- python -*- | ||
from lsst.sconsUtils import scripts | ||
scripts.BasicSConscript.tests(pyList=[]) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# | ||
# LSST Data Management System | ||
# Copyright 2012-2017 LSST Corporation. | ||
# | ||
# This product includes software developed by the | ||
# LSST Project (http://www.lsst.org/). | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the LSST License Statement and | ||
# the GNU General Public License along with this program. If not, | ||
# see <http://www.lsstcorp.org/LegalNotices/>. | ||
# | ||
|
||
import unittest | ||
import os | ||
|
||
import lsst.utils.tests | ||
from lsst.utils import getPackageDir | ||
|
||
package_root = getPackageDir('lsst_dm_stack_demo') | ||
|
||
executable_dir = os.path.join(package_root, 'bin') | ||
|
||
|
||
class DemoTestCase(lsst.utils.tests.ExecutablesTestCase): | ||
"""Test the demo scrpts for executablility.""" | ||
def testDemo(self): | ||
"""Test demo""" | ||
self.assertExecutable("demo.sh", | ||
root_dir=executable_dir, | ||
args=["--small"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it okay to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm going to leave as is for now as I don't know how this will be dealt with down the road. |
||
msg="Running demo failed") | ||
self.assertExecutable("compare.py", | ||
root_dir=executable_dir, | ||
args=['detected-sources_small.txt'], | ||
msg="Compare failed") | ||
self.assertExecutable("check_astrometry.py", | ||
root_dir=executable_dir, | ||
args=['output_small'], | ||
msg="Check astrometry failed") | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# -*- python -*- | ||
|
||
import lsst.sconsUtils | ||
|
||
dependencies = dict( | ||
) | ||
|
||
config = lsst.sconsUtils.Configuration( | ||
__file__, | ||
libs=[], | ||
hasDoxygenInclude=False, | ||
hasSwigFiles=False, | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
setupRequired(python) | ||
setupRequired(utils) | ||
setupRequired(sconsUtils) | ||
setupRequired(obs_sdss) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I did this. |
||
|
||
envPrepend(PATH, ${PRODUCT_DIR}/bin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to decide whether the instructions then say "run scons" or whether they stay as they are and we make
demo.sh
look in../bin.src/
for the Python code.