Usage

Installation

To use Pkgname, first install it using pip:

(.venv) $ pip install pkgname

This is an example of using just the double colon:

ls -l
pwd

This is an example of code block with language:

ls -l
pwd
conda config --add channels defaults
conda config --add channels conda-forge

Creating recipes

This is coming from the original lumache.py file

To retrieve a list of random ingredients, you can use the lumache.get_random_ingredients() function:

lumache.get_random_ingredients(kind=None)

Return a list of random ingredients as strings.

Parameters:

kind (list[str] or None) – Optional “kind” of ingredients.

Raises:

lumache.InvalidKindError – If the kind is invalid.

Returns:

The ingredients list.

Return type:

list[str]

The kind parameter should be either "meat", "fish", or "veggies". Otherwise, lumache.get_random_ingredients() will raise an exception.

exception lumache.InvalidKindError

Raised if the kind is invalid.

For example:

>>> import pkgname
>>> pkgname.get_random_ingredients()
['shells', 'gorgonzola', 'parsley']

add python source file as an example

#!/usr/bin/env python3

a = 2
b = 3

c = a + b
print ("c = %d" % c)

add bash source file as an example

#!/bin/bash

# Purpose: extract lines with "module-hpc"  from /var/log/messages* files
# Arguments: list of files names to process. 
# If empty, assume messages* files in the current directory

if [ $# -eq 0 ];  then
    echo "No arguments supplied. Assuming files in current directory `pwd`"
    files=`ls messages*`
else
    files=$@
fi

prog=`basename $0`

help () {

    printf "\nNAME\n       $prog - eXtract MODule Lines from log files\n"
    printf "SYNOPSIS\n       $prog [OPTION]... [FILE]...\n"
    printf "DESCRIPTION\n"
    printf "       Extract lines with 'module-hpc' from the /var/log/messages-DATE files.\n"
    printf "       For each processed messages-DATE file generate an output file modules-DATE.\n"
    printf "       If no  arguments are given on the command line assume messages-DATE files\n"
    printf "       in the  current directory.\n\n"
    printf "       -h, --h, -help, --help, help\n"
    printf "              print usage info\n\n"

    exit 0
}

case "$1" in
  -*h*|*help)
	help
	;;
  *)
        ;;
esac

for File in $files; do
    if [ ! -f $File ]; then
        echo "Skip $File: not a file"
        continue
    fi
    if [[ $File =~ ".gz" ]];  then
        gunzip $File
        raw=${File%.gz}
        Compress=True
    else
        raw=$File
    fi
    modfile=${raw//messages/modules}
    grep module-hpc $raw > $modfile
    echo  "Wrote " $modfile
    if [ $Compress ]; then
        gzip $raw
        compress=False
    fi
done
!include rcic-package.yaml
---
   package: iperf version 3 network tester
   name: iperf
   version: "3.6"
   extension: tar.gz
   description: >
       iperf3 version {{ version }}. iperf is a tool for active measurements 
       of the maximum achievable bandwidth on IP networks. It supports tuning
       of various parameters related to timing, protocols, and buffers. For
       For each test it reports the measured throughput/bitrate, loss,
       and other parameters.
   vendor_source: https://downloads.es.net/pub/iperf/iperf-{{ version }}.tar.gz
   root: "{{ pkg_defaults.app_path }}/{{ name }}/{{ version }}"
   build:
       modules:
       target:
   install:
       installextra: $(INSTALL) -m 644  README* LICENSE $(ROOT){{ root }}

List

  • This is a bulleted list.

  • It has two items, the second item uses two lines.

  1. This is a numbered list.

  2. It has two items too.

  3. This is a numbered list.

  4. It has two items too.

Nested list

  • this is

  • a list

    • with a nested list

    • and some subitems

  • and here the parent list continues

Table

Header row, column 1 (header rows optional)

Header 2

Header 3

Header 4

body row 1, column 1

column 2

column 3

column 4

body row 2

Button

trying from tutorial text snippet here you will see a green Use this template button. Click it to open a new page that will ask you for some details:

TEXT

This is the repository you will import on Read the Docs, and it contains the following files:

README.rst

Basic description of the repository, you will leave it untouched.

pyproject.toml

Python project metadata that makes it installable. Useful for automatic documentation generation from sources.

pkgname.py

Source code of the fictional Python library.

docs/

Directory holding all the Sphinx documentation sources, including the Sphinx configuration docs/source/conf.py and the root document docs/source/index.rst written in reStructuredText.

Figures

This is made with figure

Usage stats

Usage stats image

This is made with image

../_images/loadStats.png