Skip to main content

A README.md generation tool

Project description

Overview

readme-ation automates the generation of a README.md file with setup and run instructions tailored for your Python project. By analyzing your project’s Python files, it identifies imported packages, determines their versions, and updates your README with precise environment setup instructions. Additionally, it allows you to seamlessly add comprehensive project descriptions.

Features

  • Automated README Generation: Scans Python files to identify imported packages and their versions, generating environment setup instructions for a Mamba environment.
  • Project Description Section: Enhances your README with detailed project information, including an overview, motivation, technologies used, approach, challenges, key takeaways, and acknowledgments.

Functions

  • find_all_py_files(directory): Recursively finds all Python files in the specified directory and its subdirectories.
  • open_or_create_readme(readme_path): Opens an existing README file or prompts the creation of a new one if it doesn’t exist.
  • add_setup_with_versions(file_paths, readme_path): Analyzes the specified Python files, identifies package dependencies and their versions, and updates the README with setup and run instructions.
  • add_project_description(readme_path, project_details): Appends a detailed project description to the README file, including sections such as overview, motivation, technologies used, approach, challenges, key takeaways, and acknowledgments.

Installation

To install readme-ation, use pip:

pip install readme-ation

Usage

  1. Generate Setup Instructions:

    from readme_ation import find_all_py_files, add_setup_with_versions
    
    file_paths = find_all_py_files('your_project_directory')
    add_setup_with_versions(file_paths, 'README.md')
    
  2. Add Project Description:

    from readme_ation import add_project_description
    
    project_details = {
        'overview': 'Your project overview here.',
        'motivation': 'The motivation behind your project.',
        'technologies': 'Technologies and tools used in your project.',
        'approach': 'Your approach to solving the problem.',
        'challenges': 'Challenges faced during the project.',
        'key_takeaways': 'Key takeaways and learnings from the project.',
        'acknowledgments': 'Acknowledgments and credits.'
    }
    
    add_project_description('README.md', project_details)
    

Example

Here is a sample usage demonstrating how to automate the README generation process:

from readme_ation import find_all_py_files, open_or_create_readme, add_setup_with_versions, add_project_description

directory = 'your_project_directory'
readme_path = 'README.md'
file_paths = find_all_py_files(directory)

open_or_create_readme(readme_path)
add_setup_with_versions(file_paths, readme_path)

project_details = {
    'overview': 'This is an example project that demonstrates the usage of readme-ation.',
    'motivation': 'Automating README generation saves time and ensures consistency.',
    'technologies': 'Python, Mamba, and other dependencies.',
    'approach': 'Scanning files for imports and creating setup instructions automatically.',
    'challenges': 'Handling various edge cases in dependency detection.',
    'key_takeaways': 'Using readme-ation can significantly improve your project documentation workflow.',
    'acknowledgments': 'Thanks to all contributors and the open-source community.'
}

add_project_description(readme_path, project_details)

Contributing

Please email me at chuckfinca@gmail.com if you would like to contribute.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

readme_ation-0.1.12.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

readme_ation-0.1.12-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file readme_ation-0.1.12.tar.gz.

File metadata

  • Download URL: readme_ation-0.1.12.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.19

File hashes

Hashes for readme_ation-0.1.12.tar.gz
Algorithm Hash digest
SHA256 e7ecb0c433c5d2162f58d030b5644335ca85b07d9bd73a38dfd2ecf20cf335de
MD5 52318b474fa5040002367fd565ff6334
BLAKE2b-256 774a03e75da628fa924f0d5f8396e659af0cb22cddabad7aefc6904100d0fbd0

See more details on using hashes here.

File details

Details for the file readme_ation-0.1.12-py3-none-any.whl.

File metadata

File hashes

Hashes for readme_ation-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 1176aed5aac120e9e9d61856d16a0ca6c5824904255bc14b7c55a0a463e4dc2d
MD5 6a1d7c5eb1c4ca34023d8d8b34c63743
BLAKE2b-256 67ae2f2f08df8ae2cc5c420ffd586b7d333e72cedeffa23b2714053875645543

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page