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

Draft: v2.1.0 #364

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b562322
Update defaults.json
hwiedPro Oct 26, 2023
ea4b644
Fix #339
hwied Oct 26, 2023
c9f5bec
Fix #331
hwied Oct 26, 2023
ccae427
Merge branch 'master' into develop
hwiedPro Feb 13, 2024
f93c1ad
Fix install_requirements.py
hwiedPro Feb 13, 2024
1e7a797
Add frame handling
hwiedPro Feb 13, 2024
1a7a6bb
Fix to_hey_color()
hwiedPro Feb 13, 2024
a62fe45
Catch git_error when getting maintainer, author, url
hwiedPro Feb 13, 2024
078fe49
Get log level from env
hwiedPro Feb 13, 2024
53209f9
Add -m option to run pipeline for specific definition file
hwiedPro Feb 13, 2024
872eb0e
Add possibility to define default_export_config in pipeline.yml
hwiedPro Feb 13, 2024
9db3b92
Add verbose option to execute_shell_command
hwiedPro Feb 13, 2024
b3b1ed1
Make to_pretty_xml_string more robust
hwiedPro Feb 13, 2024
3a9e85f
Adapt append_string to logger usage
hwiedPro Feb 13, 2024
701fb4a
Fix setup_git script
hwiedPro Feb 13, 2024
6492934
Fix Git-LFS Readme integration
hwiedPro Feb 13, 2024
866d796
Fix several path/file handling issues
hwiedPro Feb 13, 2024
b8ea40f
Fix model_testing
hwiedPro Feb 13, 2024
fac9da6
Ensure nothing is changed on export()
hwiedPro Feb 13, 2024
0d94abd
Refactored version of Mathias commit: https://github.com/dfki-ric/pho…
hwiedPro Feb 13, 2024
94bdfa9
Merge remote-tracking branch 'origin/master' into develop
Jun 13, 2024
dd48b5d
[BREAKING CHANGES] Squashed refactoring of python module
Jun 13, 2024
bb154d9
Merge remote-tracking branch 'origin/master' into pre_v2.1.0
Jun 13, 2024
646ceaf
Fix #363
hwiedPro Jun 14, 2024
271f34c
Bugfix for 646ceaf
hwiedPro Jun 14, 2024
1e4cc8e
Fix execute_shell_command for Windows
hwiedPro Jul 3, 2024
c950925
Fix faulty indentation
hwiedPro Jul 3, 2024
5928c9b
Bump version to 2.1.0
hwiedPro Jul 3, 2024
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
12 changes: 9 additions & 3 deletions phobos/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,23 @@ def is_binary_file(filepath):
return bool(f.read(256).translate(None, textchars))


def execute_shell_command(cmd, cwd=None, dry_run=False, silent=False):
def execute_shell_command(cmd, cwd=None, dry_run=False, silent=False, verbose=False):
if cwd is None:
cwd = os.getcwd()
if not silent:
log.debug(("Skipping" if dry_run else "Executing") + f": {cmd} in {cwd}")
if dry_run:
return "", ""
proc = subprocess.Popen([cmd], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, cwd=cwd)
proc = subprocess.Popen([cmd], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, cwd=cwd, executable="/bin/bash")
hwiedPro marked this conversation as resolved.
Show resolved Hide resolved
# proc.wait()
(out, err) = proc.communicate()
if not silent:
if verbose:
log.info("Executing: "+cmd+" in "+cwd)
log.info(out.decode('UTF-8'))
log.info(err.decode('UTF-8'))
log.info(f"Subprocess returned {proc.returncode}")
elif not silent:
log.debug("Executing: "+cmd+" in "+cwd)
log.debug(out.decode('UTF-8'))
log.debug(err.decode('UTF-8'))
log.debug(f"Subprocess returned {proc.returncode}")
Expand Down