Skip to content

Commit

Permalink
🔧 Repository file clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
eli64s committed Sep 20, 2023
1 parent a2f77e7 commit 85c43a0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ All notable changes to the *readme-ai* project will be documented in this file.
## [v0.1.0] - *2023-09-20*
### ✨ Features

- Deploy *readme-ai* via Streamlit Community Cloud to provide a web-based interface for generating READMEs.
- [Streamlit x README-AI](https://readmeai.streamlit.app/)
- Deploy project on Streamlit Community Cloud to provide a web-based interface for generating READMEs.
- [🛸 Go to readme-ai on Streamlit!](https://readmeai.streamlit.app/)

### 🐛 Bug Fixes
- Update [ignore_files.toml](https://github.com/eli64s/readme-ai/blob/main/readmeai/conf/ignore_files.toml) to stop ignoring the following file types:

- Update configuration [ignore_files.toml](https://github.com/eli64s/readme-ai/blob/main/readmeai/conf/ignore_files.toml) to stop ignoring the following file extensions:
- yaml, toml, txt, lock

---
Expand Down
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.3.047"
version = "0.3.049"
description = "🚀 Generate beautiful README files from the terminal. Powered by OpenAI's GPT language model APIs 💫"
authors = ["Eli <[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion readmeai/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def create_markdown_sections(
markdown_sections = [
config.md.header,
markdown_badges,
config.md.toc.format(name.capitalize()),
config.md.toc.format(name),
config.md.intro,
config.md.tree,
markdown_repository,
Expand Down
2 changes: 1 addition & 1 deletion readmeai/conf/ignore_files.toml
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,5 @@ files = [
".gitignore",
".whitesource",
".prettierrc",
".pre-commit-config",
".pre-commit-config.yaml",
]
26 changes: 13 additions & 13 deletions readmeai/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from . import logger

LOGGER = logger.Logger(__name__)
logger = logger.Logger(__name__)


def parse_docker_compose(content: str) -> List[str]:
Expand All @@ -19,9 +19,9 @@ def parse_docker_compose(content: str) -> List[str]:
if isinstance(data, dict) and "services" in data:
return list(data["services"].keys())
else:
LOGGER.error("Invalid docker-compose.yaml file format")
logger.error("Invalid docker-compose.yaml file format")
except yaml.YAMLError as excinfo:
LOGGER.error(f"Error parsing docker-compose.yaml: {str(excinfo)}")
logger.error(f"Error parsing docker-compose.yaml: {str(excinfo)}")
return []


Expand All @@ -38,7 +38,7 @@ def parse_conda_env_file(content: str) -> List[str]:
dependencies.extend(package.keys())
return dependencies
except yaml.YAMLError as excinfo:
LOGGER.error(f"Error parsing conda environment file: {str(excinfo)}")
logger.error(f"Error parsing conda environment file: {str(excinfo)}")
return []


Expand All @@ -50,7 +50,7 @@ def parse_pipfile(content: str) -> List[str]:
dev_packages = data.get("dev-packages", {})
return list(packages.keys()) + list(dev_packages.keys())
except toml.TomlDecodeError as excinfo:
LOGGER.error(f"Error parsing Pipfile: {str(excinfo)}")
logger.error(f"Error parsing Pipfile: {str(excinfo)}")
return []


Expand All @@ -62,7 +62,7 @@ def parse_pipfile_lock(content: str) -> List[str]:
develop_packages = data.get("develop", {})
return list(default_packages.keys()) + list(develop_packages.keys())
except json.JSONDecodeError as excinfo:
LOGGER.error(f"Error parsing Pipfile.lock: {str(excinfo)}")
logger.error(f"Error parsing Pipfile.lock: {str(excinfo)}")
return []


Expand All @@ -81,7 +81,7 @@ def parse_poetry_lock(content: str) -> List[str]:
break
return packages
except Exception as excinfo:
LOGGER.error(f"Error parsing poetry.lock: {str(excinfo)}")
logger.error(f"Error parsing poetry.lock: {str(excinfo)}")
return []


Expand All @@ -99,7 +99,7 @@ def parse_pyproject_toml(content: str) -> List[str]:
for dep_name in dep_list
]
except Exception as excinfo:
LOGGER.error(f"Error parsing pyproject.toml: {str(excinfo)}")
logger.error(f"Error parsing pyproject.toml: {str(excinfo)}")
return []


Expand All @@ -123,7 +123,7 @@ def parse_cargo_toml(content: str) -> List[str]:
dependencies = re.findall(r"\[dependencies\.(.*?)\]", content)
return dependencies
except re.error as excinfo:
LOGGER.error(f"Error parsing Cargo.toml: {str(excinfo)}")
logger.error(f"Error parsing Cargo.toml: {str(excinfo)}")
return []


Expand All @@ -134,7 +134,7 @@ def parse_cargo_lock(content: str) -> List[str]:
packages = data.get("package", [])
return [package.get("name") for package in packages]
except toml.TomlDecodeError as excinfo:
LOGGER.error(f"Error parsing Cargo.lock: {str(excinfo)}")
logger.error(f"Error parsing Cargo.lock: {str(excinfo)}")
return []


Expand All @@ -148,7 +148,7 @@ def parse_package_json(content: str) -> List[str]:
package_names.extend(data[section].keys())
return package_names
except json.JSONDecodeError as excinfo:
LOGGER.error(f"Error parsing package.json: {str(excinfo)}")
logger.error(f"Error parsing package.json: {str(excinfo)}")
return []


Expand All @@ -157,7 +157,7 @@ def parse_yarn_lock(content: str) -> List[str]:
try:
return re.findall(r"(\S+)(?=@)", content)
except re.error as excinfo:
LOGGER.error(f"Error parsing yarn.lock: {str(excinfo)}")
logger.error(f"Error parsing yarn.lock: {str(excinfo)}")
return []


Expand All @@ -172,7 +172,7 @@ def parse_package_lock_json(content: str) -> List[str]:
if package.startswith("@types/")
]
except json.JSONDecodeError as excinfo:
LOGGER.error(f"Error parsing package-lock.json: {str(excinfo)}")
logger.error(f"Error parsing package-lock.json: {str(excinfo)}")
return []


Expand Down

0 comments on commit 85c43a0

Please sign in to comment.