Custom Search

Monday, July 24, 2017

Openstack How to do doc8 scan

1)
Got your project folder (cloned from github)

2)
$ tox -v -epep8

3)
$ source .tox/pep8/bin/activate

4)
$ doc8 -e .rst doc/source/

* .rst means scan only *.rst files


OpenStack Creating release notes with Reno

https://docs.openstack.org/reno/latest/user/usage.html

1)
https://docs.openstack.org/reno/latest/install/index.html
$ pip install reno

2)
The reno command line tool is used to create a new release note file in the correct format and with a unique name.

$ tox reno new my-new-release1

By default, the new note is created under ./releasenotes/notes.

OR

$ tox -e venv -- reno new my-new-release1
$ source .tox/venv/bin/activate

3)

Sunday, July 9, 2017

golang How to Install and Setup Jupyter notebook

1)
Download Go compiler from https://golang.org/dl/

2)
Extract it ($HOME/gocompiler/)

3)
Create a new directory for your go project ($HOME/golexamples/myproject1)

4)
Add the following lines to your $HOME/.bashrc

export GOROOT=$HOME/gocompiler/go
export PATH=$GOROOT/bin:$PATH

export GOPATH=$HOME/golexamples/myproject1
export PATH=$GOPATH/bin:$PATH

5)
$go help

6)
#we need pip >= 9
pip —version

7)
sudo pip install —upgrade pip

8)
pip —version

i)
sudo pip install jupyter

9)
#Run server
jupyter notebook

10)
Install goimports
go get golang.org/x/tools/cmd/goimports

11)
Install gaoling kernel
go get github.com/gophergala2016/gophernotes

12)
Create a directory for the new kernel config:
mkdir -p ~/.ipython/kernels/gophernotes

13)
Copy the kernel config into the .ipython directory:
cp -r $GOPATH/src/github.com/gophergala2016/gophernotes/kernel/* ~/.ipython/kernels/gophernotes

14)
Start the jupyter notebook:
jupyter notebook

15)
Then, select “Golang” from the “New” drop down menu

16)
Import “fmt”
World := “world”
fmt.Sprintf(“Hello %s”, world)