Skip to content

Commit

Permalink
Do not use placeholders in summaries
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed Feb 7, 2023
1 parent 7ccb21a commit 466baaf
Show file tree
Hide file tree
Showing 34 changed files with 152 additions and 146 deletions.
2 changes: 2 additions & 0 deletions src/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -413,3 +413,5 @@ dotnet_diagnostic.SA1514.severity = warning # Element documentation header
dotnet_diagnostic.SA1623.severity = warning # Property summary documentation must match accessors
dotnet_diagnostic.SA1626.severity = warning # Single-line comments must not use documentation style slashes
dotnet_diagnostic.SA1636.severity = none # Disable file header matching
dotnet_diagnostic.SA1649.severity = warning # File name must match first type name
dotnet_diagnostic.SA1651.severity = warning # Do not use placeholders in summaries
2 changes: 1 addition & 1 deletion src/DotNetStac/Collection/IStacSummaryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public interface IStacSummaryItem : IEnumerable<JToken>
/// Gets the summary item as a JToken
/// </summary>
/// <value>
/// <placeholder>The summary item as a JToken</placeholder>
/// The summary item as a JToken
/// </value>
JToken AsJToken { get; }

Expand Down
2 changes: 1 addition & 1 deletion src/DotNetStac/Collection/StacSummaryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public JToken this[object key]
/// Gets jToken transformer
/// </summary>
/// <value>
/// <placeholder>JToken transformer</placeholder>
/// JToken transformer
/// </value>
public JToken AsJToken => this.summary;

Expand Down
4 changes: 2 additions & 2 deletions src/DotNetStac/Collection/StacSummaryRangeObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public StacSummaryRangeObject(T min, T max) : base(new JObject())
/// </summary>
/// <returns>Minimum of the range</returns>
/// <value>
/// <placeholder>Minimum of the range</placeholder>
/// Minimum of the range
/// </value>
public T Min { get => this.summary["minimum"].Value<T>(); set => this.summary["minimum"] = new JValue(value); }

Expand All @@ -52,7 +52,7 @@ public StacSummaryRangeObject(T min, T max) : base(new JObject())
/// </summary>
/// <returns>Maximum of the range</returns>
/// <value>
/// <placeholder>Maximum of the range</placeholder>
/// Maximum of the range
/// </value>
public T Max { get => this.summary["maximum"].Value<T>(); set => this.summary["maximum"] = new JValue(value); }

Expand Down
6 changes: 3 additions & 3 deletions src/DotNetStac/Collection/StacSummaryValueSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ public void Add(T item)
/// Gets summary Value Set total of items
/// </summary>
/// <value>
/// <placeholder>Summary Value Set total of items</placeholder>
/// Summary Value Set total of items
/// </value>

/// <value>
/// <placeholder>Summary Value Set total of items</placeholder>
/// Summary Value Set total of items
/// </value>
public int Count => this.summary.Count();

/// <summary>
/// Gets get the Summary Value Set as an enumerable
/// </summary>
/// <value>
/// <placeholder>Get the Summary Value Set as an enumerable</placeholder>
/// Get the Summary Value Set as an enumerable
/// </value>
public IEnumerable<T> SummarySet { get => this.summary.ToObject<List<T>>(); }

Expand Down
2 changes: 1 addition & 1 deletion src/DotNetStac/Collection/StacTemporalExtent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public StacTemporalExtent(StacTemporalExtent temporal)
/// Gets or sets potential temporal extents.
/// </summary>
/// <value>
/// <placeholder>Potential temporal extents.</placeholder>
/// Potential temporal extents.
/// </value>
[JsonProperty("interval")]
public DateTime?[][] Interval { get; set; }
Expand Down
18 changes: 11 additions & 7 deletions src/DotNetStac/Common/PropertyObservableCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

namespace Stac.Common
{
#pragma warning disable SA1649 // File name should match first type name

/// <summary>
/// A collection that is observable and that is also stored in a <see cref="IStacPropertiesContainer"/> as a property.
/// </summary>
Expand All @@ -30,27 +32,29 @@ public PropertyObservableCollection(IStacPropertiesContainer propertiesContainer
/// Gets the properties container.
/// </summary>
/// <value>
/// <placeholder>The properties container.</placeholder>
/// The properties container.
/// </value>
public IStacPropertiesContainer PropertiesContainer { get; }

/// <summary>
/// Gets the property key.
/// </summary>
/// <value>
/// <placeholder>The property key.</placeholder>
/// The property key.
/// </value>
public string Key { get; }

private void ObservableCollectionInPropertiesChanged(object sender, NotifyCollectionChangedEventArgs e)
{
this.PropertiesContainer.RemoveProperty(this.Key);
if (this.Count == 0)
{
return;
}

if (this.Count == 0)
{
return;
}

this.PropertiesContainer.SetProperty(this.Key, this.ToList());
}
}

#pragma warning restore SA1649 // File name should match first type name
}
12 changes: 6 additions & 6 deletions src/DotNetStac/Common/Statistics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Statistics(double? minimum, double? maximum, double? mean, double? stdev,
/// Gets or sets mean value
/// </summary>
/// <value>
/// <placeholder>Mean value</placeholder>
/// Mean value
/// </value>
[JsonProperty("mean")]
public double? Mean { get; set; }
Expand All @@ -47,7 +47,7 @@ public Statistics(double? minimum, double? maximum, double? mean, double? stdev,
/// Gets or sets minimum value
/// </summary>
/// <value>
/// <placeholder>Minimum value</placeholder>
/// Minimum value
/// </value>
[JsonProperty("minimum")]
public double? Minimum { get; set; }
Expand All @@ -56,7 +56,7 @@ public Statistics(double? minimum, double? maximum, double? mean, double? stdev,
/// Gets or sets maximum value
/// </summary>
/// <value>
/// <placeholder>Maximum value</placeholder>
/// Maximum value
/// </value>
[JsonProperty("maximum")]
public double? Maximum { get; set; }
Expand All @@ -65,7 +65,7 @@ public Statistics(double? minimum, double? maximum, double? mean, double? stdev,
/// Gets or sets standard Deviation
/// </summary>
/// <value>
/// <placeholder>Standard Deviation</placeholder>
/// Standard Deviation
/// </value>
[JsonProperty("stdev")]
public double? Stdev { get; set; }
Expand All @@ -74,7 +74,7 @@ public Statistics(double? minimum, double? maximum, double? mean, double? stdev,
/// Gets or sets valid percentage
/// </summary>
/// <value>
/// <placeholder>Valid percentage</placeholder>
/// Valid percentage
/// </value>
[JsonProperty("valid_percent")]
public double? ValidPercent { get; set; }
Expand All @@ -83,7 +83,7 @@ public Statistics(double? minimum, double? maximum, double? mean, double? stdev,
/// Gets or sets additional fields
/// </summary>
/// <value>
/// <placeholder>Additional fields</placeholder>
/// Additional fields
/// </value>
[JsonExtensionData]
public IDictionary<string, object> Properties { get => this.properties; set => this.properties = value; }
Expand Down
16 changes: 8 additions & 8 deletions src/DotNetStac/Extensions/Alternate/AlternateAssetObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public AlternateAssetObject(string href, IStacObject parent = null, string title
/// Gets or sets rEQUIRED. URI to the asset object. Relative and absolute URI are both allowed.
/// </summary>
/// <value>
/// <placeholder>REQUIRED. URI to the asset object. Relative and absolute URI are both allowed.</placeholder>
/// REQUIRED. URI to the asset object. Relative and absolute URI are both allowed.
/// </value>
[JsonProperty("href")]
[JsonRequired]
Expand All @@ -52,7 +52,7 @@ public AlternateAssetObject(string href, IStacObject parent = null, string title
/// Gets or sets the displayed title for clients and users.
/// </summary>
/// <value>
/// <placeholder>The displayed title for clients and users.</placeholder>
/// The displayed title for clients and users.
/// </value>
[JsonProperty("title")]
public string Title { get => this.title; set => this.title = value; }
Expand All @@ -61,7 +61,7 @@ public AlternateAssetObject(string href, IStacObject parent = null, string title
/// Gets or sets a description of the Asset providing additional details, such as how it was processed or created. CommonMark 0.29 syntax MAY be used for rich text representation.
/// </summary>
/// <value>
/// <placeholder>A description of the Asset providing additional details, such as how it was processed or created. CommonMark 0.29 syntax MAY be used for rich text representation.</placeholder>
/// A description of the Asset providing additional details, such as how it was processed or created. CommonMark 0.29 syntax MAY be used for rich text representation.
/// </value>
[JsonProperty("description")]
public string Description { get => this.description; set => this.description = value; }
Expand All @@ -70,7 +70,7 @@ public AlternateAssetObject(string href, IStacObject parent = null, string title
/// Gets or sets additional fields
/// </summary>
/// <value>
/// <placeholder>Additional fields</placeholder>
/// Additional fields
/// </value>
[JsonExtensionData]
public IDictionary<string, object> Properties { get => this.properties; set => this.properties = value; }
Expand All @@ -79,11 +79,11 @@ public AlternateAssetObject(string href, IStacObject parent = null, string title
/// Gets parent Stac Object
/// </summary>
/// <value>
/// <placeholder>Parent Stac Object</placeholder>
/// Parent Stac Object
/// </value>

/// <value>
/// <placeholder>Parent Stac Object</placeholder>
/// Parent Stac Object
/// </value>
[JsonIgnore]
public IStacObject StacObjectContainer => this._parent;
Expand All @@ -92,11 +92,11 @@ public AlternateAssetObject(string href, IStacObject parent = null, string title
/// Gets uri
/// </summary>
/// <value>
/// <placeholder>Uri</placeholder>
/// Uri
/// </value>

/// <value>
/// <placeholder>Uri</placeholder>
/// Uri
/// </value>
[JsonIgnore]
public Uri Uri => new Uri(this.href);
Expand Down
4 changes: 2 additions & 2 deletions src/DotNetStac/Extensions/Alternate/AlternateStacExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internal AlternateStacExtension(StacAsset stacAsset) : base(JsonSchemaUrl, stacA
/// Gets or sets a dictionary of alternate location information for an asset.
/// </summary>
/// <value>
/// <placeholder>A dictionary of alternate location information for an asset.</placeholder>
/// A dictionary of alternate location information for an asset.
/// </value>
public IDictionary<string, AlternateAssetObject> AlternateAssets
{
Expand All @@ -52,7 +52,7 @@ public IDictionary<string, AlternateAssetObject> AlternateAssets
/// Gets potential fields and their types
/// </summary>
/// <value>
/// <placeholder>Potential fields and their types</placeholder>
/// Potential fields and their types
/// </value>
public override IDictionary<string, Type> ItemFields => assetFields;

Expand Down
22 changes: 11 additions & 11 deletions src/DotNetStac/Extensions/Datacube/DatacubeDimensionObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class DatacubeDimension : IStacPropertiesContainer
/// Gets or sets type of the dimension.
/// </summary>
/// <value>
/// <placeholder>Type of the dimension.</placeholder>
/// Type of the dimension.
/// </value>
[JsonProperty("type")]
public string Type { get => this.type; set => this.type = value; }
Expand All @@ -34,7 +34,7 @@ public class DatacubeDimension : IStacPropertiesContainer
/// Gets or sets detailed multi-line description to explain the dimension. <seealso href="http://commonmark.org/">CommonMark 0.29</seealso> syntax MAY be used for rich text representation.
/// </summary>
/// <value>
/// <placeholder>Detailed multi-line description to explain the dimension. <seealso href="http://commonmark.org/">CommonMark 0.29</seealso> syntax MAY be used for rich text representation.</placeholder>
/// Detailed multi-line description to explain the dimension. <seealso href="http://commonmark.org/">CommonMark 0.29</seealso> syntax MAY be used for rich text representation.
/// </value>
[JsonProperty("description")]
public string Description { get => this.description; set => this.description = value; }
Expand All @@ -43,7 +43,7 @@ public class DatacubeDimension : IStacPropertiesContainer
/// Gets or sets extent (lower and upper bounds) of the dimension as two-element array. Open intervals with null are not allowed.
/// </summary>
/// <value>
/// <placeholder>Extent (lower and upper bounds) of the dimension as two-element array. Open intervals with null are not allowed.</placeholder>
/// Extent (lower and upper bounds) of the dimension as two-element array. Open intervals with null are not allowed.
/// </value>
[JsonProperty("extent")]
public double[] Extent { get => this.extent; set => this.extent = value; }
Expand All @@ -52,7 +52,7 @@ public class DatacubeDimension : IStacPropertiesContainer
/// Gets or sets optionally, an ordered list of all values.
/// </summary>
/// <value>
/// <placeholder>Optionally, an ordered list of all values.</placeholder>
/// Optionally, an ordered list of all values.
/// </value>
[JsonProperty("values")]
public object Values { get => this.values; set => this.values = value; }
Expand All @@ -61,7 +61,7 @@ public class DatacubeDimension : IStacPropertiesContainer
/// Gets or sets the space between the values. Use null for irregularly spaced steps.
/// </summary>
/// <value>
/// <placeholder>The space between the values. Use null for irregularly spaced steps.</placeholder>
/// The space between the values. Use null for irregularly spaced steps.
/// </value>
[JsonProperty("step")]
public double? Step { get => this.step; set => this.step = value; }
Expand All @@ -70,7 +70,7 @@ public class DatacubeDimension : IStacPropertiesContainer
/// Gets or sets additional fields
/// </summary>
/// <value>
/// <placeholder>Additional fields</placeholder>
/// Additional fields
/// </value>
[JsonExtensionData]
public IDictionary<string, object> Properties { get => this.properties; set => this.properties = value; }
Expand All @@ -94,7 +94,7 @@ public class DatacubeDimensionSpatial : DatacubeDimension
/// Gets or sets axis of the spatial dimension.
/// </summary>
/// <value>
/// <placeholder>Axis of the spatial dimension.</placeholder>
/// Axis of the spatial dimension.
/// </value>
[JsonProperty("axis")]
public DatacubeAxis? Axis { get => this.axis; set => this.axis = value; }
Expand All @@ -103,7 +103,7 @@ public class DatacubeDimensionSpatial : DatacubeDimension
/// Gets or sets the spatial reference system for the data, specified as <seealso href="http://www.epsg-registry.org/">numerical EPSG code</seealso>, <seealso href="http://docs.opengeospatial.org/is/18-010r7/18-010r7.html">WKT2 (ISO 19162) string</seealso> or <seealso href="https://proj.org/specifications/projjson.html">PROJJSON object</seealso>. Defaults to EPSG code 4326.
/// </summary>
/// <value>
/// <placeholder>The spatial reference system for the data, specified as <seealso href="http://www.epsg-registry.org/">numerical EPSG code</seealso>, <seealso href="http://docs.opengeospatial.org/is/18-010r7/18-010r7.html">WKT2 (ISO 19162) string</seealso> or <seealso href="https://proj.org/specifications/projjson.html">PROJJSON object</seealso>. Defaults to EPSG code 4326.</placeholder>
/// The spatial reference system for the data, specified as <seealso href="http://www.epsg-registry.org/">numerical EPSG code</seealso>, <seealso href="http://docs.opengeospatial.org/is/18-010r7/18-010r7.html">WKT2 (ISO 19162) string</seealso> or <seealso href="https://proj.org/specifications/projjson.html">PROJJSON object</seealso>. Defaults to EPSG code 4326.
/// </value>
[JsonProperty("reference_system")]
public object ReferenceSystem { get => this.reference_system; set => this.reference_system = value; }
Expand All @@ -129,7 +129,7 @@ public class DatacubeDimensionSpatialVertical : DatacubeDimensionSpatial
/// Gets or sets the unit of measurement for the data, preferably compliant to <seealso href="https://ncics.org/portfolio/other-resources/udunits2">UDUNITS-2</seealso> units (singular).
/// </summary>
/// <value>
/// <placeholder>The unit of measurement for the data, preferably compliant to <seealso href="https://ncics.org/portfolio/other-resources/udunits2">UDUNITS-2</seealso> units (singular). </placeholder>
/// The unit of measurement for the data, preferably compliant to <seealso href="https://ncics.org/portfolio/other-resources/udunits2">UDUNITS-2</seealso> units (singular).
/// </value>
[JsonProperty("unit")]
public string Unit { get => this.unit; set => this.unit = value; }
Expand Down Expand Up @@ -159,7 +159,7 @@ public class DatacubeDimensionAdditional : DatacubeDimension
/// Gets or sets the unit of measurement for the data, preferably compliant to <seealso href="https://ncics.org/portfolio/other-resources/udunits2">UDUNITS-2</seealso> units (singular).
/// </summary>
/// <value>
/// <placeholder>The unit of measurement for the data, preferably compliant to <seealso href="https://ncics.org/portfolio/other-resources/udunits2">UDUNITS-2</seealso> units (singular). </placeholder>
/// The unit of measurement for the data, preferably compliant to <seealso href="https://ncics.org/portfolio/other-resources/udunits2">UDUNITS-2</seealso> units (singular).
/// </value>
[JsonProperty("unit")]
public string Unit { get => this.unit; set => this.unit = value; }
Expand All @@ -168,7 +168,7 @@ public class DatacubeDimensionAdditional : DatacubeDimension
/// Gets or sets the spatial reference system for the data, specified as <seealso href="http://www.epsg-registry.org/">numerical EPSG code</seealso>, <seealso href="http://docs.opengeospatial.org/is/18-010r7/18-010r7.html">WKT2 (ISO 19162) string</seealso> or <seealso href="https://proj.org/specifications/projjson.html">PROJJSON object</seealso>. Defaults to EPSG code 4326.
/// </summary>
/// <value>
/// <placeholder>The spatial reference system for the data, specified as <seealso href="http://www.epsg-registry.org/">numerical EPSG code</seealso>, <seealso href="http://docs.opengeospatial.org/is/18-010r7/18-010r7.html">WKT2 (ISO 19162) string</seealso> or <seealso href="https://proj.org/specifications/projjson.html">PROJJSON object</seealso>. Defaults to EPSG code 4326.</placeholder>
/// The spatial reference system for the data, specified as <seealso href="http://www.epsg-registry.org/">numerical EPSG code</seealso>, <seealso href="http://docs.opengeospatial.org/is/18-010r7/18-010r7.html">WKT2 (ISO 19162) string</seealso> or <seealso href="https://proj.org/specifications/projjson.html">PROJJSON object</seealso>. Defaults to EPSG code 4326.
/// </value>
[JsonProperty("reference_system")]
public object ReferenceSystem { get => this.reference_system; set => this.reference_system = value; }
Expand Down
Loading

0 comments on commit 466baaf

Please sign in to comment.