Skip to content

Commit

Permalink
Improved readme
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelvanstraten committed Aug 8, 2023
1 parent fdf2018 commit a1f36a1
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# SwiftyRedis

SwiftyRedis is a powerful asynchronous Redis library for Swift that simplifies interaction with Redis databases. Drawing inspiration from the [redis-rs](https://github.com/redis-rs/redis-rs) Rust crate, SwiftyRedis offers a high-level interface to Redis functionality, while also allowing for low-level flexibility. It's designed to enhance your development experience by providing customizable type conversions and leveraging modern async-await patterns.
SwiftyRedis is a powerful and flexible asynchronous Redis library for Swift, designed to streamline your interaction with Redis databases. Drawing inspiration from the [redis-rs](https://github.com/redis-rs/redis-rs) Rust crate, SwiftyRedis offers a high-level interface to Redis functionality while preserving low-level flexibility. It is tailored to enhance your development experience by providing customizable type conversions and harnessing modern async-await patterns.

## Basic Usage
## Getting Started

```swift
import SwiftyRedis
Expand All @@ -16,30 +16,34 @@ let value: String = try await connection.hget("myhash", "field1")
## Features and Enhancements

- [x] Implementation of over 240 Redis commands
- [x] Seamless type conversion protocol for user-friendly results
- [x] Utilization of modern and intuitive async-await design
- [x] Simplified builder interface for constructing custom commands
- [x] Seamless type conversion protocol for intuitive results
- [x] Leveraging modern and intuitive async-await design patterns
- [x] Simplified builder interface for crafting custom commands
- [x] Built-in Pub/Sub support
- [ ] Upcoming: Cluster support
- [ ] Upcoming: RedisJSON implementation
- [ ] Upcoming: RedisTimeSeries implementation

## Documentation

Comprehensive documentation is available [here](https://michaelvanstraten.github.io/swifty-redis/documentation/swiftyredis/), or you can access it via the link in the "About" section on the right.
Comprehensive documentation is available [here](https://michaelvanstraten.github.io/swifty-redis/documentation/swiftyredis/), or you can conveniently access it via the link in the "About" section on the right.

## Development Environment
## Contributing

While I personally use Xcode and neovim for this project, you can choose any IDE of your preference as long as you have the [Swift compiler](https://www.swift.org/getting-started/) installed.
We deeply appreciate your interest in contributing to SwiftyRedis! To get started, we recommend exploring the documentation through the provided link above. While the documentation might not be fully exhaustive, it's packed with valuable insights. Here are some areas where you can make a meaningful impact:

### Auto-Generation
- **Enhance Test Coverage:** Elevate the project's reliability by crafting additional tests or enhancing the existing ones.
- **Refine Documentation Structure:** Enhance the clarity and organization of our documentation. Your contributions can help users navigate information more effectively.
- **Enrich Tutorials:** Consider introducing new tutorials or refining existing ones in the documentation. This can significantly aid users in effectively utilizing SwiftyRedis.

Given Redis offers an extensive set of 240+ commands, I've developed a Python script for auto-generating corresponding Swift functions. This script extracts the latest command information from the [Redis GitHub repository](https://github.com/redis/redis), parsing JSON files located under `src/commands`. To rerun this auto-generation process, execute the `generate-commands.py` script found in the `Sources/Autogen` directory. The resulting Swift files will be placed in the `Sources/SwiftyRedis/Autogen/Commands` directory. This mechanism ensures that new commands introduced by Redis will be automatically supported.
### Automated Code Generation

In case of any issues during command implementation, you can specify function names in the `commands_to_ignore.json` file situated in the `Sources/Autogen/config` directory. It's worth noting that you should use the function names that would be generated, not the command names themselves. This approach simplifies development by obviating the need to look up actual command names.
To facilitate the support of Redis's extensive set of 240+ commands, I've developed a Python script that automatically generates corresponding Swift functions. This script extracts command information from the [Redis GitHub repository](https://github.com/redis/redis), parsing JSON files under `src/commands`. To re-run this auto-generation process, execute the `generate-commands.py` script found in the `Sources/Autogen` directory. The generated Swift files will be placed in the `Sources/SwiftyRedis/Autogen/Commands` directory. This ensures automatic support for new Redis commands.

Furthermore, a `formatting_config.json` file in the `Sources/Autogen/config` directory stores a configuration utilized by [swift-format](https://github.com/apple/swift-format), responsible for formatting generated Swift files.
If you encounter issues during command implementation, you can specify function names in the `commands_to_ignore.json` file located in the `Sources/Autogen/config` directory. It's important to use the function names that will be generated, not the command names themselves. This simplifies development by eliminating the need to look up actual command names.

Feel free to contribute to the project and enhance this library's functionality!
Additionally, the `formatting_config.json` file in the `Sources/Autogen/config` directory contains configuration settings used by [swift-format](https://github.com/apple/swift-format) for formatting generated Swift files.

**Note:** The information provided in this readme reflects the state as of August 2023.
We encourage you to contribute to the project and enhance the library's functionality!

**Please Note:** The information provided in this readme is accurate as of August 2023.

0 comments on commit a1f36a1

Please sign in to comment.