From 22ad6eb82eace97015dd57c9376c358484b7814a Mon Sep 17 00:00:00 2001 From: Alexandre Catarino Date: Fri, 28 Jun 2024 18:08:32 +0100 Subject: [PATCH 1/2] Adds `source_at` to Data Class --- RegalyticsRegulatoryArticle.cs | 6 +++++- tests/RegalyticsRegulatoryArticleTests.cs | 10 +++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/RegalyticsRegulatoryArticle.cs b/RegalyticsRegulatoryArticle.cs index 67c59a1..b61972f 100644 --- a/RegalyticsRegulatoryArticle.cs +++ b/RegalyticsRegulatoryArticle.cs @@ -78,6 +78,9 @@ public class RegalyticsRegulatoryArticle : BaseData [JsonProperty(PropertyName = "rule_effective_date")] public DateTime? RuleEffectiveDate { get; set; } + [JsonProperty(PropertyName = "sourced_at")] + public DateTime SourcedAt { get; set; } + [JsonProperty(PropertyName = "latest_update")] public DateTime LatestUpdate { get; set; } @@ -158,7 +161,8 @@ public override BaseData Clone() Agencies = Agencies, Sector = Sector, AnnouncementUrl = AnnouncementUrl, - CreatedAt = CreatedAt + CreatedAt = CreatedAt, + SourcedAt = SourcedAt }; } diff --git a/tests/RegalyticsRegulatoryArticleTests.cs b/tests/RegalyticsRegulatoryArticleTests.cs index 47b3467..ccaa4e1 100644 --- a/tests/RegalyticsRegulatoryArticleTests.cs +++ b/tests/RegalyticsRegulatoryArticleTests.cs @@ -65,6 +65,7 @@ public void BackwardCompatibilityToV2() var config = new SubscriptionDataConfig(instance.GetType(), Symbol.None, Resolution.Daily, TimeZones.Utc, TimeZones.Utc, false, false, false); var data = instance.Reader(config, line, new DateTime(2024, 2, 12), false) as RegalyticsRegulatoryArticle; Assert.AreEqual("2051381", data.Id); + Assert.AreEqual(DateTime.MinValue, data.SourcedAt); } private void AssertAreEqual(object expected, object result, bool filterByCustomAttributes = false) @@ -111,7 +112,8 @@ private BaseData CreateNewInstance() Agencies = new List{"string"}, Sector = new List> { new Dictionary { { "key", "value" } } }, AnnouncementUrl = "string", - CreatedAt = DateTime.MinValue + CreatedAt = DateTime.MinValue, + SourcedAt = DateTime.MinValue, }; } @@ -145,7 +147,8 @@ private BaseData CreateNewCollectionInstance() Agencies = new List{"string"}, Sector = new List> { new Dictionary { { "key", "value" } } }, AnnouncementUrl = "string", - CreatedAt = DateTime.MinValue + CreatedAt = DateTime.MinValue, + SourcedAt = DateTime.MinValue }, new RegalyticsRegulatoryArticle { @@ -173,7 +176,8 @@ private BaseData CreateNewCollectionInstance() Agencies = new List{"string"}, Sector = new List> { new Dictionary { { "key", "value" } } }, AnnouncementUrl = "string", - CreatedAt = DateTime.MinValue + CreatedAt = DateTime.MinValue, + SourcedAt = DateTime.MinValue } }; } From 1af3e63a97e063a4a0337564e21869f9cda7d4fd Mon Sep 17 00:00:00 2001 From: Alexandre Catarino Date: Mon, 1 Jul 2024 16:32:39 +0100 Subject: [PATCH 2/2] Fixes GitHub Action to Free More Space --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1bff3f..580f783 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v2 - name: Free space - run: df -h && rm -rf /opt/hostedtoolcache* && df -h + run: df -h && sudo rm -rf /usr/local/lib/android && sudo rm -rf /opt/ghc && rm -rf /opt/hostedtoolcache* && df -h - name: Pull Foundation Image uses: addnab/docker-run-action@v3