Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
docs: add about and contributing guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
soumyamahunt committed May 23, 2022
1 parent c0ae8fb commit 1c3f7d1
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,6 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at soumya.mahunt@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
50 changes: 50 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,50 @@
# Contributing Guidelines

This document contains information and guidelines about contributing to this project.
Please read it before you start participating.

_See also: [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md)_

## Submitting Pull Requests

You can contribute by fixing bugs or adding new features. For larger code changes, we first recommend discussing them in our [Github issues](https://github.com/SwiftyLab/dynamic-codable-kit/issues). When submitting a pull request, please add relevant tests and ensure your changes don't break any existing tests (see [Automated Tests](#automated-tests) below).

### Things you will need

* Linux, Mac OS (preferred), or Windows.
* Git
* [Swift](https://www.swift.org/getting-started/#installing-swift)
* Optional
* Xcode and [CocoaPods], to test [CocoaPods] integration
* [Node], to use helper scripts in [Scripts](Scripts/) folder.

### Automated Tests

GitHub action is already setup to run tests on pull requests targeting `main` branch. However, to reduce heavy usage of GitHub runners, run the following commands in your terminal to test:

| Test category | With [Node] | Maually |
| --- | --- | --- |
| SPM integration | Run `npm run test` | Run `swift test` |
| [CocoaPods] integration (Requires Xcode) | Run `npm run pod-lint` | Run `pod lib lint --no-clean --allow-warnings` |

## Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

<ol type='a'>
<li id='cert-a'>
The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
</li>
<li id='cert-b'>
The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or
</li>
<li id='cert-c'>
The contribution was provided directly to me by some other person who certified <a href="#cert-a">(a)</a>, <a href="#cert-b">(b)</a> or <a href="#cert-c">(c)</a> and I have not modified it.
</li>
<li id='cert-d'>
I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.
</li>
</ol>

[CocoaPods]: https://cocoapods.org/
[Node]: https://nodejs.org/
74 changes: 74 additions & 0 deletions README.md
@@ -0,0 +1,74 @@
# DynamicCodableKit

[![API Docs](http://img.shields.io/badge/Read_the-docs-2196f3.svg)](https://swiftylab.github.io/dynamic-codable-kit/documentation/dynamiccodablekit/)
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/DynamicCodableKit.svg?label=CocoaPods&color=C90005)](https://badge.fury.io/co/DynamicCodableKit)
[![Swift Package Manager Compatible](https://img.shields.io/github/v/tag/SwiftyLab/dynamic-codable-kit?label=SPM&color=DE5D43)](https://badge.fury.io/gh/SwiftyLab%2Fdynamic-codable-kit)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg)](https://github.com/Carthage/Carthage)
[![Swift](https://img.shields.io/badge/Swift-5-orange)](https://img.shields.io/badge/Swift-5-DE5D43)
[![Platforms](https://img.shields.io/badge/Platforms-all-sucess)](https://img.shields.io/badge/Platforms-all-sucess)
[![CI/CD](https://github.com/SwiftyLab/dynamic-codable-kit/actions/workflows/main.yml/badge.svg?event=push)](https://github.com/SwiftyLab/dynamic-codable-kit/actions/workflows/main.yml)
[![CodeQL](https://github.com/SwiftyLab/dynamic-codable-kit/actions/workflows/codeql-analysis.yml/badge.svg?event=push)](https://github.com/SwiftyLab/dynamic-codable-kit/actions/workflows/codeql-analysis.yml)
[![codecov](https://codecov.io/gh/SwiftyLab/dynamic-codable-kit/branch/main/graph/badge.svg?token=QIM4SKWNCS)](https://codecov.io/gh/SwiftyLab/dynamic-codable-kit)

DynamicCodableKit helps you to implement dynamic JSON decoding within the constraints of Swift's sound type system by working on top of Swift's Codable implementations.

## Features

- Decode dynamic type based on JSON keys.
- Decode dynamic type based on parent JSON key.
- Dynamically decode types with default value if decoding fails.
- Decode dynamic type array/set with option to ignore invalid elements.
- Decode dynamic data based on user actions.

## Requirements

| Platform | Minimum Swift Version | Installation | Status |
| --- | --- | --- | --- |
| iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+ | 5.1 | [CocoaPods](#cocoapods), [Carthage](#carthage), [Swift Package Manager](#swift-package-manager) | Fully Tested |
| Linux | 5.1 | [Swift Package Manager](#swift-package-manager) | Fully Tested |
| Windows | 5.1 | [Swift Package Manager](#swift-package-manager) | Not Tested but Supported |

## Installation

### CocoaPods

[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate `DynamicCodableKit` into your Xcode project using CocoaPods, specify it in your `Podfile`:

```ruby
pod 'DynamicCodableKit'
```

### Carthage

[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate `DynamicCodableKit` into your Xcode project using Carthage, specify it in your `Cartfile`:

```ogdl
github "SwiftyLab/DynamicCodableKit"
```

### Swift Package Manager

The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler.

Once you have your Swift package set up, adding `DynamicCodableKit` as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.

```swift
dependencies: [
.package(url: "https://github.com/SwiftyLab/DynamicCodableKit.git", .upToNextMajor(from: "1.0.0"))
]
```

## Usage

See the full [documentation](https://swiftylab.github.io/dynamic-codable-kit/documentation/dynamiccodablekit/) for API details and articles on sample scenarios.

## Contributing

If you wish to contribute a change, suggest any improvementse,
please review our [contribution guide](CONTRIBUTING.md),
check for open [issues](https://github.com/SwiftyLab/dynamic-codable-kit/issues), if it is already being worked upon
or open a [pull request](https://github.com/SwiftyLab/dynamic-codable-kit/pulls).

## License

`dynamic-codable-kit` is released under the MIT license. [See LICENSE](LICENSE) for details.

0 comments on commit 1c3f7d1

Please sign in to comment.