Commit 999a942f authored by Grant, Josh's avatar Grant, Josh
Browse files

update the documentation

parent c3fd2ebe
Loading
Loading
Loading
Loading
+19 −3
Original line number Diff line number Diff line
@@ -6,15 +6,31 @@ for entry in src/common/*
do
	if [[ $entry == *$EXT* ]]; then
		base=$(basename $entry $EXT)
		pydoc-markdown -I src -m common.$(basename $entry $EXT) > docs/$(basename $entry $EXT).md
		pydoc-markdown -I src -m pygarden.$(basename $entry $EXT) > docs/$(basename $entry $EXT).md
	fi
done

for entry in src/common/mixins/*
for entry in src/pygarden/mixins/*
do

	if [[ $entry == *$EXT* ]]; then
		base=$(basename $entry $EXT)
		pydoc-markdown -I src -m common.mixins.$(basename $entry $EXT) > docs/mixins.$(basename $entry $EXT).md
		pydoc-markdown -I src -m pygarden.mixins.$(basename $entry $EXT) > docs/mixins.$(basename $entry $EXT).md
	fi
done
for entry in src/pygarden/cli/*
do

	if [[ $entry == *$EXT* ]]; then
		base=$(basename $entry $EXT)
		pydoc-markdown -I src -m pygarden.cli.$(basename $entry $EXT) > docs/cli.$(basename $entry $EXT).md
	fi
done
for entry in src/pygarden/scrapers/*
do

	if [[ $entry == *$EXT* ]]; then
		base=$(basename $entry $EXT)
		pydoc-markdown -I src -m pygarden.scrapers.$(basename $entry $EXT) > docs/scrapers.$(basename $entry $EXT).md
	fi
done

docs/cli.__init__.md

0 → 100644
+17 −0
Original line number Diff line number Diff line
<a id="pygarden.cli.__init__"></a>

# pygarden.cli.\_\_init\_\_

Initialize the CLI module.

<a id="pygarden.cli.__init__.common_cli"></a>

#### common\_cli

```python
@click.group()
def common_cli()
```

Common/OnlyFeatures CLI.

docs/cli.docker_cli.md

0 → 100644
+60 −0
Original line number Diff line number Diff line
<a id="pygarden.cli.docker_cli"></a>

# pygarden.cli.docker\_cli

Command line arguments for helping with docker.

<a id="pygarden.cli.docker_cli.docker"></a>

#### docker

```python
@click.group()
def docker()
```

Docker related commands.

<a id="pygarden.cli.docker_cli.remove_volumes"></a>

#### remove\_volumes

```python
@docker.command(name='remove-volumes',
                help='Remove all docker volumes with a specific prefix.')
@click.argument('prefix', required=False)
def remove_volumes(prefix)
```

Remove all docker volumes with a specific prefix.

<a id="pygarden.cli.docker_cli.docker_execute_and_mount"></a>

#### docker\_execute\_and\_mount

```python
@docker.command(
    name='docker-execute-and-mount',
    help='Execute a command in a docker container with a /tmp as the pwd.')
@click.option('--image',
              '-i',
              default='python:3.11-latest',
              help='Docker image to use.')
@click.option('--volume-target',
              '-t',
              default=None,
              help='Target directory to mount.')
@click.option('--volume-mount',
              '-m',
              default='/tmp',
              help='Mount directory inside the container.')
@click.option('--exec',
              '-e',
              'exec_cmd',
              default='bash',
              help='Command to execute.')
def docker_execute_and_mount(image, volume_target, volume_mount, exec_cmd)
```

Execute a command in a docker container with a /tmp as the pwd.

docs/cli.gen_cli.md

0 → 100644
+54 −0
Original line number Diff line number Diff line
<a id="pygarden.cli.gen_cli"></a>

# pygarden.cli.gen\_cli

Command line arguments for helping generate file sizes.

<a id="pygarden.cli.gen_cli.gen_cli"></a>

#### gen\_cli

```python
@click.group()
def gen_cli()
```

A CLI to generate large CSV files with random data.

<a id="pygarden.cli.gen_cli.csv"></a>

#### csv

```python
@gen_cli.command()
@click.option('--col',
              '-c',
              type=int,
              required=True,
              help="Number of columns in the CSV.")
@click.option('--row', '-r', type=int, help="Number of rows in the CSV.")
@click.option('--size',
              '-s',
              type=str,
              help="Target file size (e.g., 512MB or 1GB).")
def csv(col, row, size)
```

Generate a CSV file with the specified number of columns and rows or file size.

<a id="pygarden.cli.gen_cli.json"></a>

#### json

```python
@gen_cli.command()
@click.option('--size',
              '-s',
              type=str,
              required=True,
              help="Target file size (e.g., 512MB or 1GB).")
def json(size)
```

Create a JSON file with the specified target size.

docs/cli.python_cli.md

0 → 100644
+41 −0
Original line number Diff line number Diff line
<a id="pygarden.cli.python_cli"></a>

# pygarden.cli.python\_cli

Command line arguments for use setting up Python projects.

<a id="pygarden.cli.python_cli.python_cli"></a>

#### python\_cli

```python
@click.group()
def python_cli()
```

Python related commands.

<a id="pygarden.cli.python_cli.mk_pymodule"></a>

#### mk\_pymodule

```python
@python_cli.command(name='mk-pymodule',
                    help='Create a new Python module directory')
@click.option('--name', '-n', required=True, help='Name of the module')
def mk_pymodule(name)
```

Create a new Python module directory with an __init__.py file.

<a id="pygarden.cli.python_cli.mk_init"></a>

#### mk\_init

```python
@python_cli.command(name='mk-init', help='Create a new __init__.py file')
def mk_init()
```

Create a new __init__.py file.
Loading