No project description provided
Project description
poetry
step 1: install poetry using
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
before using the above code in Ubuntu system, you must set the default python to the version you want. Because by default python is set to version 2.7 in Ubuntu.
step 2: Create a new project
poetry new [project-name]
The output will create a structured project. It will create a ‘pyproect.toml’ file also . This ‘.toml’ file will have all the configuration for project.
step 3: Some useful cli commands for poetry
# add packages to project poetry add numpy, pandas # checking poetry check # build the package poetry build # publish to pypi poetry publish # venv of poetry poetry shell
Poetry + Vscode
step 1: open the project with vscode.
step 2: Set the environment:
# add the poetry venv directory path to vscode setting "python.venvPath": "~/.cache/pypoetry/virtualenvs" # now add the python path from down below bar of vscode # to project env.
step 3: Set the testing in vscode:
# open command palette 'ctrl' + 'shift' + 'p' # search for 'test' in command palette # choose the python test from drop down # Then select pytest from drop down # In the down below of vscode a lightning # 'Run test' will appear # In the left side of vscode a chemistry # lab flask will appear for testing your tests.
Poetry + Sphinx
step 1: Add the package in development mode
poetry add -D sphinx
step 2: Create a new doc directory and inside it run sphinx-quickstart. Then fill out all the things it asks, incase of not knowing just press enter, it will take the default setting.
step 3: The ‘docs’ folder now will contain _build, conf.py and index.rst. We need to edit them.
step 4: Open conf.py
# Uncomment them import os import sys sys.path.insert(0, os.path.abspath("..")) # Add sphinx packages and theme extensions = ["sphinx.ext.todo", "sphinx.ext.viewcode", "sphinx.ext.autodoc"] # html_theme = "alabaster" html_theme = "nature"
step 5: Use make html command for building html pages.
step 6: open the html from docs/_build/html/index.html
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for dina_test-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfa1ecdd45dda172725d6fbf7360268e021a52794b8a7e68776d9d165f1dffa2 |
|
MD5 | 2294f6d24391f9f0f1f02047863cc4c7 |
|
BLAKE2b-256 | c19a9d97a247598c4a8536841ce02ae5f925fa01ad7812e9b4017b6108381a97 |