Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix str format #27

Merged
merged 13 commits into from
Aug 27, 2021
Merged

Fix str format #27

merged 13 commits into from
Aug 27, 2021

Conversation

saba-ja
Copy link
Contributor

@saba-ja saba-ja commented Aug 17, 2021

Originating Project/Creator F' GDS 2.0
Affected Component format_string
Affected Architectures(s) NA
Related Issue(s) nasa/fprime-tools#19
Has Unit Tests (y/n) No
Builds Without Errors (y/n) Yes
Unit Tests Pass (y/n) No
Documentation Included (y/n) No

Change Description

%% flag does not get converted to % in EVR output
Precision of floating values in Channel telemetry seems to not get formatted.
If a tlm has a complex value (dict or array) its members will not get formatted.

Rationale

Values should be formatted according to the given string format.

Testing/Review Recommendations

Manually tested on F Prime Ref.

Note: This PR should be merged after fprime-tools PR 19 to avoid code break.

Future Work

NA

@github-actions
Copy link

@check-spelling-bot Report

🔴 Please review

Unrecognized words (8)
fmr
fromat
lenght
percision
printf
regexlib
regexp
stdtypes
Available dictionaries could cover words not in the dictionary

cspell:cpp/cpp.txt (104293) covers 130 of them
cspell:filetypes/filetypes.txt (337) covers 43 of them
cspell:html/html.txt (542) covers 39 of them
cspell:css/css.txt (993) covers 38 of them
cspell:python/python.txt (364) covers 30 of them
cspell:django/django.txt (2342) covers 22 of them
cspell:aws/aws.txt (1485) covers 18 of them
cspell:golang/go.txt (7745) covers 17 of them
cspell:fullstack/fullstack.txt (181) covers 14 of them
cspell:npm/npm.txt (671) covers 12 of them
cspell:java/java.txt (33524) covers 10 of them
cspell:lua/lua.txt (391) covers 6 of them
cspell:scala/scala.txt (2752) covers 5 of them
cspell:rust/rust.txt (112) covers 5 of them
cspell:csharp/csharp.txt (123) covers 5 of them
cspell:ruby/ruby.txt (354) covers 3 of them
cspell:php/php.txt (9785) covers 3 of them
cspell:dotnet/dotnet.txt (9824) covers 3 of them
cspell:node/node.txt (9611) covers 2 of them
cspell:bash/bash-words.txt (22) covers 1 of them

Consider adding them using:

      with:
        extra_dictionaries:
          cspell:cpp/cpp.txt
          cspell:filetypes/filetypes.txt
          cspell:html/html.txt
          cspell:css/css.txt
          cspell:python/python.txt
          cspell:django/django.txt
          cspell:aws/aws.txt
          cspell:golang/go.txt
          cspell:fullstack/fullstack.txt
          cspell:npm/npm.txt
          cspell:java/java.txt
          cspell:lua/lua.txt
          cspell:scala/scala.txt
          cspell:rust/rust.txt
          cspell:csharp/csharp.txt
          cspell:ruby/ruby.txt
          cspell:php/php.txt
          cspell:dotnet/dotnet.txt
          cspell:node/node.txt
          cspell:bash/bash-words.txt

To stop checking additional dictionaries, add:

      with:
        check_extra_dictionaries: ''
To accept these unrecognized words as correct, run the following commands

... in a clone of the git@github.com:saba-ja/fprime-gds.git repository
on the fix_str_format branch:

(cd $(git rev-parse --show-toplevel)
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
use File::Basename qw(dirname);
make_path (dirname($new_expect_file));
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"fmr fromat lenght percision printf regexlib regexp stdtypes "');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a)."-".$a cmp lc($b)."-".$b} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;
system("git", "add", $new_expect_file);
'
)

@github-actions
Copy link

@check-spelling-bot Report

🔴 Please review

Unrecognized words (1)
lenght
Available dictionaries could cover words not in the dictionary

cspell:cpp/cpp.txt (104293) covers 128 of them
cspell:filetypes/filetypes.txt (337) covers 43 of them
cspell:html/html.txt (542) covers 39 of them
cspell:css/css.txt (993) covers 38 of them
cspell:python/python.txt (364) covers 30 of them
cspell:django/django.txt (2342) covers 22 of them
cspell:aws/aws.txt (1485) covers 18 of them
cspell:golang/go.txt (7745) covers 16 of them
cspell:fullstack/fullstack.txt (181) covers 14 of them
cspell:npm/npm.txt (671) covers 12 of them
cspell:java/java.txt (33524) covers 9 of them
cspell:lua/lua.txt (391) covers 6 of them
cspell:rust/rust.txt (112) covers 5 of them
cspell:csharp/csharp.txt (123) covers 5 of them
cspell:scala/scala.txt (2752) covers 4 of them
cspell:ruby/ruby.txt (354) covers 3 of them
cspell:php/php.txt (9785) covers 3 of them
cspell:dotnet/dotnet.txt (9824) covers 3 of them
cspell:node/node.txt (9611) covers 2 of them
cspell:bash/bash-words.txt (22) covers 1 of them

Consider adding them using:

      with:
        extra_dictionaries:
          cspell:cpp/cpp.txt
          cspell:filetypes/filetypes.txt
          cspell:html/html.txt
          cspell:css/css.txt
          cspell:python/python.txt
          cspell:django/django.txt
          cspell:aws/aws.txt
          cspell:golang/go.txt
          cspell:fullstack/fullstack.txt
          cspell:npm/npm.txt
          cspell:java/java.txt
          cspell:lua/lua.txt
          cspell:rust/rust.txt
          cspell:csharp/csharp.txt
          cspell:scala/scala.txt
          cspell:ruby/ruby.txt
          cspell:php/php.txt
          cspell:dotnet/dotnet.txt
          cspell:node/node.txt
          cspell:bash/bash-words.txt

To stop checking additional dictionaries, add:

      with:
        check_extra_dictionaries: ''
To accept these unrecognized words as correct, run the following commands

... in a clone of the git@github.com:saba-ja/fprime-gds.git repository
on the fix_str_format branch:

(cd $(git rev-parse --show-toplevel)
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
use File::Basename qw(dirname);
make_path (dirname($new_expect_file));
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"lenght "');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a)."-".$a cmp lc($b)."-".$b} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;
system("git", "add", $new_expect_file);
'
)

@LeStarch LeStarch merged commit 238461b into nasa:devel Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants