Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/loveduckie/impression-image-tool
A simple tool written in Python for generating impression images for blog posts. It utilises vector graphics for companies, technologies, and brands for rasterizing images.
https://github.com/loveduckie/impression-image-tool
Last synced: about 1 month ago
JSON representation
A simple tool written in Python for generating impression images for blog posts. It utilises vector graphics for companies, technologies, and brands for rasterizing images.
- Host: GitHub
- URL: https://github.com/loveduckie/impression-image-tool
- Owner: LoveDuckie
- License: mit
- Created: 2024-11-04T09:13:24.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-04T13:07:30.000Z (about 2 months ago)
- Last Synced: 2024-11-04T14:20:44.395Z (about 2 months ago)
- Language: Shell
- Homepage: https://lucshelton.com
- Size: 42 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Impression Image Tool
This repository is a template for creating Python tools with a consistent structure and standard features like linting, testing, and packaging.
## Features
- **Python Package Structure**: Includes a basic Python package setup (`impression_image_tool`).
- **Testing Setup**: Example test files (`impression_image_tool_tests`) for unit testing.
- **Development Tools**: Shell scripts to automate formatting, linting, testing (`run_format.sh`, `run_lint.sh`, `run_tests.sh`), and renaming (`rename.sh`).
- **Project Configuration**: Uses `pyproject.toml` for dependency management with [Poetry](https://python-poetry.org/).## Getting Started
### Prerequisites
- Python 3.8+
- [Poetry](https://python-poetry.org/) for dependency and project management### Dependencies
The project uses several dependencies defined in `pyproject.toml`. Below is a summary of the main dependencies and their purposes:
- **[Poetry](https://python-poetry.org/)**: Used for dependency management and packaging.
- **Linting and Formatting**: Includes tools like `pylint` and `black` to ensure code quality and consistency.
- **Testing**: Uses `pytest` for unit testing to ensure the functionality of the code.To install the dependencies, use:
```sh
poetry install
```### Project Dependencies
This project relies on the following dependencies to ensure functionality, development efficiency, and maintainability:
- **[rich](https://github.com/Textualize/rich)**: For rendering rich text, tables, and progress bars in the terminal, enhancing the user experience of the CLI.
- **[rich-click](https://github.com/ewels/rich-click)**: Combines Rich and Click to add rich-text formatting and improve the usability of the command-line interface.
- **[click](https://github.com/pallets/click)**: A framework for building flexible and easy-to-use command-line interfaces (CLI).### Development & Testing Dependencies
- **[black](https://github.com/psf/black)**: Automatically formats code to ensure consistent style across the project.
- **[pylint](https://github.com/PyCQA/pylint)**: Provides static code analysis to enforce coding standards and detect potential bugs.
- **[coverage](https://github.com/nedbat/coveragepy)**: Measures the coverage of unit tests, helping to ensure all code paths are tested.### Documentation Dependencies
- **[sphinx](https://www.sphinx-doc.org/)**: Generates project documentation in formats such as HTML and PDF.
- **[sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme)**: Provides a clean, responsive theme for documentation, styled like Read the Docs.These dependencies help streamline development, testing, and documentation while ensuring a user-friendly command-line interface.
### Installation
1. Clone the repository:
```sh
git clone https://github.com/yourusername/impression-image-tool.git
cd impression-image-tool
```2. Install the dependencies:
```sh
poetry install
```### Running the Tool
To run the main script:
```sh
poetry run python -m impression_image_tool
```### Development
#### Formatting
To format the codebase:
```sh
./run_format.sh
```#### Linting
To lint the codebase:
```sh
./run_lint.sh
```#### Testing
To run the tests:
```sh
./run_tests.sh
```#### Renaming the Project
To rename the project (e.g., change the package name from `impression_image_tool` to something else):
```sh
./rename.sh new_project_name
```### Project Structure
- `impression_image_tool/`: The main package containing the tool's source code.
- `impression_image_tool_tests/`: Contains unit tests for the package.
- `.gitignore`: Specifies files and folders to be ignored by Git.
- `pyproject.toml`: Project configuration and dependency management file.
- `LICENSE`: The license for this project.### License
This project is licensed under the terms of the MIT license. See the [LICENSE](LICENSE) file for details.
### Contributing
Feel free to open issues or submit pull requests for new features, bug fixes, or improvements.
## Acknowledgements
This template is inspired by best practices for Python tool development, making it easy to start a new project with a consistent and productive setup.