Skip to content

Commit

Permalink
🔗 Update setup scripts, demo mp4, add changelog file.
Browse files Browse the repository at this point in the history
  • Loading branch information
eli64s committed Jun 29, 2023
1 parent 9e81337 commit 05599f4
Show file tree
Hide file tree
Showing 24 changed files with 239 additions and 4,750 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,5 @@ notebooks/
.benchmarks/

# Work In Progress
docs/templates
conf/templates
notebooks/redis_client.py
examples/imgs/readme-video.mov
src/redis_cache.py
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!--
## [Unreleased]
### Added
### Changed
### Deprecated
### Removed
### Fixed
### Security
-->

# Changelog

All notable changes to this project will be documented in this file.

---

## [v0.0.1] - *2023-06-28*

### Added
- 📍 Initial release of *readme-ai* v0.0.1
### Changed

- 📜 Refine the markdown template structure to be more readable.
### Fixed

- 🔩 Fix various exceptions occuring in [builder.py](./src/builder.py), [model.py](./src/model.py), and [preprocess.py](./src/preprocess.py).

### Removed

- 🐼 Remove `pandas` dependency from the project.

---

## [v0.0.2] - *2023-06-28*

### Added

- 📃 Add [CHANGELOG.md](./CHANGELOG.md) to track changes to the project.
- 📼 Add new directory [examples/video](./examples/video) to store mp4 videos to demonstrate the *readme-ai* tool.

### Changed

- 🖋 Update [Makefile](./Makefile) and [setup.sh](./setup.sh) to use *poetry* for dependency management.

### Removed

- 🔧 Remove [requirements.txt](./requirements.txt) from the installation and setup scripts.
- 📄 Remove outdated example README.md files from the [examples](./examples) directory.

---
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Makefile

SHELL = /bin/bash
VENV := readme_ai
VENV := readmeai

.PHONY: help style clean conda venv profile snakeviz

Expand Down Expand Up @@ -32,19 +32,19 @@ clean: style

# Conda Environment
conda:
conda create -n $(VENV) python=3.9 -y
conda activate $(VENV) && pip install -r requirements.txt
conda create -n $(VENV) python=3.9 -y && \
source $$(conda info --base)/etc/profile.d/conda.sh && \
conda activate $(VENV) && \
poetry install

# Python Virtual Environment
venv:
python -m venv $(VENV)
source venv/bin/activate
pip install -r requirements.txt
poetry install

# cProfile
profile:
@echo "Running cProfile on CLI script"
python -m cProfile -o profile.out -s cumulative src/main.py --output docs/README_AI.md --remote https://github.com/eli64s/README-AI
python -m cProfile -o profile.out -s cumulative src/main.py --output docs/readme-ai.md --remote https://github.com/eli64s/readme-ai

# SnakeViz (pip install snakeviz)
snakeviz:
Expand Down
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Additionally, regularly monitor your API usage and costs by visiting the [OpenAI

## 👾 Demo

[![demo](https://raw.githubusercontent.com/eli64s/readme-ai/main/examples/imgs/demo.png)](https://youtu.be/0wbgjL0FMxY)
[![demo video](examples/imgs/demo.png)](examples/video/demo.mp4)

---

Expand Down Expand Up @@ -336,24 +336,24 @@ cd readme-ai

```sh
# With Bash
$ bash setup/setup.sh
bash setup/setup.sh
```

```sh
# With Conda
$ conda env create -f setup/environment.yaml
$ conda activate readmeai
$ pip install -r requirements.txt
conda create -n readmeai python=3.9 -y && \
conda activate readmeai && \
poetry install
```

```sh
# With Poetry
$ poetry install
poetry install
```

```sh
# With Docker
$ docker pull zeroxeli/readme-ai:v0.1.0
docker pull zeroxeli/readme-ai:v0.1.0
```

### 🎮 Using *README-AI*
Expand All @@ -366,16 +366,17 @@ Command-Line Arguments:
- `-o` or `--output`: The output path for your README.md file.
- `-r` or `--repository`: The URL or path to your code repository.
- `-t` or `--template`: The README template format to use. (Coming soon!)
- `l` or `--language`: The language of text written in the README file (Coming soon!)

```sh
python src/main.py --api-key abc123 --output readme-ai.md --repository https://github.com/eli64s/readme-ai
python src/main.py --api-key "YOUR_API_KEY" --output readme-ai.md --repository https://github.com/eli64s/readme-ai
```
Alternatively, export your OpenAI API key as an environment variable and run the following command:

```sh
conda activate readmeai

export OPENAI_API_KEY=sk123abc456def7890
export OPENAI_API_KEY="YOUR_API_KEY"

python src/main.py -o readme-ai.md -r https://github.com/eli64s/readme-ai
```
Expand All @@ -384,14 +385,17 @@ python src/main.py -o readme-ai.md -r https://github.com/eli64s/readme-ai
# With Poetry
poetry shell

export OPENAI_API_KEY=sk123abc456def7890
export OPENAI_API_KEY="YOUR_API_KEY"

poetry run python src/main.py -o readme-ai.md -r https://github.com/eli64s/readme-ai
```

```sh
# Run with Docker
docker run -it -e OPENAI_API_KEY="your-api-key" -v "$(pwd)":/app -w /app zeroxeli/readme-ai:v0.1.0 \
docker run -it \
-e OPENAI_API_KEY="YOUR_API_KEY" \
-v "$(pwd)":/app \
-w /app zeroxeli/readme-ai:v0.1.0 \
python src/main.py -o readme-ai.md -r https://github.com/eli64s/readme-ai
```

Expand Down
4 changes: 2 additions & 2 deletions conf/conf.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"
engine = "gpt-3.5-turbo"
encoding = "cl100k_base"
rate_limit = 5
rate_limit = 7
tokens = 600
tokens_max = 4000
temperature = 1.1
temperature = 0.7

# Repository
[git]
Expand Down
Binary file modified examples/imgs/demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 05599f4

Please sign in to comment.