Skip to main content

A README.md generation tool

Project description

readme-ation

Version: 0.1.8

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.9.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

readme_ation-0.1.9-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: readme_ation-0.1.9.tar.gz
  • Upload date:
  • Size: 5.9 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.9.tar.gz
Algorithm Hash digest
SHA256 da92216910d0d39e9d40945d8552644177a3897ecbb3caa109a659676a93e189
MD5 8a19bdc50279b45ac34114de0b59e9a9
BLAKE2b-256 e8939d877d1be3c8c3b16f10c844933acd48372fdbd22c0d4f63cf9ee47baa4a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for readme_ation-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 b571a1a6484ea3dbffaea06f6e1a17822f6bb77f5888c1a96d8fd1159648ad1e
MD5 e271f06ca3d5154d85dbf078a4d3eff3
BLAKE2b-256 6fa1e93f172f73f48b4c542a4b537bf2d2102ab103853f2dafc041224051e3ee

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