From 2216587f70c9eb41ba161a306a9c0c5f7c0ff8ce Mon Sep 17 00:00:00 2001
From: Eli <43382407+eli64s@users.noreply.github.com>
Date: Mon, 23 Oct 2023 05:22:04 -0500
Subject: [PATCH] Update local repo paths, now set relative to parent
directory.
---
pyproject.toml | 2 +-
readme-ai.md | 233 ++++++++++++++++++++++++++++++++++
readmeai/markdown/headers.py | 6 +-
readmeai/settings/config.toml | 8 +-
readmeai/utils/utils.py | 8 +-
5 files changed, 249 insertions(+), 8 deletions(-)
create mode 100644 readme-ai.md
diff --git a/pyproject.toml b/pyproject.toml
index 6fe14740..29c44d5b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "readmeai"
-version = "0.4.039"
+version = "0.4.042"
description = "Generate beautiful README.md files from the terminal, powered by AI."
authors = ["Eli <0x.eli.64s@gmail.com>"]
license = "MIT"
diff --git a/readme-ai.md b/readme-ai.md
new file mode 100644
index 00000000..de1bd420
--- /dev/null
+++ b/readme-ai.md
@@ -0,0 +1,233 @@
+
+
+
+
FLINK-FLOW
+
โฆ โบ INSERT-TEXT
+
โฆ Developed with the software and tools below.
+
+
+
+
+
+
+
+
+
+
+
+
+---
+
+## ๐ Table of Contents
+- [๐ Table of Contents](#-table-of-contents)
+- [๐ Overview](#-overview)
+- [๐ฆ Features](#-features)
+- [๐ repository Structure](#-repository-structure)
+- [โ๏ธ Modules](#modules)
+- [๐ Getting Started](#-getting-started)
+ - [๐ง Installation](#-installation)
+ - [๐ค Running flink-flow](#-running-flink-flow)
+ - [๐งช Tests](#-tests)
+- [๐ฃ Roadmap](#-roadmap)
+- [๐ค Contributing](#-contributing)
+- [๐ License](#-license)
+- [๐ Acknowledgments](#-acknowledgments)
+
+---
+
+
+## ๐ Overview
+
+โบ INSERT-TEXT
+
+---
+
+## ๐ฆ Features
+
+โบ INSERT-TEXT
+
+---
+
+
+## ๐ Repository Structure
+
+```sh
+โโโ flink-flow/
+ โโโ .benchmarks/
+ โโโ blog/
+ โโโ conf/
+ โ โโโ conf.toml
+ โ โโโ flink-config.yaml
+ โโโ requirements.txt
+ โโโ scripts/
+ โ โโโ clean.sh
+ โ โโโ run.sh
+ โโโ setup/
+ โ โโโ setup.sh
+ โโโ setup.py
+ โโโ src/
+ โโโ alerts_handler.py
+ โโโ consumer.py
+ โโโ logger.py
+ โโโ twitter.py
+
+```
+
+---
+
+
+## โ๏ธ Modules
+
+Root
+
+| File | Summary |
+| --- | --- |
+| [requirements.txt]({file}) | โบ INSERT-TEXT |
+| [setup.py]({file}) | โบ INSERT-TEXT |
+
+
+
+Setup
+
+| File | Summary |
+| --- | --- |
+| [setup.sh]({file}) | โบ INSERT-TEXT |
+
+
+
+Scripts
+
+| File | Summary |
+| --- | --- |
+| [run.sh]({file}) | โบ INSERT-TEXT |
+| [clean.sh]({file}) | โบ INSERT-TEXT |
+
+
+
+Conf
+
+| File | Summary |
+| --- | --- |
+| [flink-config.yaml]({file}) | โบ INSERT-TEXT |
+| [conf.toml]({file}) | โบ INSERT-TEXT |
+
+
+
+Src
+
+| File | Summary |
+| --- | --- |
+| [alerts_handler.py]({file}) | โบ INSERT-TEXT |
+| [logger.py]({file}) | โบ INSERT-TEXT |
+| [consumer.py]({file}) | โบ INSERT-TEXT |
+| [twitter.py]({file}) | โบ INSERT-TEXT |
+
+
+
+---
+
+## ๐ Getting Started
+
+***Dependencies***
+
+Please ensure you have the following dependencies installed on your system:
+
+`- โน๏ธ Dependency 1`
+
+`- โน๏ธ Dependency 2`
+
+`- โน๏ธ ...`
+
+### ๐ง Installation
+
+1. Clone the flink-flow repository:
+```sh
+git clone /Users/k01101011/Documents/GitHub/flink-flow
+```
+
+2. Change to the project directory:
+```sh
+cd flink-flow
+```
+
+3. Install the dependencies:
+```sh
+pip install -r requirements.txt
+```
+
+### ๐ค Running flink-flow
+
+```sh
+python main.py
+```
+
+### ๐งช Tests
+```sh
+pytest
+```
+
+---
+
+
+## ๐ฃ Project Roadmap
+
+> - [X] `โน๏ธ Task 1: Implement X`
+> - [ ] `โน๏ธ Task 2: Implement Y`
+> - [ ] `โน๏ธ ...`
+
+
+---
+
+## ๐ค Contributing
+
+Contributions are welcome! Here are several ways you can contribute:
+
+- **[Submit Pull Requests](https://github.com/local/flink-flow/blob/main/CONTRIBUTING.md)**: Review open PRs, and submit your own PRs.
+- **[Join the Discussions](https://github.com/local/flink-flow/discussions)**: Share your insights, provide feedback, or ask questions.
+- **[Report Issues](https://github.com/local/flink-flow/issues)**: Submit bugs found or log feature requests for LOCAL.
+
+#### *Contributing Guidelines*
+
+
+Click to expand
+
+1. **Fork the Repository**: Start by forking the project repository to your GitHub account.
+2. **Clone Locally**: Clone the forked repository to your local machine using a Git client.
+ ```sh
+ git clone
+ ```
+3. **Create a New Branch**: Always work on a new branch, giving it a descriptive name.
+ ```sh
+ git checkout -b new-feature-x
+ ```
+4. **Make Your Changes**: Develop and test your changes locally.
+5. **Commit Your Changes**: Commit with a clear and concise message describing your updates.
+ ```sh
+ git commit -m 'Implemented new feature x.'
+ ```
+6. **Push to GitHub**: Push the changes to your forked repository.
+ ```sh
+ git push origin new-feature-x
+ ```
+7. **Submit a Pull Request**: Create a PR against the original project repository. Clearly describe the changes and their motivations.
+
+Once your PR is reviewed and approved, it will be merged into the main branch.
+
+
+
+---
+
+## ๐ License
+
+
+This project is protected under the [SELECT-A-LICENSE](https://choosealicense.com/licenses) License. For more details, refer to the [LICENSE](https://choosealicense.com/licenses/) file.
+
+---
+
+## ๐ Acknowledgments
+
+- List any resources, contributors, inspiration, etc. here.
+
+[**Return**](#Top)
+
+---
diff --git a/readmeai/markdown/headers.py b/readmeai/markdown/headers.py
index 99d45666..1ed33086 100644
--- a/readmeai/markdown/headers.py
+++ b/readmeai/markdown/headers.py
@@ -56,7 +56,9 @@ def format_readme_md_contents(
else:
badge_icons = badges.get_app_icons(conf, packages)
- md_setup_guide = quickstart.create_instructions(conf, helper, summaries)
+ repo_path = f"../{repo_name}" if conf.git.source == "local" else repository
+ instructions = quickstart.create_instructions(conf, helper, summaries)
+ md_quickstart = conf.md.setup.format(repo_name, repo_path, *instructions)
markdown_sections = [
conf.md.header,
@@ -66,7 +68,7 @@ def format_readme_md_contents(
conf.md.tree,
conf.md.modules,
md_summary_tables,
- conf.md.setup.format(repo_name, repository, *md_setup_guide),
+ md_quickstart,
conf.md.contribute.format(full_name, name.upper()),
]
diff --git a/readmeai/settings/config.toml b/readmeai/settings/config.toml
index e3d1e12d..b2ba7312 100644
--- a/readmeai/settings/config.toml
+++ b/readmeai/settings/config.toml
@@ -3,10 +3,10 @@
endpoint = "https://api.openai.com/v1/chat/completions"
encoding = "cl100k_base"
model = "gpt-3.5-turbo"
-rate_limit = 3
-tokens = 700
-tokens_max = 4000
-temperature = 1.0
+rate_limit = 5
+tokens = 669
+tokens_max = 3999
+temperature = 1.05
# CLI Options
[cli]
diff --git a/readmeai/utils/utils.py b/readmeai/utils/utils.py
index 62deacc1..88d3d5b4 100644
--- a/readmeai/utils/utils.py
+++ b/readmeai/utils/utils.py
@@ -56,6 +56,12 @@ def format_sentence(text: str) -> str:
return text.strip().strip('"')
+def get_relative_path(absolute_path: str, base_path: str) -> str:
+ """Get the relative path of a file."""
+ absolute_path = Path(absolute_path)
+ return absolute_path.relative_to(base_path)
+
+
def remove_substring(input_string: str) -> str:
"""Remove text between HTML tags."""
pattern = r".*?"
@@ -73,7 +79,7 @@ def should_ignore(conf_helper: ConfigHelper, file_path: Path) -> bool:
directory in file_path.parts
for directory in ignore_files["directories"]
):
- logger.debug(f"Ignoring directory: {file_path}")
+ logger.debug(f"Ignoring path: {file_path.suffix}")
return True
if file_path.name in ignore_files["files"]: