Skip to content

Commit 6488104

Browse files
committed
Update local repo paths, now set relative to parent directory.
1 parent 609336a commit 6488104

File tree

5 files changed

+250
-8
lines changed

5 files changed

+250
-8
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "readmeai"
7-
version = "0.4.039"
7+
version = "0.4.041"
88
description = "Generate beautiful README.md files from the terminal, powered by AI."
99
authors = ["Eli <[email protected]>"]
1010
license = "MIT"

readme-ai.md

Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
<div align="center">
2+
<h1 align="center">
3+
<img src="https://raw.githubusercontent.com/PKief/vscode-material-icon-theme/ec559a9f6bfd399b82bb44393651661b08aaf7ba/icons/folder-markdown-open.svg" width="100" />
4+
<br>FLINK-FLOW</h1>
5+
<h3>◦ ► INSERT-TEXT</h3>
6+
<h3>◦ Developed with the software and tools below.</h3>
7+
8+
<p align="center">
9+
<img src="https://img.shields.io/badge/GNU%20Bash-4EAA25.svg?style=flat-square&logo=GNU-Bash&logoColor=white" alt="GNU%20Bash" />
10+
<img src="https://img.shields.io/badge/Apache%20Flink-E6526F.svg?style=flat-square&logo=Apache-Flink&logoColor=white" alt="Apache%20Flink" />
11+
<img src="https://img.shields.io/badge/YAML-CB171E.svg?style=flat-square&logo=YAML&logoColor=white" alt="YAML" />
12+
<img src="https://img.shields.io/badge/Python-3776AB.svg?style=flat-square&logo=Python&logoColor=white" alt="Python" />
13+
<img src="https://img.shields.io/badge/AIOHTTP-2C5BB4.svg?style=flat-square&logo=AIOHTTP&logoColor=white" alt="AIOHTTP" />
14+
<img src="https://img.shields.io/badge/Apache%20Kafka-231F20.svg?style=flat-square&logo=Apache-Kafka&logoColor=white" alt="Apache%20Kafka" />
15+
<img src="https://img.shields.io/badge/pandas-150458.svg?style=flat-square&logo=pandas&logoColor=white" alt="pandas" />
16+
</p>
17+
</div>
18+
19+
---
20+
21+
## 📖 Table of Contents
22+
- [📖 Table of Contents](#-table-of-contents)
23+
- [📍 Overview](#-overview)
24+
- [📦 Features](#-features)
25+
- [📂 repository Structure](#-repository-structure)
26+
- [⚙️ Modules](#modules)
27+
- [🚀 Getting Started](#-getting-started)
28+
- [🔧 Installation](#-installation)
29+
- [🤖 Running flink-flow](#-running-flink-flow)
30+
- [🧪 Tests](#-tests)
31+
- [🛣 Roadmap](#-roadmap)
32+
- [🤝 Contributing](#-contributing)
33+
- [📄 License](#-license)
34+
- [👏 Acknowledgments](#-acknowledgments)
35+
36+
---
37+
38+
39+
## 📍 Overview
40+
41+
► INSERT-TEXT
42+
43+
---
44+
45+
## 📦 Features
46+
47+
► INSERT-TEXT
48+
49+
---
50+
51+
52+
## 📂 Repository Structure
53+
54+
```sh
55+
└── flink-flow/
56+
├── .benchmarks/
57+
├── blog/
58+
├── conf/
59+
│ ├── conf.toml
60+
│ └── flink-config.yaml
61+
├── requirements.txt
62+
├── scripts/
63+
│ ├── clean.sh
64+
│ └── run.sh
65+
├── setup/
66+
│ └── setup.sh
67+
├── setup.py
68+
└── src/
69+
├── alerts_handler.py
70+
├── consumer.py
71+
├── logger.py
72+
└── twitter.py
73+
74+
```
75+
76+
---
77+
78+
79+
## ⚙️ Modules
80+
81+
<details closed><summary>Root</summary>
82+
83+
| File | Summary |
84+
| --- | --- |
85+
| [requirements.txt]({file}) | ► INSERT-TEXT |
86+
| [setup.py]({file}) | ► INSERT-TEXT |
87+
88+
</details>
89+
90+
<details closed><summary>Setup</summary>
91+
92+
| File | Summary |
93+
| --- | --- |
94+
| [setup.sh]({file}) | ► INSERT-TEXT |
95+
96+
</details>
97+
98+
<details closed><summary>Scripts</summary>
99+
100+
| File | Summary |
101+
| --- | --- |
102+
| [run.sh]({file}) | ► INSERT-TEXT |
103+
| [clean.sh]({file}) | ► INSERT-TEXT |
104+
105+
</details>
106+
107+
<details closed><summary>Conf</summary>
108+
109+
| File | Summary |
110+
| --- | --- |
111+
| [flink-config.yaml]({file}) | ► INSERT-TEXT |
112+
| [conf.toml]({file}) | ► INSERT-TEXT |
113+
114+
</details>
115+
116+
<details closed><summary>Src</summary>
117+
118+
| File | Summary |
119+
| --- | --- |
120+
| [alerts_handler.py]({file}) | ► INSERT-TEXT |
121+
| [logger.py]({file}) | ► INSERT-TEXT |
122+
| [consumer.py]({file}) | ► INSERT-TEXT |
123+
| [twitter.py]({file}) | ► INSERT-TEXT |
124+
125+
</details>
126+
127+
---
128+
129+
## 🚀 Getting Started
130+
131+
***Dependencies***
132+
133+
Please ensure you have the following dependencies installed on your system:
134+
135+
`- ℹ️ Dependency 1`
136+
137+
`- ℹ️ Dependency 2`
138+
139+
`- ℹ️ ...`
140+
141+
### 🔧 Installation
142+
143+
1. Clone the flink-flow repository:
144+
```sh
145+
git clone /Users/k01101011/Documents/GitHub/flink-flow
146+
```
147+
148+
2. Change to the project directory:
149+
```sh
150+
cd flink-flow
151+
```
152+
153+
3. Install the dependencies:
154+
```sh
155+
pip install -r requirements.txt
156+
```
157+
158+
### 🤖 Running flink-flow
159+
160+
```sh
161+
python main.py
162+
```
163+
164+
### 🧪 Tests
165+
```sh
166+
pytest
167+
```
168+
169+
---
170+
171+
172+
## 🛣 Project Roadmap
173+
174+
> - [X] `ℹ️ Task 1: Implement X`
175+
> - [ ] `ℹ️ Task 2: Implement Y`
176+
> - [ ] `ℹ️ ...`
177+
178+
179+
---
180+
181+
## 🤝 Contributing
182+
183+
Contributions are welcome! Here are several ways you can contribute:
184+
185+
- **[Submit Pull Requests](https://github.com/local/flink-flow/blob/main/CONTRIBUTING.md)**: Review open PRs, and submit your own PRs.
186+
- **[Join the Discussions](https://github.com/local/flink-flow/discussions)**: Share your insights, provide feedback, or ask questions.
187+
- **[Report Issues](https://github.com/local/flink-flow/issues)**: Submit bugs found or log feature requests for LOCAL.
188+
189+
#### *Contributing Guidelines*
190+
191+
<details closed>
192+
<summary>Click to expand</summary>
193+
194+
1. **Fork the Repository**: Start by forking the project repository to your GitHub account.
195+
2. **Clone Locally**: Clone the forked repository to your local machine using a Git client.
196+
```sh
197+
git clone <your-forked-repo-url>
198+
```
199+
3. **Create a New Branch**: Always work on a new branch, giving it a descriptive name.
200+
```sh
201+
git checkout -b new-feature-x
202+
```
203+
4. **Make Your Changes**: Develop and test your changes locally.
204+
5. **Commit Your Changes**: Commit with a clear and concise message describing your updates.
205+
```sh
206+
git commit -m 'Implemented new feature x.'
207+
```
208+
6. **Push to GitHub**: Push the changes to your forked repository.
209+
```sh
210+
git push origin new-feature-x
211+
```
212+
7. **Submit a Pull Request**: Create a PR against the original project repository. Clearly describe the changes and their motivations.
213+
214+
Once your PR is reviewed and approved, it will be merged into the main branch.
215+
216+
</details>
217+
218+
---
219+
220+
## 📄 License
221+
222+
223+
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.
224+
225+
---
226+
227+
## 👏 Acknowledgments
228+
229+
- List any resources, contributors, inspiration, etc. here.
230+
231+
[**Return**](#Top)
232+
233+
---

readmeai/markdown/headers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ def format_readme_md_contents(
5656
else:
5757
badge_icons = badges.get_app_icons(conf, packages)
5858

59-
md_setup_guide = quickstart.create_instructions(conf, helper, summaries)
59+
repo_path = f"../{repo_name}" if conf.git.source == "local" else repository
60+
instructions = quickstart.create_instructions(conf, helper, summaries)
61+
md_quickstart = conf.md.setup.format(repo_name, repo_path, *instructions)
6062

6163
markdown_sections = [
6264
conf.md.header,
@@ -66,7 +68,7 @@ def format_readme_md_contents(
6668
conf.md.tree,
6769
conf.md.modules,
6870
md_summary_tables,
69-
conf.md.setup.format(repo_name, repository, *md_setup_guide),
71+
md_quickstart,
7072
conf.md.contribute.format(full_name, name.upper()),
7173
]
7274

readmeai/settings/config.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
endpoint = "https://api.openai.com/v1/chat/completions"
44
encoding = "cl100k_base"
55
model = "gpt-3.5-turbo"
6-
rate_limit = 3
7-
tokens = 700
8-
tokens_max = 4000
9-
temperature = 1.0
6+
rate_limit = 5
7+
tokens = 669
8+
tokens_max = 3999
9+
temperature = 1.05
1010

1111
# CLI Options
1212
[cli]

readmeai/utils/utils.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ def format_sentence(text: str) -> str:
5656
return text.strip().strip('"')
5757

5858

59+
def get_relative_path(absolute_path: str, base_path: str) -> str:
60+
"""Get the relative path of a file."""
61+
absolute_path = Path(absolute_path)
62+
return absolute_path.relative_to(base_path)
63+
64+
5965
def remove_substring(input_string: str) -> str:
6066
"""Remove text between HTML tags."""
6167
pattern = r"</p>.*?</div>"
@@ -68,12 +74,13 @@ def remove_substring(input_string: str) -> str:
6874
def should_ignore(conf_helper: ConfigHelper, file_path: Path) -> bool:
6975
"""Filters out files that should be ignored."""
7076
ignore_files = conf_helper.ignore_files
77+
project_path = get_relative_path(file_path, Path.cwd())
7178

7279
if any(
7380
directory in file_path.parts
7481
for directory in ignore_files["directories"]
7582
):
76-
logger.debug(f"Ignoring directory: {file_path}")
83+
logger.debug(f"Ignoring directory: {project_path}")
7784
return True
7885

7986
if file_path.name in ignore_files["files"]:

0 commit comments

Comments
 (0)