Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cumbia-project-tools
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs
lib
cumbia
cumbia-project-tools
Commits
d5c14ab5
Commit
d5c14ab5
authored
5 days ago
by
Giacomo Strangolino
Browse files
Options
Downloads
Patches
Plain Diff
fancy printing in python pycumbia module load tests
parent
662cc1ca
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cumbia-project-new.sh
+1
-1
1 addition, 1 deletion
cumbia-project-new.sh
pycumbia-python-test.sh
+39
-19
39 additions, 19 deletions
pycumbia-python-test.sh
with
40 additions
and
20 deletions
cumbia-project-new.sh
+
1
−
1
View file @
d5c14ab5
...
...
@@ -161,7 +161,7 @@ find "$dest_dir" -type f | while read -r file; do
done
if
find
"
$dest_dir
"
-name
".gitignore"
-print
-quit
|
grep
-q
.
;
then
echo
-e
"
\e
[1;36m-
\e
[0m
\e
[1;3m.gitignore
\e
[0m file
created in
$dest_dir
"
echo
-e
"
\e
[1;36m-
\e
[0m
directory
\e
[1;3m
$dest_dir
\e
[0m contains
\e
[1;3m.gitignore
\e
[0m file"
fi
# Success message
...
...
This diff is collapsed.
Click to expand it.
pycumbia-python-test.sh
+
39
−
19
View file @
d5c14ab5
...
...
@@ -8,42 +8,62 @@ python_test() {
fi
err
=
0
echo
-e
-n
"
\e
[1;36m?
\e
[0m
\e
[3mfrom PyCumbia.Cumbia import Cumbia ..."
echo
-e
-n
"[
\e
[1;36mTEST
\e
[0m ]
\e
[3mfrom PyCumbia.Cumbia import Cumbia
\e
[0m ..."
# 1. PyCumbia.Cumbia
python
-c
"from PyCumbia.Cumbia import Cumbia"
2>/dev/null
if
[
$?
-eq
0
]
;
then
echo
-e
"
\t
[
\e
[1;32mOK
\e
[0m ]"
echo
-e
-n
"
\e
[1;36m?
\e
[0m
\e
[3mfrom PyCumbia.QtControls import QuLabel, QuTrendPlot, QuSpectrumPlot, QuButton, CuContext
\e
[0m ..."
echo
-e
"
\r
[
\e
[1;32mSUCCESS
\e
[0m ] from PyCumbia.Cumbia import Cumbia"
echo
-e
-n
"[
\e
[1;36mTEST
\e
[0m ]
\e
[3mfrom PyCumbia.QtControls import QuLabel, QuTrendPlot, QuSpectrumPlot, QuButton, CuContext
\e
[0m ..."
# 2. PyCumbia.QtControls
python
-c
"from PyCumbia.QtControls import QuLabel, QuTrendPlot, QuSpectrumPlot, QuButton, CuContext"
2>/dev/null
else
echo
-e
"
\r
[
\e
[1;31mFAILED
\e
[0m ] from PyCumbia.Cumbia import Cumbia"
err
=
1
fi
if
[
$?
-eq
0
]
;
then
echo
-e
"
\t
[
\e
[1;32mOK
\e
[0m ]"
echo
-e
-n
"
\e
[1;36m?
\e
[0m
\e
[3mfrom PyCumbia.Apps import CuModuleLoader
\e
[0m ..."
if
[
$?
-eq
0
]
&&
[
$err
-eq
0
]
;
then
sleep
0.1
# fancy sleep and \r
echo
-e
"
\r
[
\e
[1;32mSUCCESS
\e
[0m ] from PyCumbia.QtControls import QuLabel, QuTrendPlot, QuSpectrumPlot, QuButton, CuContext"
echo
-e
-n
"[
\e
[1;36mTEST
\e
[0m ]
\e
[3mfrom PyCumbia.Apps import CuModuleLoader
\e
[0m ..."
python
-c
"from PyCumbia.Apps import CuModuleLoader"
2>/dev/null
else
elif
[
$err
-eq
0
]
;
then
echo
-e
"
\r
[
\e
[1;31mFAILED
\e
[0m ] from PyCumbia.QtControls import QuLabel, QuTrendPlot, QuSpectrumPlot, QuButton, CuContext"
err
=
1
fi
if
[
$err
-eq
0
]
;
then
echo
-e
"
\t
[
\e
[1;32mOK
\e
[0m ]"
echo
-e
-n
"
\e
[1;36m?
\e
[0m
\e
[3mfrom PyCumbia.Plugins import Image
\e
[0m ..."
if
[
$?
-eq
0
]
&&
[
$err
-eq
0
]
;
then
sleep
0.1
# fancy sleep and \r
echo
-e
"
\r
[
\e
[1;32mSUCCESS
\e
[0m ] from PyCumbia.Apps import CuModuleLoader"
echo
-e
-n
"[
\e
[1;36mTEST
\e
[0m ]
\e
[3mfrom PyCumbia.Plugins import Image
\e
[0m ..."
python
-c
"from PyCumbia.Plugins import Image"
2>/dev/null
else
elif
[
$err
-eq
0
]
;
then
echo
-e
"
\r
[
\e
[1;31mFAILED
\e
[0m ] from PyCumbia.Apps import CuModuleLoader"
err
=
1
fi
if
[
$err
-eq
0
]
;
then
echo
-e
"
\t
[
\e
[1;32mOK
\e
[0m ]"
echo
-e
-n
"
\e
[1;36m?
\e
[0m
\e
[3mfrom PyCumbia.Plugins import Multireader
\e
[0m ..."
if
[
$?
-eq
0
]
&&
[
$err
-eq
0
]
;
then
sleep
0.1
# fancy sleep and \r
echo
-e
"
\r
[
\e
[1;32mSUCCESS
\e
[0m ] from PyCumbia.Plugins import Image"
echo
-e
-n
"[
\e
[1;36mTEST
\e
[0m ]
\e
[3mfrom PyCumbia.Plugins import Multireader
\e
[0m ..."
python
-c
"from PyCumbia.Plugins import Multireader"
2>/dev/null
else
elif
[
$err
-eq
0
]
;
then
echo
-e
-n
"
\r
[
\e
[1;31mFAILED
\e
[0m ]
\e
[3mfrom PyCumbia.Plugins import Image
\e
[0m"
err
=
1
fi
if
[
$?
-eq
0
]
&&
[
$err
-eq
0
]
;
then
sleep
0.1
# fancy sleep and \r
echo
-e
"
\r
[
\e
[1;32mSUCCESS
\e
[0m ] from PyCumbia.Plugins import Multireader"
elif
[
$err
-eq
0
]
;
then
echo
-e
"
\r
[
\e
[1;31mFAILED
\e
[0m ] from PyCumbia.Plugins import Multireader"
err
=
1
fi
if
[
$err
-eq
0
]
;
then
echo
-e
"
\t
[
\e
[1;32mOK
\e
[0m ]"
echo
-e
"
\e
[1;32m*
\e
[0m some relevant
\e
[1;3mpycumbia
\e
[0m modules have been successfully loaded in the current python environment."
else
echo
-e
"
\t
[
\e
[1;31mFAILED
\e
[0m ]
"
echo
-e
"
\e
[1;31m*
\e
[0m
your current python environment does not allow loading one or more
\e
[1;3mpycumbia
\e
[0m modules
"
echo
-e
"
\e
[1;31m*
\e
[0m you probably need to either adjust
\e
[1;3mPYTHONPATH
\e
[0m or activate the
\e
[3mconda
\e
[0m environment"
echo
"
"
echo
-e
"
\e
[1;31m*
\e
[0m
one or more
\e
[1;3mpycumbia
\e
[0m modules failed to load in the current python environment
"
echo
-e
"
\e
[1;31m*
\e
[0m you probably need to either adjust
\e
[1;3mPYTHONPATH
\e
[0m or activate the
\e
[
1;
3mconda
\e
[0m environment"
fi
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment