Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dina-test-0.1.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dina_test-0.1.2-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file dina-test-0.1.2.tar.gz.

File metadata

  • Download URL: dina-test-0.1.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.2 Linux/5.4.0-45-generic

File hashes

Hashes for dina-test-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8314372a95d6dcc9bd58712cb97a47f000e69a0b5a3cbcb8974f0ad453cbc243
MD5 e6c78e3201649963d6ba44655d910793
BLAKE2b-256 78481366b599f41c7d4923901b3c69cca928a93417a9c7c14060fae10b2ce4a7

See more details on using hashes here.

File details

Details for the file dina_test-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: dina_test-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.2 Linux/5.4.0-45-generic

File hashes

Hashes for dina_test-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dfa1ecdd45dda172725d6fbf7360268e021a52794b8a7e68776d9d165f1dffa2
MD5 2294f6d24391f9f0f1f02047863cc4c7
BLAKE2b-256 c19a9d97a247598c4a8536841ce02ae5f925fa01ad7812e9b4017b6108381a97

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page