Skip to content

Commit

Permalink
Bump to version 0.2.0 (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
awvwgk authored Apr 1, 2023
1 parent c81340e commit 05d3081
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ get_directory_property(is-subproject PARENT_DIRECTORY)
project(
"jonquil"
LANGUAGES "Fortran"
VERSION "0.1.0"
VERSION "0.2.0"
DESCRIPTION "Bringing TOML blooms to JSON land"
)

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,10 @@ program demo
end if
block
use tomlf, only : toml_table, toml_array, add_array, set_value, toml_serializer
use tomlf, only : toml_table, toml_array, add_array, set_value, toml_serialize
type(toml_table), pointer :: table
type(toml_array), pointer :: array
type(toml_serializer) :: ser
! Add an array to the object
call add_array(object, "c", array)
Expand All @@ -169,7 +168,7 @@ program demo
call set_value(table, "sub", "table")
print '(a)', "# representation in TOML land"
call object%accept(ser)
print '(a)', toml_serialize(object)
end block
end program demo
Expand Down
5 changes: 3 additions & 2 deletions fpm.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name = "jonquil"
version = "0.1.0"
version = "0.2.0"
license = "Apache-2.0 OR MIT"
maintainer = ["@awvwgk"]
author = ["Sebastian Ehlert"]
copyright = "2022 Sebastian Ehlert"
homepage = "https://toml-f.readthedocs.io/en/latest/tutorial/json/"
homepage = "https://toml-f.readthedocs.io/en/latest/how-to/jonquil/"
keywords = ["json", "io", "serde"]
description = "Bringing TOML blooms to JSON land"

[dependencies]
toml-f.git = "https://github.com/toml-f/toml-f"
toml-f.tag = "v0.4.0"

[[test]]
name = "jqtest"
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
project(
'jonquil',
'fortran',
version: '0.1.0',
version: '0.2.0',
license: 'Apache-2.0 OR MIT',
meson_version: '>=0.55',
default_options: [
Expand Down
2 changes: 2 additions & 0 deletions src/jonquil.f90
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ module jonquil
& new_object => new_table, add_object => add_table, add_array, add_keyval, sort, len
use tomlf_type, only : cast_to_object => cast_to_table, cast_to_array, cast_to_keyval
use tomlf_version, only : tomlf_version_string, tomlf_version_compact, get_tomlf_version
use jonquil_version, only : jonquil_version_string, jonquil_version_compact, &
& get_jonquil_version
use jonquil_parser, only : json_load, json_loads
use jonquil_ser, only : json_serializer, json_serialize, json_dump, json_dumps, &
& json_ser_config
Expand Down
1 change: 1 addition & 0 deletions src/jonquil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ list(
"${dir}/lexer.f90"
"${dir}/parser.f90"
"${dir}/ser.f90"
"${dir}/version.f90"
)

set(srcs "${srcs}" PARENT_SCOPE)
1 change: 1 addition & 0 deletions src/jonquil/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ srcs += files(
'lexer.f90',
'parser.f90',
'ser.f90',
'version.f90',
)
74 changes: 74 additions & 0 deletions src/jonquil/version.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
! This file is part of jonquil.
! SPDX-Identifier: Apache-2.0 OR MIT
!
! Licensed under either of Apache License, Version 2.0 or MIT license
! at your option; you may not use this file except in compliance with
! the License.
!
! Unless required by applicable law or agreed to in writing, software
! distributed under the License is distributed on an "AS IS" BASIS,
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
! See the License for the specific language governing permissions and
! limitations under the License.

!> Version information on jonquil
module jonquil_version
implicit none
private

public :: get_jonquil_version
public :: jonquil_version_string, jonquil_version_compact


!> String representation of the jonquil version
character(len=*), parameter :: jonquil_version_string = "0.4.0"

!> Major version number of the above jonquil version
integer, parameter :: jonquil_major = 0

!> Minor version number of the above jonquil version
integer, parameter :: jonquil_minor = 4

!> Patch version number of the above jonquil version
integer, parameter :: jonquil_patch = 0

!> Compact numeric representation of the jonquil version
integer, parameter :: jonquil_version_compact = &
& jonquil_major*10000 + jonquil_minor*100 + jonquil_patch


contains


!> Getter function to retrieve jonquil version
subroutine get_jonquil_version(major, minor, patch, string)

!> Major version number of the jonquil version
integer, intent(out), optional :: major

!> Minor version number of the jonquil version
integer, intent(out), optional :: minor

!> Patch version number of the jonquil version
integer, intent(out), optional :: patch

!> String representation of the jonquil version
character(len=:), allocatable, intent(out), optional :: string

if (present(major)) then
major = jonquil_major
end if
if (present(minor)) then
minor = jonquil_minor
end if
if (present(patch)) then
patch = jonquil_patch
end if
if (present(string)) then
string = jonquil_version_string
end if

end subroutine get_jonquil_version


end module jonquil_version

0 comments on commit 05d3081

Please sign in to comment.