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

added findfeaturesSegment script #5091

Merged
merged 21 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ pipeline {
cd $WORKSPACE/isis/pytests
pytest .

cd $WORKSPACE/isis/python_bindings/tests
pytest .
Comment on lines +120 to +121
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added the tests to jenkins

'''
}
}
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:

dependencies:
- kalasiris
- ale=0.9.1
- ale>=0.8.8
- armadillo
- boost=1.72
- boost-cpp=1.72
Expand Down
1 change: 1 addition & 0 deletions isis/python_bindings/apps/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import findFeaturesSegment
Empty file.
Binary file not shown.
38 changes: 38 additions & 0 deletions isis/python_bindings/tests/test_install.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import importlib.util
import sys
import subprocess


def test_module_import():
name = 'astroset'
if name in sys.modules:
print(f"{name!r} already in sys.modules")
assert (spec := importlib.util.find_spec(name)) is not None

def test_check_pip_install():
package_name = "astroset"
try:
# Check if the package is installed by running the "pip show" command
result = subprocess.check_output(['pip', 'show', package_name])
package_info = result.decode('utf-8')

# Parse the package information to check if it contains the package name
assert(package_name.lower() in package_info.lower())

except subprocess.CalledProcessError:
assert False

def test_app_install():
app_name = 'findFeaturesSegment.py'
try:
# Check if the package is installed by running the "pip show" command
result = subprocess.check_output([app_name, '-H'])
help_string = result.decode('utf-8')

# Parse the package information to check if it contains the package name
assert("from" in help_string.lower())
assert("fromlist" in help_string.lower())

except subprocess.CalledProcessError:
assert False
Comment on lines +6 to +37
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

some simple install scripts