Skip to content

Commit

Permalink
Merge branch 'release/v0.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
fktn-k committed Dec 10, 2023
2 parents 8371441 + 052245c commit 097498c
Show file tree
Hide file tree
Showing 80 changed files with 2,041 additions and 628 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [ "9", "10", "11", "12", "13", latest ]
compiler: [ "7", "8", "9", "10", "11", "12", "13", latest ]
build_type: [ Debug, Release ]
container: gcc:${{matrix.compiler}}

steps:
- name: Install git and unzip
run: |
apt-get update
apt-get install -y git unzip
git --version
- uses: actions/checkout@v3
with:
submodules: recursive
Expand Down
2 changes: 1 addition & 1 deletion .reuse/templates/fkYAML.commented.jinja2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// _______ __ __ __ _____ __ __ __
/// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
/// | __| _ < \_ _/| ___ | _ | |___ version 0.2.3
/// | __| _ < \_ _/| ___ | _ | |___ version 0.3.0
/// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
///
{% for copyright_line in copyright_lines %}
Expand Down
2 changes: 1 addition & 1 deletion .reuse/templates/fkYAML_support.jinja2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
_______ __ __ __ _____ __ __ __
| __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
| __| _ < \_ _/| ___ | _ | |___ version 0.2.3
| __| _ < \_ _/| ___ | _ | |___ version 0.3.0
|__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML

{% for copyright_line in copyright_lines %}
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## [v0.3.0](https://github.com/fktn-k/fkYAML/releases/tag/v0.3.0) (2023-12-10)

[Full Changelog](https://github.com/fktn-k/fkYAML/compare/v0.2.3...v0.3.0)

- Add GCC compiler versions tested in GA workflows [\#248](https://github.com/fktn-k/fkYAML/pull/248) ([fktn-k](https://github.com/fktn-k))
- \#240 Support non-string-scalar node keys in basic\_node ctor with std::initializer\_list [\#247](https://github.com/fktn-k/fkYAML/pull/247) ([fktn-k](https://github.com/fktn-k))
- \#240 Support explicit block mappings & non-scalar nodes as mapping keys [\#245](https://github.com/fktn-k/fkYAML/pull/245) ([fktn-k](https://github.com/fktn-k))
- \#240 Support non-string scalar nodes as mapping keys [\#244](https://github.com/fktn-k/fkYAML/pull/244) ([fktn-k](https://github.com/fktn-k))
- \#240 implement node comparison [\#243](https://github.com/fktn-k/fkYAML/pull/243) ([fktn-k](https://github.com/fktn-k))
- Feature/238 apply correct noexcept [\#241](https://github.com/fktn-k/fkYAML/pull/241) ([fktn-k](https://github.com/fktn-k))

- Fixed missing callings of `fclose()` in the unit tests [\#246](https://github.com/fktn-k/fkYAML/pull/246) ([fktn-k](https://github.com/fktn-k))

- Update copyright description [\#249](https://github.com/fktn-k/fkYAML/pull/249) ([fktn-k](https://github.com/fktn-k))

## [v0.2.3](https://github.com/fktn-k/fkYAML/releases/tag/v0.2.3) (2023-12-03)

[Full Changelog](https://github.com/fktn-k/fkYAML/compare/v0.2.2...v0.2.3)
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.8)

project(
fkYAML
VERSION 0.2.3
VERSION 0.3.0
LANGUAGES CXX)

#############################################################
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 fktn
Copyright (c) 2023 Kensuke Fukutani

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ CMAKE_SCRIPTS = $(shell find . -type f \( -name 'CMakeLists.txt' -o -name '*.cma

# target version definition
TARGET_MAJOR_VERSION := 0
TARGET_MINOR_VERSION := 2
TARGET_PATCH_VERSION := 3
TARGET_MINOR_VERSION := 3
TARGET_PATCH_VERSION := 0
TARGET_VERSION_FULL := $(TARGET_MAJOR_VERSION).$(TARGET_MINOR_VERSION).$(TARGET_PATCH_VERSION)
VERSION_MACRO_FILE := include/fkYAML/detail/macros/version_macros.hpp

Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ Currently, the following compilers are known to work and used in GitHub Actions
| Clang 14.0.6 | Ubuntu 22.04.3 LTS |
| Clang 15.0.7 | Ubuntu 22.04.3 LTS |
| Clang 16.0.6 | Ubuntu 22.04.3 LTS |
| Clang 17.0.4 | Ubuntu 22.04.3 LTS |
| GCC 7.5.0 | Ubuntu 22.04.3 LTS |
| GCC 8.5.0 | Ubuntu 22.04.3 LTS |
| GCC 9.5.0 | Ubuntu 22.04.3 LTS |
| GCC 10.5.0 | Ubuntu 22.04.3 LTS |
| GCC 11.4.0 | Ubuntu 22.04.3 LTS |
Expand All @@ -132,7 +135,7 @@ If you encounter a problem regarding compilers, please let us know by creating a

This project is distributed under the [MIT License](https://opensource.org/license/mit/):

Copyright (c) 2023 fktn
Copyright (c) 2023 Kensuke Fukutani

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion docs/mkdocs/docs/api/basic_node/add_anchor_name.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If the basic_node has already had any anchor name, the new anchor name overwrite
## **Parameters**
***anchor_name***
***`anchor_name`*** [in]
: An anchor name. This should not be empty.
???+ Example
Expand Down
10 changes: 6 additions & 4 deletions docs/mkdocs/docs/api/basic_node/constructor.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ template <
detail::negation<detail::is_basic_json<U>>,
detail::disjunction<detail::is_node_compatible_type<basic_node, U>>>::value,
int> = 0>
basic_node(CompatibleType&& val); // (5)
basic_node(CompatibleType&& val) noexcept(
noexcept(ConverterType<U>::to_node(std::declval<basic_node&>(), std::declval<CompatibleType>()))); // (5)

template <
typename NodeRefStorageType,
detail::enable_if_t<detail::is_node_ref_storage<NodeRefStorageType>::value, int> = 0>
basic_node(const NodeRefStorageType& node_ref_storage); // (6)
basic_node(const NodeRefStorageType& node_ref_storage) noexcept; // (6)

basic_node(initializer_list_t init); // (7)
```
Expand Down Expand Up @@ -167,7 +168,8 @@ template <
detail::negation<detail::is_basic_json<U>>,
detail::disjunction<detail::is_node_compatible_type<basic_node, U>>>::value,
int> = 0>
basic_node(CompatibleType&& val);
basic_node(CompatibleType&& val) noexcept(
noexcept(ConverterType<U>::to_node(std::declval<basic_node&>(), std::declval<CompatibleType>()))); // (5)
```
Constructs a basic_node with a value of a compatible type.
The resulting basic_node has the value of `val` and the type which is associated with `CompatibleType`.
Expand Down Expand Up @@ -211,7 +213,7 @@ The resulting basic_node has the value of `val` and the type which is associated
template <
typename NodeRefStorageType,
detail::enable_if_t<detail::is_node_ref_storage<NodeRefStorageType>::value, int> = 0>
basic_node(const NodeRefStorageType& node_ref_storage);
basic_node(const NodeRefStorageType& node_ref_storage) noexcept;
```
Constructs a basic_node with a node_ref_storage.
The resulting basic_node has the value of the referenced basic_node by `node_ref_storage`.
Expand Down
21 changes: 14 additions & 7 deletions docs/mkdocs/docs/api/basic_node/contains.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,29 @@
```cpp
template <
typename KeyType, detail::enable_if_t<
detail::is_usable_as_key_type<
typename mapping_type::key_compare, typename mapping_type::key_type, KeyType>::value,
detail::conjunction<
detail::negation<detail::is_basic_node<detail::remove_cvref_t<KeyType>>>,
detail::is_node_compatible_type<basic_node, detail::remove_cvref_t<KeyType>>>::value,
int> = 0>
bool contains(KeyType&& key) const;
bool contains(KeyType&& key) const; // (1) A compatible key object with basic_node type

template <
typename KeyType, detail::enable_if_t<detail::is_basic_node<detail::remove_cvref_t<KeyType>>::value, int> = 0>
bool contains(KeyType&& key) const; // (2) A basic_node object
```
Checks if the YAML node has the given key.
If the node value is not a mapping, this API will throw an [`fkyaml::exception`](../exception/index.md).
If the node value is not a mapping, this API will throw an [`fkyaml::type_error`](../exception/type_error.md).
The `KeyType` can be a compatible type with [`fkyaml::basic_node`](index.md) or a kind of [`fkyaml::basic_node`](index.md) template class.
## **Template Parameters**
***KeyType***
: A type compatible with the key type of mapping node values.
: A type which is compatible with or a kind of [`fkyaml::basic_node`](index.md).
## **Parameters**
***key*** [in]
***`key`*** [in]
: A key to the target value in the YAML mapping node value.
## **Return Value**
Expand All @@ -43,7 +49,7 @@ If the node value is not a mapping, this API will throw an [`fkyaml::exception`]
// check if the node has the following keys.
std::cout << std::boolalpha;
std::cout << n.contains("foo") << std::endl;
std::cout << n.contains("baz") << std::endl;
std::cout << n.contains(fkyaml::node("baz")) << std::endl;
// create a YAML node. (not mapping)
fkyaml::node n2 = "qux";
Expand All @@ -66,3 +72,4 @@ If the node value is not a mapping, this API will throw an [`fkyaml::exception`]

* [basic_node](index.md)
* [mapping_type](mapping_type.md)
* [type_error](../exception/type_error.md)
3 changes: 0 additions & 3 deletions docs/mkdocs/docs/api/basic_node/deserialize.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ static basic_node deserialize(InputType&& input); // (1)

template <typename ItrType>
static basic_node deserialize(ItrType&& begin, ItrType&& end); // (2)

template <typename PtrType, detail::enable_if_t<std::is_pointer<PtrType>::value, int> = 0>
static basic_node deserialize(PtrType&& ptr, std::size_t size); // (3)
```
Deserializes from compatible input sources.
Expand Down
10 changes: 10 additions & 0 deletions docs/mkdocs/docs/api/basic_node/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ This class provides features to handle YAML nodes.
|-----------------------------|---------------------------------------------|
| [operator[]](operator[].md) | accesses an item specified by the key/index |
### Lexicographical Comparison Operators
| Name | Description |
| ---------------------------- | --------------------------------- |
| [operator==](operator_eq.md) | comparison: equal |
| [operator!=](operator_ne.md) | comparison: not equal |
| [operator<](operator_lt.md) | comparison: less than |
| [operator<=](operator_le.md) | comparison: less than or equal |
| [operator>](operator_gt.md) | comparison: greater than |
| [operator>=](operator_ge.md) | comparison: greater than or equal |
### Aliasing Nodes
| Name | Description |
| ------------------------------------- | -------------------------------------------------------- |
Expand Down
Loading

0 comments on commit 097498c

Please sign in to comment.