Skip to content

Commit

Permalink
docs(serde_yml): 📝 update on documentation and template
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienrousseau committed Aug 24, 2024
1 parent fc4ae52 commit afac2d5
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 86 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
all:
name: Document
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
61 changes: 26 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,23 @@ alt="Serde YML logo" width="66" align="right" />

# Serde YML (a fork of Serde YAML)

[![GitHub][github-badge]][06]
[![Crates.io][crates-badge]][07]
[![Docs.rs][docs-badge]][08]
[![Codecov][codecov-badge]][09]
[![Build Status][build-badge]][10]
[![Made With Love][made-with-rust]][11] [![Crates.io][crates-badge]][07] [![lib.rs][libs-badge]][11] [![Docs.rs][docs-badge]][08] [![Codecov][codecov-badge]][09] [![Build Status][build-badge]][10] [![GitHub][github-badge]][06]

A Rust library for using the [Serde][01] serialization framework with data in
[YAML][05] file format. This project, has been renamed to [Serde YML][00] to
avoid confusion with the original Serde YAML crate which is now archived and
no longer maintained.
[Serde YML][00] is a Rust library for using the [Serde][01] serialization framework with data in [YAML][05] file format.

## Credits and Acknowledgements

This library is a continuation of the excellent work done by [David Tolnay][03]
and the maintainers of the [serde-yaml][02] library.

While Serde YML started as a fork of serde-yaml, it has now evolved into a
separate library with its own goals and direction in mind and does not intend
to replace the original serde-yaml crate.

If you are currently using serde-yaml in your projects, we recommend carefully
evaluating your requirements and considering the stability and maturity of the
original library as well as looking at the features and improvements offered by
other YAML libraries in the Rust ecosystem.
## Installation

I would like to express my sincere gratitude to [David Tolnay][03] and the
[serde-yaml][02] team for their valuable contributions to the Rust community
and for inspiring this project.

## Dependency
Add this to your `Cargo.toml`:

```toml
[dependencies]
serde = "1.0"
serde_yml = "0.0.12"
```

Release notes are available under [GitHub releases][04].

## Using Serde YML
## Usage

[API documentation is available in rustdoc form][docs.rs] but the general idea
is:

[docs.rs]: https://docs.rs/serde_yml
Here's a quick example on how to use Serde YML to serialize and deserialize a struct to and from YAML:

```rust
use serde::{Serialize, Deserialize};
Expand All @@ -77,6 +49,14 @@ fn main() -> Result<(), serde_yml::Error> {
}
```

## Documentation

For full API documentation, please visit [https://doc.libyml.com/serde-yaml/][04] or [https://docs.rs/serde-yaml][08].

## Rust Version Compatibility

Compiler support: requires rustc 1.56.0+

## Examples

Serde YML provides a set of comprehensive examples. You can find them in the
Expand Down Expand Up @@ -604,6 +584,14 @@ serialize and deserialize an enum field (`MyEnum`) within a struct
customization of the serialization and deserialization process through the use
of helper functions.

## Contributing

Contributions are welcome! Please submit a Pull Request on [GitHub][06].

## Credits and Acknowledgements

Serde YML is a continuation of the excellent work done by [David Tolnay][03] and the maintainers of the [serde-yaml][02] library. While Serde YML has evolved into a separate library, we express our sincere gratitude to them for their contributions to the Rust community.

## License

Licensed under either of the [Apache License](LICENSE-APACHE) or the
Expand All @@ -617,15 +605,18 @@ be dual licensed as above, without any additional terms or conditions.
[01]: https://github.com/serde-rs/serde
[02]: https://github.com/dtolnay/serde-yaml
[03]: https://github.com/dtolnay
[04]: https://github.com/sebastienrousseau/serde_yml/releases
[04]: https://doc.libyml.com/serde-yaml/
[05]: https://yaml.org/
[06]: https://github.com/sebastienrousseau/serde_yml
[07]: https://crates.io/crates/serde_yml
[08]: https://docs.rs/serde_yml
[09]: https://codecov.io/gh/sebastienrousseau/serde_yml
[10]: https://github.com/sebastienrousseau/serde-yml/actions?query=branch%3Amaster
[11]: https://www.rust-lang.org/
[build-badge]: https://img.shields.io/github/actions/workflow/status/sebastienrousseau/serde_yml/release.yml?branch=master&style=for-the-badge&logo=github "Build Status"
[codecov-badge]: https://img.shields.io/codecov/c/github/sebastienrousseau/serde_yml?style=for-the-badge&token=Q9KJ6XXL67&logo=codecov "Codecov"
[crates-badge]: https://img.shields.io/crates/v/serde_yml.svg?style=for-the-badge&color=fc8d62&logo=rust "Crates.io"
[libs-badge]: https://img.shields.io/badge/lib.rs-v0.0.12-orange.svg?style=for-the-badge "View on lib.rs"
[docs-badge]: https://img.shields.io/badge/docs.rs-serde__yml-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs "Docs.rs"
[github-badge]: https://img.shields.io/badge/github-sebastienrousseau/serde--yml-8da0cb?style=for-the-badge&labelColor=555555&logo=github "GitHub"
[made-with-rust]: https://img.shields.io/badge/rust-f04041?style=for-the-badge&labelColor=c0282d&logo=rust 'Made With Rust'
69 changes: 19 additions & 50 deletions TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,31 @@
# Serde YML (a fork of Serde YAML)

[![GitHub][github-badge]][05] [![Crates.io][crates-badge]][06] [![Docs.rs][docs-badge]][07] [![Codecov][codecov-badge]][08] [![Build Status][build-badge]][09]

A Rust library for using the [Serde][01] serialization framework with data in [YAML][04] file format. This project, has been renamed to [Serde YML][00] to avoid confusion with the original Serde YAML crate which is now archived and no longer maintained.

## Credits and Acknowledgements

This library is a continuation of the excellent work done by [David Tolnay][03] and the maintainers of the [serde-yaml][02] library.
<!-- markdownlint-disable MD033 MD041 -->

While Serde YML started as a fork of serde-yaml, it has now evolved into a separate library with its own goals and direction in mind and does not intend to replace the original serde-yaml crate.
<img src="https://kura.pro/serde_yml/images/logos/serde_yml.svg"
alt="Serde YML logo" width="66" align="right" />

If you are currently using serde-yaml in your projects, we recommend carefully evaluating your requirements and considering the stability and maturity of the original library as well as looking at the features and improvements offered by other YAML libraries in the Rust ecosystem.
<!-- markdownlint-enable MD033 MD041 -->

## License

Licensed under either of <a href="LICENSE-APACHE">Apache License, Version 2.0</a> or <a href="LICENSE-MIT">MIT license</a> at your option.
# Serde YML (a fork of Serde YAML)

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
[![Made With Love][made-with-rust]][11] [![Crates.io][crates-badge]][07] [![lib.rs][libs-badge]][11] [![Docs.rs][docs-badge]][08] [![Codecov][codecov-badge]][09] [![Build Status][build-badge]][10] [![GitHub][github-badge]][06]

## Changelog
[Serde YML][00] is a Rust library for using the [Serde][01] serialization framework with data in [YAML][05] file format.

[00]: https://serdeyml.com
[01]: https://github.com/serde-rs/serde
[02]: https://github.com/dtolnay/serde-yaml
[03]: https://github.com/dtolnay
[04]: https://yaml.org/
[05]: https://github.com/sebastienrousseau/serde_yml
[06]: https://crates.io/crates/serde_yml
[07]: https://docs.rs/serde_yml
[08]: https://codecov.io/gh/sebastienrousseau/serde_yml
[09]: https://github.com/sebastienrousseau/serde-yml/actions?query=branch%3Amain
[build-badge]: https://img.shields.io/github/actions/workflow/status/sebastienrousseau/serde_yml/release.yml?branch=master&style=for-the-badge "Build Status"
[codecov-badge]: https://img.shields.io/codecov/c/github/sebastienrousseau/serde_yml?style=for-the-badge&token=Q9KJ6XXL67 "Codecov"
[05]: https://yaml.org/
[06]: https://github.com/sebastienrousseau/serde_yml
[07]: https://crates.io/crates/serde_yml
[08]: https://docs.rs/serde_yml
[09]: https://codecov.io/gh/sebastienrousseau/serde_yml
[10]: https://github.com/sebastienrousseau/serde-yml/actions?query=branch%3Amaster
[11]: https://www.rust-lang.org/
[build-badge]: https://img.shields.io/github/actions/workflow/status/sebastienrousseau/serde_yml/release.yml?branch=master&style=for-the-badge&logo=github "Build Status"
[codecov-badge]: https://img.shields.io/codecov/c/github/sebastienrousseau/serde_yml?style=for-the-badge&token=Q9KJ6XXL67&logo=codecov "Codecov"
[crates-badge]: https://img.shields.io/crates/v/serde_yml.svg?style=for-the-badge&color=fc8d62&logo=rust "Crates.io"
[libs-badge]: https://img.shields.io/badge/lib.rs-v0.0.12-orange.svg?style=for-the-badge "View on lib.rs"
[docs-badge]: https://img.shields.io/badge/docs.rs-serde__yml-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs "Docs.rs"
[github-badge]: https://img.shields.io/badge/github-sebastienrousseau/serde--yml-8da0cb?style=for-the-badge&labelColor=555555&logo=github "GitHub"
[made-with-rust]: https://img.shields.io/badge/rust-f04041?style=for-the-badge&labelColor=c0282d&logo=rust 'Made With Rust'

## What's Changed

### Enhancements

#### Forked Serde YAML

- **Hard reset**: Hard reset to the latest @dtolnay [latest release](https://github.com/dtolnay/serde-yaml/commit/2009506d33767dfc88e979d6bc0d53d09f941c94) to keep traceability and retain commits history to the original [Serde YAML](https://github.com/dtolnay/serde-yaml) codebase and credits to the maintainers.
- **Renaming**: This project, has been renamed to `Serde YML` to avoid confusion with the original Serde YAML crate which is now archived and no longer maintained. While `Serde YML` started as a fork of serde-yaml, it has now evolved into a separate library with its own goals and direction in mind and does not intend to replace the original serde-yaml crate.

#### CI Improvements

- **ci(serde-yaml)**: Added a missing release workflow and made minor tweaks to the README for better clarity and documentation. This update ensures smoother and more reliable release processes.
- Commit: `ci(serde-yaml): :green_heart: add missing release workflow and minor tweaks in README`

#### Testing Enhancements

- **test(serde-yaml)**: Enhanced test coverage by adding new unit tests for `mapping.rs`. These tests ensure the robustness and reliability of the `Mapping` struct and its associated methods.

- Commit: `test(serde-yaml): :white_check_mark: add new tests for`mapping.rs``

- **test(serde-yaml)**: Expanded the test suite by adding comprehensive unit tests for the `ser.rs` module. The new tests cover various serialization scenarios, including scalar values, sequences, maps, nested structures, optional fields, and custom serializers.
- Commit: `test(serde-yaml): :white_check_mark: add unit tests for the`ser.rs`module`

**Full Changelog**: <https://github.com/sebastienrousseau/serde_yml/commits/v0.0.12>
## Changelog 📚

0 comments on commit afac2d5

Please sign in to comment.