Skip to content

GSU-Analytics/read_pyfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

read_pyfiles

read_pyfiles is a Python package for traversing directories, reading Python files, and outputting their contents to a single text file. It's configurable via a YAML file, making it easy to use in different scenarios.

Features

  • Traverse directories to locate .py files.
  • Combine file contents into a single output file.
  • Configure paths and output file name via a YAML configuration.

Installation

Local Installation

To install the package locally, clone the repository and use pip:

git clone https://github.com/GSU-Analytics/read_pyfiles.git
cd read_pyfiles
pip install .

Remote Installation

If the repository is public and includes a setup.py, you can install it directly from GitHub:

pip install git+https://github.com/GSU-Analytics/read_pyfiles.git

This will fetch the latest version of the code from the main branch and install it.

Usage

  1. Create a configuration file named read_config.yaml:
output_file: "output.txt"
paths_to_read:
  - "src"
  - "tests"
  - "main.py"
  1. Run the tool using the command:
read_pyfiles

The output file will contain the combined contents of all .py files in the specified paths.

Development

To set up a development environment:

  1. Clone the repository:
git clone https://github.com/GSU-Analytics/read_pyfiles.git
cd read_pyfiles
  1. Install the package in editable mode:
pip install -e .
  1. Run the tests:
pytest -vv

License

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

Contributing

We welcome contributions to improve this package. If you'd like to contribute, please:

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Submit a pull request with a clear description of the changes.

Contact

For any questions or issues, please open an issue in the GitHub repository.

About

Python package for traversing directories, reading Python files, and outputting their contents to a single text file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages