From dc07c99c38b9730f7f44c6b6e7461f98ffbcc9ad Mon Sep 17 00:00:00 2001 From: "Hock, Martin" <martin.hock@fst.tu-darmstadt.de> Date: Wed, 22 Jun 2022 10:19:52 +0200 Subject: [PATCH] Adjust code blocks in readme --- README.md | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 6251db4..5f9a25a 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,12 @@ Currently there are two options to run PlotID. Either install it via pip from th ### From PyPi with pip 1. *Optional* Create a virtual environment and activate it: -`pip install venv` -`mkdir venv` -`python3 -m venv` -`source venv/bin/activate` +```bash +pip install venv +mkdir venv +python3 -m venv +source venv/bin/activate +``` 2. Install PlotID `pip install --upgrade --index-url https://test.pypi.org/simple/ example-package-plotid-test` @@ -24,10 +26,12 @@ Currently there are two options to run PlotID. Either install it via pip from th `git clone https://git.rwth-aachen.de/plotid/plotid_python.git` `cd plotid_python` 2. [Optional] Create a virtual environment: -`pip install venv` -`mkdir venv` -`python3 -m venv` -`source venv/bin/activate` +```bash +pip install venv +mkdir venv +python3 -m venv +source venv/bin/activate +``` 3. Install dependencies `pip install -r requirements.txt` 4. Install PlotID @@ -56,10 +60,12 @@ Optional parameters can be used to customize the tag process. Location for ID to be displayed on the plot. Default is 'east'. Example: - FIG1 = plt.figure() - FIG2 = plt.figure() - FIGS_AS_LIST = [FIG1, FIG2] - [TAGGED_FIGS, ID] = tagplot(FIGS_AS_LIST, 'matplotlib', prefix='XY23_', id_method='random', location='west') +```python +FIG1 = plt.figure() +FIG2 = plt.figure() +FIGS_AS_LIST = [FIG1, FIG2] +[TAGGED_FIGS, ID] = tagplot(FIGS_AS_LIST, 'matplotlib', prefix='XY23_', id_method='random', location='west') +``` ### publish() @@ -85,10 +91,12 @@ If you want to build PlotID yourself, follow these steps: `git clone https://git.rwth-aachen.de/plotid/plotid_python.git` `cd plotid_python` 2. [Optional] Create a virtual environment: -`pip install venv` -`mkdir venv` -`python3 -m venv` -`source venv/bin/activate` +```bash +pip install venv +mkdir venv +python3 -m venv +source venv/bin/activate +``` 3. [Optional] Run unittests and coverage: `python3 tests/runner_tests.py` 4. Build the package @@ -96,4 +104,4 @@ If you want to build PlotID yourself, follow these steps: ## Documentation If you have more questions about PlotID, please have a look at the [documentation](link-to-docs). -Also have a look at the example.py that is shipped with PlotID. \ No newline at end of file +Also have a look at the example.py that is shipped with PlotID. -- GitLab