Skip to content

Commit cf565b0

Browse files
author
Hong
committed
Update docs/**
1 parent 20c3573 commit cf565b0

File tree

4 files changed

+3
-155
lines changed

4 files changed

+3
-155
lines changed

docs/Provisioning/CICD_tools/jenkins.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
## Guides/tips/...etc
44

55
* [Jenkins](https://www.jenkins.io/)
6+
* [github.com/jenkinsci/jenkins/blob/master/CONTRIBUTING.md](https://github.com/jenkinsci/jenkins/blob/master/CONTRIBUTING.md)
67
* [gitlab-plugin](https://plugins.jenkins.io/gitlab-plugin/)

docs/computer languages/Build_Systems/Make/Make.md

Whitespace-only changes.

docs/computer languages/programming_languages/python/python.md

Lines changed: 2 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -133,161 +133,6 @@ Answer: It should be To B. TypeError: 'tuple' object does not support item assig
133133

134134
* [Shioaji](https://sinotrade.github.io/zh_TW/)
135135

136-
## Usage with pyenv+poetry
137-
138-
* poetry
139-
* [managing-environments](https://python-poetry.org/docs/managing-environments#managing-environments)
140-
* [switching-between-environments](https://python-poetry.org/docs/managing-environments#switching-between-environments)
141-
142-
```shell
143-
#Install pyenv
144-
curl https://pyenv.run | bash
145-
146-
#add commands to your environment
147-
#to add to ~/.bash_profile:
148-
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
149-
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
150-
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
151-
152-
source ~/.bash_profile
153-
which pyenv
154-
pyenv
155-
156-
#Suggested build environment for building Python from source codes
157-
#Arch Linux
158-
pacman -S --needed base-devel openssl zlib xz tk
159-
160-
#Ubuntu/Debian/Mint
161-
sudo apt update; sudo apt install build-essential libssl-dev zlib1g-dev \
162-
libbz2-dev libreadline-dev libsqlite3-dev curl \
163-
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
164-
165-
#install python with versions
166-
pyenv install 2.7.18
167-
pyenv install 3.8.17
168-
pyenv install 3.9.17
169-
pyenv install 3.10.12
170-
pyenv install 3.11.4
171-
172-
pyenv versions
173-
#for system-scope python
174-
pyenv global 3.8.16
175-
176-
#install poetry
177-
curl -sSL https://install.python-poetry.org | python3 -
178-
179-
#setting PATH for poetry
180-
vim ~/.bash_profile
181-
export PATH="/home/hong/.local/bin:$PATH"
182-
source ~/.bash_profile
183-
poetry --version
184-
poetry completions bash > ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions/poetry
185-
exec bash
186-
187-
#setting python version for a new project
188-
cd ~/some_path/project_folder
189-
pyenv local 3.8.16
190-
191-
#Please choose a compatible version or loosen the python constraint specified in the pyproject.toml file.
192-
pyenv local 3.8.16
193-
poetry env use 3.8.16
194-
pyenv local 3.10.12
195-
poetry env use 3.10
196-
197-
#create new project with poetry
198-
poetry new poetry-demo
199-
200-
#Initialising a pre-existing project
201-
cd pre-existing-project
202-
poetry init
203-
204-
#add package like pip
205-
#pip install pykakasi
206-
#poetry add pykakasi
207-
poetry add pendulum
208-
poetry add mkdocs-material
209-
210-
#Activating the virtual environment
211-
poetry shell
212-
213-
#Installing dependencies only
214-
poetry install --no-root
215-
```
216-
217-
## Usage with pyenv+pipenv
218-
219-
* [Python: Select Interpreter](https://code.visualstudio.com/docs/python/environments)
220-
* [pipenv-commands](https://pipenv.pypa.io/en/latest/commands/#pipenv-commands)
221-
222-
```shell
223-
#Install pyenv
224-
curl https://pyenv.run | bash
225-
226-
#Show python available versions
227-
pyenv install -l
228-
229-
#Install sepcital version
230-
pyenv install 3.8.16
231-
232-
#Setting Global python version
233-
pyenv global 3.8.16
234-
235-
#Install pipenv after setting python global version with pyenv
236-
pip install pipenv
237-
238-
#pipenv Shell Completion
239-
#~/.bashrc or ~/.bash_profile
240-
vim ~/.bashrc
241-
#add this th .bashrc
242-
eval "$(_PIPENV_COMPLETE=bash_source pipenv)"
243-
244-
source ~/.bashrc
245-
246-
pyenv version
247-
pyenv versions
248-
249-
#Go to your python project folders
250-
cd ~/PATH/projects_folder/
251-
252-
#Setting up local python version
253-
pyenv local 3.8.16
254-
#Check pip/pipenv version
255-
pip -V
256-
which pip
257-
which pipenv
258-
259-
#check pipenv version
260-
pipenv --version
261-
#Creating a virtualenv for this project...
262-
pipenv --python 3.8.16
263-
264-
#--system is intended to be used for pre-existing Pipfile installation
265-
#SHow your python virtual environments
266-
pipenv --venv
267-
#Spawns a shell within the virtualenv.
268-
pipenv shell
269-
270-
#Using Python: Select Interpreter in your IDE such as vscode
271-
#ctrl+shift+p > Python: Select Interpreter > input the python path
272-
273-
#pipenv install python packages you want to used
274-
#Just pick up pandas/requests/Django as Example.
275-
pipenv install pandas
276-
pipenv install "pandas>=1.5"
277-
pipenv install "requests>=1.4"
278-
pipenv install Django
279-
280-
#if no packages are given, installs all packages from Pipfile.
281-
pipenv install
282-
pipenv install --dev
283-
284-
#Installs all packages specified in Pipfile.lock.
285-
pipenv sync
286-
287-
#Exit your python virtual environments
288-
exit
289-
```
290-
291136
## troubleshooting or tips or any other tools?
292137

293138
* Import "scrapy" could not be resolvedPylance when using pyenv and pipenv in vscode
@@ -408,6 +253,8 @@ pipenv install
408253
* [github.com/odoo/odoo](https://github.com/odoo/odoo)
409254
* [library_app](https://github.com/cam-studio/library_app/tree/main)
410255
* Odoo modules for library management
256+
* [github.com/mov-cli/mov-cli/tree/v4](https://github.com/mov-cli/mov-cli/tree/v4)
257+
* Watch everything from your terminal.
411258

412259

413260
* [w3schools/Python Tutorial](https://www.w3schools.com/python/default.asp)

0 commit comments

Comments
 (0)