From 07dff39060efbcb6b80535fad9c6de195195df96 Mon Sep 17 00:00:00 2001 From: Colin Sullivan Date: Sat, 2 Dec 2023 01:16:29 -0500 Subject: [PATCH] Fix docs banner (#2) * fix docs banner * patch version --- README.md | 8 ++++++-- docs/docs/CLI.md | 8 +++++--- docs/docs/index.md | 5 +++-- docs/mkdocs.yml | 2 +- pyproject.toml | 2 +- src/aoc/cli.py | 3 ++- 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b6f8809..3b0822f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # Advent of Code 2023 +

+ aoc +

+ [![CI](https://github.com/sullivancolin/advent_of_code/actions/workflows/CI.yml/badge.svg)](https://github.com/sullivancolin/advent_of_code/actions) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/sullivancolin/advent_of_code) @@ -7,7 +11,7 @@ [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/sullivancolin/advent-of-code) -My record of current and past attempts at Advent of Code in Python. (I usually Peter out around the second week as they take more time and I'm spending more time with family.) +My record of current and past attempts at Advent of Code in Python. (I usually peter out around the second week as they take more time and I'm spending more time with family.) ## Installation @@ -38,4 +42,4 @@ To run tests for a single day run `pytest tests/test_day1.py` ## Documentation -Documentation is provided via `mkdocs-material` and `mkdocstrings` and are generated from the source code, and host on github pages. \ No newline at end of file +Documentation is provided via `mkdocs-material` and `mkdocstrings` and are generated from the source code, and host on github pages. diff --git a/docs/docs/CLI.md b/docs/docs/CLI.md index e2bf7d3..5f6f3d6 100644 --- a/docs/docs/CLI.md +++ b/docs/docs/CLI.md @@ -17,12 +17,12 @@ $ aoc [OPTIONS] COMMAND [ARGS]... **Commands**: -* `day1`: command for running day1 stars +* `day1`: Command for running day1 stars * `debug-version-info`: Print debug information to terminal. ## `aoc day1` -command for running day1 stars +Command for running day1 stars **Usage**: @@ -37,7 +37,7 @@ $ aoc day1 [OPTIONS] COMMAND [ARGS]... **Commands**: * `part1`: Calculate the sum of all the first and... -* `part2` +* `part2`: Calculate the sum of all the first and... ### `aoc day1 part1` @@ -59,6 +59,8 @@ $ aoc day1 part1 [OPTIONS] [INPUT_PATH] ### `aoc day1 part2` +Calculate the sum of all the first and last number words or digits on each line concatenated together. + **Usage**: ```console diff --git a/docs/docs/index.md b/docs/docs/index.md index 495d345..00043f2 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -1,5 +1,5 @@

- aoc + aoc

[![CI](https://github.com/sullivancolin/advent_of_code/actions/workflows/CI.yml/badge.svg)](https://github.com/sullivancolin/advent_of_code/actions) @@ -10,6 +10,7 @@ [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/sullivancolin/advent-of-code) +My record of current and past attempts at Advent of Code in Python. (I usually peter out around the second week as they take more time and I'm spending more time with family.) ## Installation ### Using the `devcontainter` @@ -39,4 +40,4 @@ To run tests for a single day run `pytest tests/test_day1.py` ## Documentation -Documentation is provided via `mkdocs-material` and `mkdocstrings` and are generated from the source code, and host on github pages. \ No newline at end of file +Documentation is provided via `mkdocs-material` and `mkdocstrings` and are generated from the source code, and host on github pages. diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index ca8983f..d9adbb7 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -5,7 +5,7 @@ repo_name: aoc edit_uri: "" nav: - - Getting Started: index.md + - Home: index.md - CLI: CLI.md - Day 1: - Part 1: day1/part1.md diff --git a/pyproject.toml b/pyproject.toml index a5d69a6..2500773 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "aoc" -version = "0.1" +version = "0.1.1" description = "Record of current and past attempts at Advent-of-Code in Python" authors = ["Colin Sullivan "] readme = "README.md" diff --git a/src/aoc/cli.py b/src/aoc/cli.py index 0db684a..f229dbd 100644 --- a/src/aoc/cli.py +++ b/src/aoc/cli.py @@ -70,7 +70,7 @@ def debug_version_info() -> None: day1app = typer.Typer( - help="command for running day1 stars", + help="Command for running day1 stars", rich_markup_mode="rich", ) @@ -96,6 +96,7 @@ def day1part2( Path("data/day1.txt"), help="Path to file containing the input" ), ) -> None: + """Calculate the sum of all the first and last number words or digits on each line concatenated together.""" with open(input_path) as infile: input_text = infile.read() total_sum = word_calibration_sum(input_text)