Skip to content
Snippets Groups Projects
Unverified Commit 0cef6767 authored by Björn Ludwig's avatar Björn Ludwig
Browse files

docs(README and pull_and_optimize): update information on how to use script

parent 67ba0ce1
No related branches found
No related tags found
1 merge request!1Introduce Chars
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
...@@ -22,15 +22,16 @@ actual code can then be found in the [_src/ilp_keyboard_layout_optimization_ sub ...@@ -22,15 +22,16 @@ actual code can then be found in the [_src/ilp_keyboard_layout_optimization_ sub
We included [a bash script _pull_and_optimize.sh_ We included [a bash script _pull_and_optimize.sh_
](https://git.tu-berlin.de/blutub3d/ilp_keyboard_layout_optimization/-/blob/main/pull_and_optimize.sh) ](https://git.tu-berlin.de/blutub3d/ilp_keyboard_layout_optimization/-/blob/main/pull_and_optimize.sh)
in our codebase to streamline a remote development workflow. We work on the code on a in our codebase to streamline a remote development workflow. We work on the code on a
computer, that is well equipped for that task. The committed and pushed code then computer, that is well-equipped for that task. The committed and pushed code then
gets processed on another machine, which uses this script, to update its code base gets processed on another machine, which uses this script, to update its code base
and run the parameters handed over. It is designed to have the Python script name and run the parameters handed over. It is designed to be called without parameters
for execution with a Python interpreter and PySCIPOpt as the only parameter, e.g. to execute the _optimize_ module of the [latest version released on Test.PyPI.org
](https://test.pypi.org/project/ilp-keyboard-layout-optimization/).
```shell ```shell
$ ./pull_and_optimize.sh ilp_optimize.py $ ./pull_and_optimize.sh
``` ```
The execution requires the Docker image of our repository [docker_pyscipopt The execution requires the Docker image of our repository [docker_pyscipopt
](https://github.com/BjoernLudwigPTB/docker_pyscipopt) to be built in advance but it ](https://github.com/BjoernLudwigPTB/docker_pyscipopt) to be built in advance, but it
could be easily adapted for a local installation of the SCIP Optimization Suite. could be easily adapted for a local installation of the SCIP Optimization Suite.
\ No newline at end of file
...@@ -2,9 +2,19 @@ ...@@ -2,9 +2,19 @@
# This script was written to streamline a remote development workflow. We work on the # This script was written to streamline a remote development workflow. We work on the
# code on a computer, that is well equipped for that task. The committed and pushed # code on a computer, that is well equipped for that task. The committed and pushed
# code then gets processed on another machine, which uses this script, to update its # code then gets processed on another machine, which uses this script, to update its
# code base and run the parameters handed over. It is designed to have the script # code base and run the parameters handed over. It is designed to be called without
# name for execution with a Python interpreter and PySCIPOpt as the only parameter, e.g. # parameters to execute the optimize module of the latest version released on
# $ ./pull_and_optimize.sh ilp_optimize.py # Test.PyPI.org.
#
# $ ./pull_and_optimize.sh
#
# Alternatively you could invoke any other command in the Python interpreter by
# appending any command, normally appended to 'python <YOUR_COMMAND>' to the script.
# i.e.
#
#
# $ ./pull_and_optimize.sh -m pytest
#
# The execution requires the Docker image of our repository # The execution requires the Docker image of our repository
# https://github.com/BjoernLudwigPTB/docker_pyscipopt to be built in advance. # https://github.com/BjoernLudwigPTB/docker_pyscipopt to be built in advance.
SCRIPT_PATH="${BASH_SOURCE}" SCRIPT_PATH="${BASH_SOURCE}"
...@@ -20,5 +30,5 @@ cd ${SCRIPT_DIR} ...@@ -20,5 +30,5 @@ cd ${SCRIPT_DIR}
git pull git pull
docker build -t ilp_keyboard_layout_optimization:latest docker/ docker build -t ilp_keyboard_layout_optimization:latest docker/
docker run -it --rm ilp_keyboard_layout_optimization \ docker run -it --rm ilp_keyboard_layout_optimization \
-m ilp_keyboard_layout_optimization.optimize ${1:--m ilp_keyboard_layout_optimization.optimize}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment