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

抽象型FacilityAttributeの定義 #137

Merged
merged 13 commits into from
Jan 5, 2024

Conversation

xinmiaooo
Copy link
Member

relate #117
uro:PortAttribute以外を実装

TODO:テスト

@xinmiaooo xinmiaooo added the CityGML Models PLATEAU CityGML models label Dec 28, 2023
@xinmiaooo xinmiaooo requested a review from a team December 28, 2023 02:39
@xinmiaooo xinmiaooo self-assigned this Dec 28, 2023
@xinmiaooo xinmiaooo marked this pull request as draft December 28, 2023 02:43
Copy link

codecov bot commented Dec 28, 2023

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Files Patch % Lines
nusamai-plateau/src/models/iur/uro/facility.rs 0.00% 18 Missing ⚠️
Additional details and impacted files
Components Coverage Δ
GUI ∅ <ø> (∅)
Backend 56.02% <ø> (ø)
Libraries 85.67% <0.00%> (-0.34%) ⬇️

📢 Thoughts on this report? Let us know!

@xinmiaooo xinmiaooo marked this pull request as ready for review December 28, 2023 02:50
Comment on lines 365 to 366
#[citygml_data(name = "uro:FishingPortFacilityAttribute")]//スキーマに存在しない
pub struct FishingPortFacilityAttribute {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

//スキーマに存在しない

スキーマを見た感じだと、uro:FishingPortCapacityuro:FishingPortFacility という名前が正しいようですね。

Screenshot 2023-12-28 at 16 37 44

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uro:FishingPortCapacity と uro:FishingPortFacilityは下にあるので、この二つを削除しときますね。

@@ -1,65 +1,1454 @@
use nusamai_citygml::citygml_property;
use nusamai_citygml::{citygml_property,citygml_data,CityGMLElement,Code,Measure,Date};
Copy link
Member

@ciscorn ciscorn Dec 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits: ここってエディターで自動整形されないですかね... 🤔

VS Code
https://tech.uzabase.com/entry/2022/12/28/094600

JetBrains
https://zenn.dev/hkusu/articles/ce6d289fa6588e#clippy-%E3%81%AE%E9%81%A9%E7%94%A8

Comment on lines 157 to 162
#[citygml(path = b"uro:portFacilityDetailsType")]
pub port_facility_details_type: Code,//スキーマに存在しない

#[citygml(path = b"uro:portName")]
pub port_name: String,

Copy link
Member

@ciscorn ciscorn Dec 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

内部の処理の都合上、[1..1] のものも Option<T> になっているのがよいです!

いずれ「required」であることを表現できるようにしたいです。

pub is_designated: Option<bool>,

#[citygml(path = b"uro:degradationLevel")]
pub degradation_level: Option<u64>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xs:integer 型は、負数の可能性もあるので i64 がよいです。おそらく facility.rs に登場するものはすべて i64 ではないかと。

@ciscorn ciscorn requested a review from a team December 28, 2023 10:24
ciscorn

This comment was marked as resolved.

@xinmiaooo xinmiaooo requested a review from ciscorn January 4, 2024 02:56
@ciscorn
Copy link
Member

ciscorn commented Jan 4, 2024

色々と改善を施したものを参考にして頂くために、いったん #139 #140 をマージして頂くとよいかなと思います。

Comment on lines 136 to 137
#[citygml(path = b"uro:lefEndDistance")]
pub lef_end_distance: Option<Measure>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memo: スキーマを信じるしかないですが、スキーマにこういうタイポありますよね。。。

Comment on lines 14 to 15
#[citygml(path = b"uro:FishingPortFacility")]
FishingPortFacilityAttribute(FishingPortFacility),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こちらが要らなくなってそうです!

Comment on lines 5 to 6
#[citygml(path = b"uro:RiverFacilityIdAttribute")]
RiverFacilityIdAttribute(RiverFacilityIdAttribute),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こちら FacilityIdAttribute の下位型なのでここには登場しないハズと思います。

@ciscorn ciscorn self-requested a review January 5, 2024 07:49
Copy link
Member

@ciscorn ciscorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最新の plateau_schema.junk.gen_attrs_rust を使ってコードを生成して、一部を修正いたしました!

こちら Approve してマージさせて頂きます。ありがとうございました。

@ciscorn ciscorn merged commit c76fb2a into main Jan 5, 2024
3 of 4 checks passed
@ciscorn ciscorn deleted the plateau-model-uro-FacilityIdAttribute branch January 5, 2024 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CityGML Models PLATEAU CityGML models
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants