From 3e29df54a3d3577a62b78e05bdb661c7ba0043b9 Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Thu, 16 Feb 2023 16:37:28 +0900 Subject: [PATCH 1/3] del authorization --- .gitignore | 2 -- .../src/src_user/Test/authorization.json.temp | 7 ------- .../src/src_user/Test/utils/wings_utils.py | 14 +------------- Examples/2nd_obc_user/sync_with_minimum_user.bat | 1 - Examples/minimum_user/src/src_user/Test/README.md | 11 ----------- .../src/src_user/Test/authorization.json.temp | 7 ------- .../src/src_user/Test/utils/wings_utils.py | 14 +------------- 7 files changed, 2 insertions(+), 54 deletions(-) delete mode 100644 Examples/2nd_obc_user/src/src_user/Test/authorization.json.temp delete mode 100644 Examples/minimum_user/src/src_user/Test/authorization.json.temp diff --git a/.gitignore b/.gitignore index 0e0a2eca3..961b60df6 100644 --- a/.gitignore +++ b/.gitignore @@ -60,8 +60,6 @@ dkms.conf # for c2a user sample Examples/minimum_user/src/src_core Examples/minimum_user/build -Examples/minimum_user/src/src_user/Test/authorization.json Examples/2nd_obc_user/src/src_core Examples/2nd_obc_user/build -Examples/2nd_obc_user/src/src_user/Test/authorization.json *.pyc diff --git a/Examples/2nd_obc_user/src/src_user/Test/authorization.json.temp b/Examples/2nd_obc_user/src/src_user/Test/authorization.json.temp deleted file mode 100644 index d9dd01841..000000000 --- a/Examples/2nd_obc_user/src/src_user/Test/authorization.json.temp +++ /dev/null @@ -1,7 +0,0 @@ -{ - "client_id": "hoge_id", - "client_secret": "hoge_secret", - "grant_type": "hoge", - "username": "hoge@fuga", - "password": "piyopiyo" -} diff --git a/Examples/2nd_obc_user/src/src_user/Test/utils/wings_utils.py b/Examples/2nd_obc_user/src/src_user/Test/utils/wings_utils.py index 82f4338e8..e672092b4 100644 --- a/Examples/2nd_obc_user/src/src_user/Test/utils/wings_utils.py +++ b/Examples/2nd_obc_user/src/src_user/Test/utils/wings_utils.py @@ -6,16 +6,4 @@ def get_wings_operation(): - authorization = dict( - client_id=os.environ.get("WINGS_CLIENT_ID"), - client_secret=os.environ.get("WINGS_CLIENT_SECRET"), - grant_type=os.environ.get("WINGS_GRANT_TYPE"), - username=os.environ.get("WINGS_USERNAME"), - password=os.environ.get("WINGS_PASSWORD"), - ) - - # 環境変数があればそちらを優先 - if None in authorization.values(): - with open(os.path.dirname(__file__) + "/../authorization.json") as f: - authorization = json.load(f) - return wings.Operation(authentication_info=authorization) + return wings.Operation() diff --git a/Examples/2nd_obc_user/sync_with_minimum_user.bat b/Examples/2nd_obc_user/sync_with_minimum_user.bat index ca98b0ed0..5d125aa8a 100644 --- a/Examples/2nd_obc_user/sync_with_minimum_user.bat +++ b/Examples/2nd_obc_user/sync_with_minimum_user.bat @@ -29,7 +29,6 @@ call :sync_file ".\src\src_user\TlmCmd\common_tlm_cmd_packet.c" "..\minimum_user call :sync_file ".\src\src_user\TlmCmd\common_tlm_packet.c" "..\minimum_user\src\src_user\TlmCmd\common_tlm_packet.c" call :sync_file ".\src\src_user\Test\utils\wings_utils.py" "..\minimum_user\src\src_user\Test\utils\wings_utils.py" -call :sync_file ".\src\src_user\Test\authorization.json.temp" "..\minimum_user\src\src_user\Test\authorization.json.temp" call :sync_file ".\src\src_user\Test\pytest.ini" "..\minimum_user\src\src_user\Test\pytest.ini" diff --git a/Examples/minimum_user/src/src_user/Test/README.md b/Examples/minimum_user/src/src_user/Test/README.md index 837bbf540..6e1ace325 100644 --- a/Examples/minimum_user/src/src_user/Test/README.md +++ b/Examples/minimum_user/src/src_user/Test/README.md @@ -48,14 +48,3 @@ or cd ./test/src_user/Applications/UserDefined/ pytest -m real -v test_tlm_mem_dump.py ``` - -## 認証情報について -wings と通信するにあたりに対して認証情報を渡す必要がある. `authorization.json.temp` と同じ key を持つ正しい `authorization.json` を誰かからもらうか,又はそれぞれの key に対応する環境変数を埋めること. 対応を下表に示す. - -| `authorization.json` の key | 環境変数 | -| :-------------------------- | :------------------ | -| client_id | WINGS_CLIENT_ID | -| client_secret | WINGS_CLIENT_SECRET | -| grant_type | WINGS_GRANT_TYPE | -| username | WINGS_USERNAME | -| password | WINGS_PASSWORD | diff --git a/Examples/minimum_user/src/src_user/Test/authorization.json.temp b/Examples/minimum_user/src/src_user/Test/authorization.json.temp deleted file mode 100644 index d9dd01841..000000000 --- a/Examples/minimum_user/src/src_user/Test/authorization.json.temp +++ /dev/null @@ -1,7 +0,0 @@ -{ - "client_id": "hoge_id", - "client_secret": "hoge_secret", - "grant_type": "hoge", - "username": "hoge@fuga", - "password": "piyopiyo" -} diff --git a/Examples/minimum_user/src/src_user/Test/utils/wings_utils.py b/Examples/minimum_user/src/src_user/Test/utils/wings_utils.py index 82f4338e8..e672092b4 100644 --- a/Examples/minimum_user/src/src_user/Test/utils/wings_utils.py +++ b/Examples/minimum_user/src/src_user/Test/utils/wings_utils.py @@ -6,16 +6,4 @@ def get_wings_operation(): - authorization = dict( - client_id=os.environ.get("WINGS_CLIENT_ID"), - client_secret=os.environ.get("WINGS_CLIENT_SECRET"), - grant_type=os.environ.get("WINGS_GRANT_TYPE"), - username=os.environ.get("WINGS_USERNAME"), - password=os.environ.get("WINGS_PASSWORD"), - ) - - # 環境変数があればそちらを優先 - if None in authorization.values(): - with open(os.path.dirname(__file__) + "/../authorization.json") as f: - authorization = json.load(f) - return wings.Operation(authentication_info=authorization) + return wings.Operation() From c440952f696787ff10d86030f18915a9552b880a Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Fri, 17 Feb 2023 01:50:22 +0900 Subject: [PATCH 2/3] lint --- Examples/2nd_obc_user/src/src_user/Test/utils/wings_utils.py | 2 -- Examples/minimum_user/src/src_user/Test/utils/wings_utils.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/Examples/2nd_obc_user/src/src_user/Test/utils/wings_utils.py b/Examples/2nd_obc_user/src/src_user/Test/utils/wings_utils.py index e672092b4..14ecfeab7 100644 --- a/Examples/2nd_obc_user/src/src_user/Test/utils/wings_utils.py +++ b/Examples/2nd_obc_user/src/src_user/Test/utils/wings_utils.py @@ -1,7 +1,5 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -import json -import os import isslwings as wings diff --git a/Examples/minimum_user/src/src_user/Test/utils/wings_utils.py b/Examples/minimum_user/src/src_user/Test/utils/wings_utils.py index e672092b4..14ecfeab7 100644 --- a/Examples/minimum_user/src/src_user/Test/utils/wings_utils.py +++ b/Examples/minimum_user/src/src_user/Test/utils/wings_utils.py @@ -1,7 +1,5 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -import json -import os import isslwings as wings From a1e03419fa01b75adca75f4fd14e8a57daaa7ae3 Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Sat, 18 Feb 2023 09:31:18 +0900 Subject: [PATCH 3/3] update version --- c2a_core_main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c2a_core_main.h b/c2a_core_main.h index e06dfcf76..a86faf1e8 100644 --- a/c2a_core_main.h +++ b/c2a_core_main.h @@ -10,6 +10,6 @@ void C2A_core_main(void); #define C2A_CORE_VER_MAJOR (3) #define C2A_CORE_VER_MINOR (8) #define C2A_CORE_VER_PATCH (0) -#define C2A_CORE_VER_PRE ("beta.3") +#define C2A_CORE_VER_PRE ("beta.4") #endif