Skip to content

Commit

Permalink
Update local repo paths, now set relative to parent directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
eli64s committed Oct 23, 2023
1 parent 609336a commit 6488104
Show file tree
Hide file tree
Showing 5 changed files with 250 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "readmeai"
version = "0.4.039"
version = "0.4.041"
description = "Generate beautiful README.md files from the terminal, powered by AI."
authors = ["Eli <[email protected]>"]
license = "MIT"
Expand Down
233 changes: 233 additions & 0 deletions readme-ai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
<div align="center">
<h1 align="center">
<img src="https://raw.githubusercontent.com/PKief/vscode-material-icon-theme/ec559a9f6bfd399b82bb44393651661b08aaf7ba/icons/folder-markdown-open.svg" width="100" />
<br>FLINK-FLOW</h1>
<h3>◦ ► INSERT-TEXT</h3>
<h3>◦ Developed with the software and tools below.</h3>

<p align="center">
<img src="https://img.shields.io/badge/GNU%20Bash-4EAA25.svg?style=flat-square&logo=GNU-Bash&logoColor=white" alt="GNU%20Bash" />
<img src="https://img.shields.io/badge/Apache%20Flink-E6526F.svg?style=flat-square&logo=Apache-Flink&logoColor=white" alt="Apache%20Flink" />
<img src="https://img.shields.io/badge/YAML-CB171E.svg?style=flat-square&logo=YAML&logoColor=white" alt="YAML" />
<img src="https://img.shields.io/badge/Python-3776AB.svg?style=flat-square&logo=Python&logoColor=white" alt="Python" />
<img src="https://img.shields.io/badge/AIOHTTP-2C5BB4.svg?style=flat-square&logo=AIOHTTP&logoColor=white" alt="AIOHTTP" />
<img src="https://img.shields.io/badge/Apache%20Kafka-231F20.svg?style=flat-square&logo=Apache-Kafka&logoColor=white" alt="Apache%20Kafka" />
<img src="https://img.shields.io/badge/pandas-150458.svg?style=flat-square&logo=pandas&logoColor=white" alt="pandas" />
</p>
</div>

---

## 📖 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

<details closed><summary>Root</summary>

| File | Summary |
| --- | --- |
| [requirements.txt]({file}) | ► INSERT-TEXT |
| [setup.py]({file}) | ► INSERT-TEXT |

</details>

<details closed><summary>Setup</summary>

| File | Summary |
| --- | --- |
| [setup.sh]({file}) | ► INSERT-TEXT |

</details>

<details closed><summary>Scripts</summary>

| File | Summary |
| --- | --- |
| [run.sh]({file}) | ► INSERT-TEXT |
| [clean.sh]({file}) | ► INSERT-TEXT |

</details>

<details closed><summary>Conf</summary>

| File | Summary |
| --- | --- |
| [flink-config.yaml]({file}) | ► INSERT-TEXT |
| [conf.toml]({file}) | ► INSERT-TEXT |

</details>

<details closed><summary>Src</summary>

| File | Summary |
| --- | --- |
| [alerts_handler.py]({file}) | ► INSERT-TEXT |
| [logger.py]({file}) | ► INSERT-TEXT |
| [consumer.py]({file}) | ► INSERT-TEXT |
| [twitter.py]({file}) | ► INSERT-TEXT |

</details>

---

## 🚀 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*

<details closed>
<summary>Click to expand</summary>

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 <your-forked-repo-url>
```
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.

</details>

---

## 📄 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)

---
6 changes: 4 additions & 2 deletions readmeai/markdown/headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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()),
]

Expand Down
8 changes: 4 additions & 4 deletions readmeai/settings/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
9 changes: 8 additions & 1 deletion readmeai/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"</p>.*?</div>"
Expand All @@ -68,12 +74,13 @@ def remove_substring(input_string: str) -> str:
def should_ignore(conf_helper: ConfigHelper, file_path: Path) -> bool:
"""Filters out files that should be ignored."""
ignore_files = conf_helper.ignore_files
project_path = get_relative_path(file_path, Path.cwd())

if any(
directory in file_path.parts
for directory in ignore_files["directories"]
):
logger.debug(f"Ignoring directory: {file_path}")
logger.debug(f"Ignoring directory: {project_path}")
return True

if file_path.name in ignore_files["files"]:
Expand Down

0 comments on commit 6488104

Please sign in to comment.