Skip to content

Commit 1d0bfae

Browse files
retry19vchrombie
andauthored
Remove dollar sign on command shells (#216)
* fix: remove dollar sign on command shells Signed-off-by: Reza Rachmanuddin <[email protected]> * Revert a few changes and complete the work Signed-off-by: Venu Vardhan Reddy Tekula <[email protected]> Signed-off-by: Reza Rachmanuddin <[email protected]> Signed-off-by: Venu Vardhan Reddy Tekula <[email protected]> Co-authored-by: Venu Vardhan Reddy Tekula <[email protected]>
1 parent ef63195 commit 1d0bfae

24 files changed

Lines changed: 222 additions & 198 deletions

CONTRIBUTING.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ or suggest something. Any feedback is appreciated!
1818

1919
If you are willing to setup the tutorial locally
2020
```bash
21-
$ git clone https://github.com/chaoss/grimoirelab-tutorial
22-
$ cd grimoirelab-tutorial
23-
$ bundle
24-
$ bundle exec jekyll serve
21+
git clone https://github.com/chaoss/grimoirelab-tutorial
22+
cd grimoirelab-tutorial
23+
bundle
24+
bundle exec jekyll serve
2525
```
2626

2727
**Note:** Make sure you have git and ruby (version 2.7.x) installed.
@@ -43,37 +43,37 @@ which is a fork (copy) of the GrimoireLab Tutorial.
4343
2. Clone the forked git repository, and create in a local branch for your
4444
contribution.
4545

46-
```
47-
$ git clone https://github.com/username/grimoirelab-tutorial/
48-
$ cd grimoirelab-tutorial/
49-
$ git checkout -b new-branch-name
46+
```bash
47+
git clone https://github.com/username/grimoirelab-tutorial/
48+
cd grimoirelab-tutorial/
49+
git checkout -b new-branch-name
5050
```
5151

5252
3. In this repository, set up a remote for the upstream (original grimoirelab-tutorial)
5353
git repository.
5454

55-
```
56-
$ git remote add upstream https://github.com/chaoss/grimoirelab-tutorial/
55+
```bash
56+
git remote add upstream https://github.com/chaoss/grimoirelab-tutorial/
5757
```
5858

5959
4. Now you can change the documentation and then commit it. Except that the
6060
contribution really needs it, use a single commit, and comment in detail in the
6161
corresponding commit message what it is intended to do. If it fixes some bug,
6262
reference it (with the text "_Fixes #23_", for example, for issue number 23).
6363

64-
```
65-
$ git add -A
66-
$ git commit -s
64+
```bash
65+
git add -A
66+
git commit -s
6767
```
6868

6969
5. Once your contribution is ready, rebase your local branch with `upstream/master`,
7070
so that it merges clean with that branch, and push your local branch to a remote
7171
branch to your GitHub repository.
7272

73-
```
74-
$ git fetch upstream
75-
$ git rebase upstream/master
76-
$ git push origin new-branch-name
73+
```bash
74+
git fetch upstream
75+
git rebase upstream/master
76+
git push origin new-branch-name
7777
```
7878

7979
6. In the GitHub interface, produce a pull request from your branch (you will
@@ -97,7 +97,7 @@ For ensuring it, a bot checks all incoming commits.
9797
For users of the git command line interface, a sign-off is accomplished with the
9898
`-s` as part of the commit command:
9999

100-
```
100+
```bash
101101
git commit -s -m 'This is a commit message'
102102
```
103103

basics/dockerhub.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ For using these container images, ensure you have a recent version of `docker` i
77
To try `grimoirelab/full`, just type:
88

99
```bash
10-
$ docker run -p 127.0.0.1:5601:5601 \
11-
-v $(pwd)/credentials.cfg:/override.cfg \
12-
-t grimoirelab/full
10+
docker run -p 127.0.0.1:5601:5601 \
11+
-v $(pwd)/credentials.cfg:/override.cfg \
12+
-t grimoirelab/full
1313
```
1414

1515
`credentials.cfg` should have a GitHub API token, in `mordred.cfg` format:
1616

17-
```
17+
```cfg
1818
[github]
1919
api-token = XXX
2020
```
@@ -28,15 +28,15 @@ The resulting dashboard will be available from Kibiter, and you can see it by po
2828
What is even more interesting: you can get a shell in the container (after launching it), and run arbitrary GrimoireLab commands (`container_id` is the identifier of the running container, that you can find out with `docker ps`, or by looking at the first line when running the container):
2929

3030
```bash
31-
$ docker exec -it container_id env TERM=xterm /bin/bash
31+
docker exec -it container_id env TERM=xterm /bin/bash
3232
```
3333

3434
If you're running the container on Windows through Docker Quickstart Terminal and Oracle VirtualBox, additional steps need to be taken to access the dashboard from your Windows machine. First, you then want to go into the settings for the virtual machine through the VirtualBox manager. To accomplish this, click on your VM, and click on 'Settings'. Now go to the 'Network' tab and you should see two adapters, we want to reconfigure adapter 1. Change the 'Attached to' setting to 'Bridged Adapter', open up the Advanced dropdown, and change the Promiscuous Mode to 'Allow VMs'. Now change Bridged Adapter to NAT and click on Port Forwarding. Here you need to set up a rule that allows port 5601 on the VM to talk to localhost:5601 on your host machine. To do this, click the green diamond with a '+' inside it to add a new rule. Name this rule whatever you wish, set its protocol to TCP, host IP to 127.0.0.1, Host Port to 5601, leave Guest IP blank, and set Guest Port to 5601 and click OK. While you're in settings, I recommend upping the memory for your VM to 2048MB, and setting display memory to 10MB. After you've done this you can now exit all the way out of settings. You now need to stop the docker container if it's currently running, shut down your VM, and restart your VM. Once the VM is restarted, you'll need to run ``ifconfig | grep inet`` on the virtual machine the container is running on to find its local IP address, most likely it will be along the lines of 10.0.2.x. Now rerun
3535

3636
```bash
37-
$ docker run -p x.x.x.x:5601:5601 \
38-
-v $(pwd)/credentials.cfg:/override.cfg \
39-
-t grimoirelab/full
37+
docker run -p x.x.x.x:5601:5601 \
38+
-v $(pwd)/credentials.cfg:/override.cfg \
39+
-t grimoirelab/full
4040
```
4141
but replace the x'ed out IP address with the IP address of your VM that you got from `ifconfig`. If all goes well, once you see the docker command line print out "Elasticsearch Aliased: Created!", you should be able to go to 127.0.0.1:5601 on your host machine web browser and be able to access the GrimoireLab dashboard.
4242

@@ -48,7 +48,7 @@ Have a look at the section
4848

4949
If you happen to run the container in Windows, remember that you should use backslash instead of slash for the paths related to Windows. That means that paths internal to the container will still include slashes, but those that refer to files or directories in the host machine will include backslashes, and maybe disk unit identifiers. For example:
5050

51-
```
52-
$ docker run -p 127.0.0.1:5601:5601 -v D:\test\credentials.cfg:/override.cfg \
51+
```bash
52+
docker run -p 127.0.0.1:5601:5601 -v D:\test\credentials.cfg:/override.cfg \
5353
-v D:\test\projects.json:/projects.json -t grimoirelab/full
5454
```

basics/install.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ This should produce a banner with information about command line arguments, and
104104

105105
Assuming everything was fine, next thing is getting information about an specific backend. Let's start with the git backend, which will be a good starter for testing:
106106

107-
```
107+
```bash
108108
(gl) $ perceval git --help
109109
```
110110

@@ -208,14 +208,14 @@ Some of GrimoireLab dependencies need non-Python packages as pre-requisites to b
208208

209209
* For `dulwich` to be installed, you need to have some Python libraries present. In Debian-derived systems (such as Ubuntu), that can be done by installing the `python3-dev` package:
210210

211-
```
212-
$ sudo apt-get install python3-dev
213-
$ sudo apt-get install build-essential
211+
```bash
212+
sudo apt-get install python3-dev
213+
sudo apt-get install build-essential
214214
```
215215

216216
Usually, you know you need this when you have a problem installing `dulwich`. For example, you check the output of `pip install` and you find:
217217

218-
```
218+
```bash
219219
dulwich/_objects.c:21:10: fatal error: Python.h: No such file or Directory
220220
```
221221

@@ -230,7 +230,7 @@ Previous instructions are for installing the Python packages corresponding to th
230230
It is designed to work standalone, with just a few dependencies. It is easy to produce a Python virtual environment with all GrimoireLab tools (and dependencies) installed, corresponding to the latest version in the master branch of each of the development repositories. Just the utility, and run:
231231

232232
```bash
233-
$ python3 build_grimoirelab --install --install_venv /tmp/ivenv
233+
python3 build_grimoirelab --install --install_venv /tmp/ivenv
234234
```
235235

236236
This will create a virtual environment in `/tmp/ivenv`, which can be activated as follows
@@ -248,19 +248,19 @@ $ source /tmp/ivenv/bin/activate
248248
[releases directory](https://github.com/chaoss/grimoirelab/tree/master/releases) and run (assuming you downloaded the release file `elasticgirl.21` to the current directory):
249249

250250
```bash
251-
$ python3 build_grimoirelab --install --install_venv /tmp/ivenv --relfile elasticgirl.21
251+
python3 build_grimoirelab --install --install_venv /tmp/ivenv --relfile elasticgirl.21
252252
```
253253

254254
If you want, you can also produce the Python packages (wheels and dists) for any release, or the latest versions in development repositories. For example, for building packages for the latest versions in directory `/tmp/dists`:
255255

256256
```bash
257-
$ python3 build_grimoirelab --build --distdir /tmp/ivenv
257+
python3 build_grimoirelab --build --distdir /tmp/ivenv
258258
```
259259

260260
You can get a listing of all the options of `build_grimoirelab` by using its `--help` flag:
261261

262262
```bash
263-
$ python3 build_grimoirelab --help
263+
python3 build_grimoirelab --help
264264
```
265265

266266
There is some explanation about some of them in the

basics/quick.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ Please check the [section on installing non-Python
2929
packages](install.html#non-python-pkgs) if you have any trouble.
3030

3131
```bash
32-
(gl) % pip3 install grimoirelab
32+
(gl) $ pip3 install grimoirelab
3333
```
3434

3535
If everything went well, you can just check the version that you installed:
3636

3737
```bash
38-
(gl) % grimoirelab -v
38+
(gl) $ grimoirelab -v
3939
```
4040

4141
And that's it. You can now skip the rest of this chapter
@@ -54,7 +54,7 @@ standard Debian distro, so you can run those directly.
5454
To run that image, just type:
5555

5656
```bash
57-
% docker run -p 127.0.0.1:9200:9200 \
57+
docker run -p 127.0.0.1:9200:9200 \
5858
-p 127.0.0.1:5601:5601 \
5959
-p 127.0.0.1:3306:3306 \
6060
-e RUN_MORDRED=NO \
@@ -74,7 +74,7 @@ Once the container is running, you can connect to it,
7474
and launch any GrimoireLab command or program in it:
7575

7676
```bash
77-
$ docker exec -it container_id env TERM=xterm /bin/bash
77+
docker exec -it container_id env TERM=xterm /bin/bash
7878
```
7979

8080
That container can be used also, as such,

basics/supporting.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ provided the right version of Python is available. In other platforms, your mile
3333
Python3 is a standard package in Debian, so it is easy to install:
3434

3535
```bash
36-
$ sudo apt-get install python3
36+
sudo apt-get install python3
3737
```
3838

3939
Once installed, you can check the installed version:
4040

4141
```bash
42-
$ python3 --version
42+
python3 --version
4343
```
4444

4545
For installing some other Python modules, including GrimoireLab modules, you will need `pip` for Python3. For using `venv` virtual environments, you will also need `ensurepip`. Both are available in Debian and derivatives as packages `python3-pip` and `python3-venv`:
4646

4747
```bash
48-
$ sudo apt-get install python3-pip
49-
$ sudo apt-get install python3-venv
48+
sudo apt-get install python3-pip
49+
sudo apt-get install python3-venv
5050
```
5151

5252
More information about installing Python3 in other platforms is available in [Properly installing Python](http://docs.python-guide.org/en/latest/starting/installation/). In addition, you can also check information on [how to install pip](https://pip.pypa.io/en/stable/installing/).
@@ -56,7 +56,7 @@ More information about installing Python3 in other platforms is available in [Pr
5656
If you are retrieving data from git repositories, you will need git installed. Pretty simple:
5757

5858
```bash
59-
$ sudo apt-get install git-all
59+
sudo apt-get install git-all
6060
```
6161

6262
More information about installing git in other platforms is available in
@@ -71,7 +71,7 @@ For installing Elasticsearch you can follow its [installation instructions](http
7171
Assuming the installed ElasticSearch directory is `elasticsearch`, to launch it you will just run the appropriate command \(no need to run this from the virtual environment\):
7272

7373
```bash
74-
$ elasticsearch/bin/elasticsearch
74+
elasticsearch/bin/elasticsearch
7575
```
7676

7777
This will launch Elasticsearch that will listen via its HTTP REST API at `http://localhost:9200`. You can check that everything went well by pointing your web browser to that url, and watching the ElasticSearch welcome message.
@@ -91,7 +91,7 @@ You can install Kibana instead of Kibiter. Maybe you will lose some functionalit
9191
Assuming the installed Kibana directory is `kibana`, to launch it, again just run the appropriate command:
9292

9393
```bash
94-
$ kibana/bin/kibana
94+
kibana/bin/kibana
9595
```
9696

9797
This should serve a Kibana instance in `http://localhost:5601`. Point your web browser to that url, and you´ll see the Kibana welcome page.
@@ -105,7 +105,7 @@ Now, we´re ready to go.
105105
Instead of following the installation instructions mentioned above, you can also install ElasticSearch and Kibana as a Docker container, by using pre-composed images. For example:
106106

107107
```bash
108-
$ docker run -d -p 9200:9200 -p 5601:5601 nshou/elasticsearch-kibana
108+
docker run -d -p 9200:9200 -p 5601:5601 nshou/elasticsearch-kibana
109109
```
110110

111111
Then you can connect to Elasticsearch by localhost:9200 and its Kibana front-end by localhost:5601. See [details about these Docker images in DockerHub](https://hub.docker.com/r/nshou/elasticsearch-kibana/)
@@ -116,7 +116,7 @@ Then you can connect to Elasticsearch by localhost:9200 and its Kibana front-end
116116
If you are going to use SortingHat, you will need a database. Currently, MySQL-like databases are supported. In our case, we will use MariaDB. Installing it in Debian is easy:
117117

118118
```bash
119-
$ sudo apt-get install mariadb-server
119+
sudo apt-get install mariadb-server
120120
```
121121

122122
That's it, that's all.

docs/data-sources/add-configurations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ out_index = git_study_forecast
6666
Once you have made the following changes, run your containers with
6767
docker-compose
6868

69-
```console
70-
$ docker-compose up -d
69+
```bash
70+
docker-compose up -d
7171
```
7272

7373
Give it some time to gather the data and after a while your dashboard and data

docs/getting-started/dev-setup.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ mariadb:
130130
```
131131

132132
Save the above into a docker-compose.yml file and run
133-
```console
134-
$ docker-compose up -d
133+
```bash
134+
docker-compose up -d
135135
```
136136
to get Elasticsearch, Kibiter and MariaDB running on your system.
137137

@@ -159,26 +159,26 @@ Each local repo should have two `remotes`: `origin` points to the forked repo,
159159
while `upstream` points to the original CHAOSS repo.
160160

161161
An example is provided below.
162-
```console
163-
$ git remote -v
162+
```bash
163+
git remote -v
164164
origin https://github.com/valeriocos/perceval (fetch)
165165
origin https://github.com/valeriocos/perceval (push)
166166
upstream https://github.com/chaoss/grimoirelab-perceval (fetch)
167167
upstream https://github.com/chaoss/grimoirelab-perceval (push)
168168
```
169169

170170
In order to add a remote to a Git repository, you can use the following command:
171-
```console
172-
$ git remote add upstream https://github.com/chaoss/grimoirelab-perceval
171+
```bash
172+
git remote add upstream https://github.com/chaoss/grimoirelab-perceval
173173
```
174174

175175
#### ProTip
176176

177177
You can use this use this
178178
[script](https://gist.github.com/vchrombie/4403193198cd79e7ee0079259311f6e8) to
179179
automate this whole process.
180-
```console
181-
$ python3 glab-dev-env-setup.py --create --token xxxx --source sources
180+
```bash
181+
python3 glab-dev-env-setup.py --create --token xxxx --source sources
182182
```
183183

184184
### Setting up PyCharm
@@ -255,7 +255,7 @@ url = http://localhost:9200
255255
Run the following commands, which will collect and enrich the data coming from
256256
the git sections and upload the corresponding panels to Kibiter:
257257

258-
```console
258+
```bash
259259
micro.py --raw --enrich --cfg ./setup.cfg --backends git cocom
260260
micro.py --panels --cfg ./setup.cfg
261261
```

0 commit comments

Comments
 (0)