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

Normalize files #2334

Merged
merged 8 commits into from
May 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Set text=auto and renormalize files
matrss committed Apr 22, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit d5b1f56194e42e35cd72169feee7584ec55abae9
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
562 changes: 281 additions & 281 deletions docs/make.bat

Large diffs are not rendered by default.

230 changes: 115 additions & 115 deletions mslib/mswms/xml_templates/get_capabilities130.pt
Original file line number Diff line number Diff line change
@@ -1,115 +1,115 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<WMS_Capabilities version="1.3.0" updateSequence="0"
xmlns="http://www.opengis.net/wms"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wms
http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd">
<Service>
<Name>${ service_name }</Name>
<Title>${ service_title }</Title>
<Abstract>${ service_abstract }</Abstract>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="${ server_url }"/>
<ContactInformation>
<ContactPersonPrimary>
<ContactPerson>${ service_contact_person }</ContactPerson>
<ContactOrganization>${ service_contact_organisation }</ContactOrganization>
</ContactPersonPrimary>
<ContactPosition>${ service_contact_position }</ContactPosition>
<ContactAddress>
<AddressType>${ service_address_type }</AddressType>
<Address>${ service_address }</Address>
<City>${ service_city }</City>
<StateOrProvince>${ service_state_or_province }</StateOrProvince>
<PostCode>${ service_post_code }</PostCode>
<Country>${ service_country }</Country>
</ContactAddress>
<ContactElectronicMailAddress>${ service_email }</ContactElectronicMailAddress>
</ContactInformation>
<Fees>${ service_fees }</Fees>
<AccessConstraints>${ service_access_constraints }</AccessConstraints>
</Service>
<Capability>
<Request>
<GetCapabilities>
<Format>text/xml</Format>
<DCPType>
<HTTP>
<Get>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="${ server_url }?"/>
</Get>
</HTTP>
</DCPType>
</GetCapabilities>
<GetMap>
<Format>image/png</Format>
<DCPType>
<HTTP>
<Get>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="${ server_url }?"/>
</Get>
</HTTP>
</DCPType>
</GetMap>
</Request>
<Exception>
<Format>XML</Format>
</Exception>
<Layer>
<Title>Mission Support WMS Server</Title>
<Abstract>Mission Support WMS Server</Abstract>
<Layer tal:repeat="(dataset, layer) hsec_layers" tal:attributes="queryable '0' if layer.queryable else None">
<Name>${ "%s.%s" % (dataset, layer.name) }</Name>
<Title tal:condition="layer.title">${ layer.title.strip() }</Title>
<Abstract tal:condition="layer.abstract">${ layer.abstract.strip() }</Abstract>
<CRS tal:repeat="crs layer.supported_crs()">${ crs }</CRS>
<EX_GeographicBoundingBox>
<westBoundLongitude>-180</westBoundLongitude>
<eastBoundLongitude>180</eastBoundLongitude>
<southBoundLatitude>-90</southBoundLatitude>
<northBoundLatitude>90</northBoundLatitude>
</EX_GeographicBoundingBox>
<Dimension tal:condition="layer.uses_validtime_dimension()" name="TIME" units="ISO8601">${ (",").join([dt.strftime("%Y-%m-%dT%H:%M:%SZ") for dt in layer.get_all_valid_times()]) }</Dimension>
<Dimension tal:condition="layer.uses_inittime_dimension()" name="INIT_TIME" units="ISO8601">${ (",").join([dt.strftime("%Y-%m-%dT%H:%M:%SZ") for dt in layer.get_init_times()]) }</Dimension>
<Dimension tal:condition="layer.uses_elevation_dimension()" name="ELEVATION" units="${layer.get_elevation_units()}">${ ",".join(layer.get_elevations()) }</Dimension>
<Style tal:condition="type(layer.styles) is list" tal:repeat="(style_name, style_title) layer.styles">
<Name>${ style_name }</Name>
<Title>${ style_title }</Title>
</Style>
</Layer>
<Layer tal:repeat="(dataset, layer) vsec_layers" tal:attributes="queryable '1' if layer.queryable else None">
<Name>${ "%s.%s" % (dataset, layer.name) }</Name>
<Title tal:condition="layer.title">${ layer.title.strip() }</Title>
<Abstract tal:condition="layer.abstract">${ layer.abstract.strip() }</Abstract>
<CRS tal:repeat="crs layer.supported_crs()">${ crs }</CRS>
<EX_GeographicBoundingBox>
<westBoundLongitude>-180</westBoundLongitude>
<eastBoundLongitude>180</eastBoundLongitude>
<southBoundLatitude>-90</southBoundLatitude>
<northBoundLatitude>90</northBoundLatitude>
</EX_GeographicBoundingBox>
<Dimension tal:condition="layer.uses_validtime_dimension()" name="TIME" units="ISO8601">${ (",").join([dt.strftime("%Y-%m-%dT%H:%M:%SZ") for dt in layer.get_all_valid_times()]) }</Dimension>
<Dimension tal:condition="layer.uses_inittime_dimension()" name="INIT_TIME" units="ISO8601">${ (",").join([dt.strftime("%Y-%m-%dT%H:%M:%SZ") for dt in layer.get_init_times()]) }</Dimension>
<Style tal:condition="type(layer.styles) is list" tal:repeat="(style_name, style_title) layer.styles">
<Name>${ style_name }</Name>
<Title>${ style_title }</Title>
</Style>
</Layer>
<Layer tal:repeat="(dataset, layer) lsec_layers" tal:attributes="queryable '0' if layer.queryable else None">
<Name>${ "%s.%s" % (dataset, layer.name) }</Name>
<Title tal:condition="layer.title">${ layer.title.strip() }</Title>
<Abstract tal:condition="layer.abstract">${ layer.abstract.strip() }</Abstract>
<CRS tal:repeat="crs layer.supported_crs()">${ crs }</CRS>
<EX_GeographicBoundingBox>
<westBoundLongitude>-180</westBoundLongitude>
<eastBoundLongitude>180</eastBoundLongitude>
<southBoundLatitude>-90</southBoundLatitude>
<northBoundLatitude>90</northBoundLatitude>
</EX_GeographicBoundingBox>
<Dimension tal:condition="layer.uses_validtime_dimension()" name="TIME" units="ISO8601">${ (",").join([dt.strftime("%Y-%m-%dT%H:%M:%SZ") for dt in layer.get_all_valid_times()]) }</Dimension>
<Dimension tal:condition="layer.uses_inittime_dimension()" name="INIT_TIME" units="ISO8601">${ (",").join([dt.strftime("%Y-%m-%dT%H:%M:%SZ") for dt in layer.get_init_times()]) }</Dimension>
</Layer>
</Layer>
</Capability>
</WMS_Capabilities>

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<WMS_Capabilities version="1.3.0" updateSequence="0"
xmlns="http://www.opengis.net/wms"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wms
http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd">
<Service>
<Name>${ service_name }</Name>
<Title>${ service_title }</Title>
<Abstract>${ service_abstract }</Abstract>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="${ server_url }"/>
<ContactInformation>
<ContactPersonPrimary>
<ContactPerson>${ service_contact_person }</ContactPerson>
<ContactOrganization>${ service_contact_organisation }</ContactOrganization>
</ContactPersonPrimary>
<ContactPosition>${ service_contact_position }</ContactPosition>
<ContactAddress>
<AddressType>${ service_address_type }</AddressType>
<Address>${ service_address }</Address>
<City>${ service_city }</City>
<StateOrProvince>${ service_state_or_province }</StateOrProvince>
<PostCode>${ service_post_code }</PostCode>
<Country>${ service_country }</Country>
</ContactAddress>
<ContactElectronicMailAddress>${ service_email }</ContactElectronicMailAddress>
</ContactInformation>
<Fees>${ service_fees }</Fees>
<AccessConstraints>${ service_access_constraints }</AccessConstraints>
</Service>
<Capability>
<Request>
<GetCapabilities>
<Format>text/xml</Format>
<DCPType>
<HTTP>
<Get>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="${ server_url }?"/>
</Get>
</HTTP>
</DCPType>
</GetCapabilities>
<GetMap>
<Format>image/png</Format>
<DCPType>
<HTTP>
<Get>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="${ server_url }?"/>
</Get>
</HTTP>
</DCPType>
</GetMap>
</Request>
<Exception>
<Format>XML</Format>
</Exception>
<Layer>
<Title>Mission Support WMS Server</Title>
<Abstract>Mission Support WMS Server</Abstract>
<Layer tal:repeat="(dataset, layer) hsec_layers" tal:attributes="queryable '0' if layer.queryable else None">
<Name>${ "%s.%s" % (dataset, layer.name) }</Name>
<Title tal:condition="layer.title">${ layer.title.strip() }</Title>
<Abstract tal:condition="layer.abstract">${ layer.abstract.strip() }</Abstract>
<CRS tal:repeat="crs layer.supported_crs()">${ crs }</CRS>
<EX_GeographicBoundingBox>
<westBoundLongitude>-180</westBoundLongitude>
<eastBoundLongitude>180</eastBoundLongitude>
<southBoundLatitude>-90</southBoundLatitude>
<northBoundLatitude>90</northBoundLatitude>
</EX_GeographicBoundingBox>
<Dimension tal:condition="layer.uses_validtime_dimension()" name="TIME" units="ISO8601">${ (",").join([dt.strftime("%Y-%m-%dT%H:%M:%SZ") for dt in layer.get_all_valid_times()]) }</Dimension>
<Dimension tal:condition="layer.uses_inittime_dimension()" name="INIT_TIME" units="ISO8601">${ (",").join([dt.strftime("%Y-%m-%dT%H:%M:%SZ") for dt in layer.get_init_times()]) }</Dimension>
<Dimension tal:condition="layer.uses_elevation_dimension()" name="ELEVATION" units="${layer.get_elevation_units()}">${ ",".join(layer.get_elevations()) }</Dimension>
<Style tal:condition="type(layer.styles) is list" tal:repeat="(style_name, style_title) layer.styles">
<Name>${ style_name }</Name>
<Title>${ style_title }</Title>
</Style>
</Layer>
<Layer tal:repeat="(dataset, layer) vsec_layers" tal:attributes="queryable '1' if layer.queryable else None">
<Name>${ "%s.%s" % (dataset, layer.name) }</Name>
<Title tal:condition="layer.title">${ layer.title.strip() }</Title>
<Abstract tal:condition="layer.abstract">${ layer.abstract.strip() }</Abstract>
<CRS tal:repeat="crs layer.supported_crs()">${ crs }</CRS>
<EX_GeographicBoundingBox>
<westBoundLongitude>-180</westBoundLongitude>
<eastBoundLongitude>180</eastBoundLongitude>
<southBoundLatitude>-90</southBoundLatitude>
<northBoundLatitude>90</northBoundLatitude>
</EX_GeographicBoundingBox>
<Dimension tal:condition="layer.uses_validtime_dimension()" name="TIME" units="ISO8601">${ (",").join([dt.strftime("%Y-%m-%dT%H:%M:%SZ") for dt in layer.get_all_valid_times()]) }</Dimension>
<Dimension tal:condition="layer.uses_inittime_dimension()" name="INIT_TIME" units="ISO8601">${ (",").join([dt.strftime("%Y-%m-%dT%H:%M:%SZ") for dt in layer.get_init_times()]) }</Dimension>
<Style tal:condition="type(layer.styles) is list" tal:repeat="(style_name, style_title) layer.styles">
<Name>${ style_name }</Name>
<Title>${ style_title }</Title>
</Style>
</Layer>
<Layer tal:repeat="(dataset, layer) lsec_layers" tal:attributes="queryable '0' if layer.queryable else None">
<Name>${ "%s.%s" % (dataset, layer.name) }</Name>
<Title tal:condition="layer.title">${ layer.title.strip() }</Title>
<Abstract tal:condition="layer.abstract">${ layer.abstract.strip() }</Abstract>
<CRS tal:repeat="crs layer.supported_crs()">${ crs }</CRS>
<EX_GeographicBoundingBox>
<westBoundLongitude>-180</westBoundLongitude>
<eastBoundLongitude>180</eastBoundLongitude>
<southBoundLatitude>-90</southBoundLatitude>
<northBoundLatitude>90</northBoundLatitude>
</EX_GeographicBoundingBox>
<Dimension tal:condition="layer.uses_validtime_dimension()" name="TIME" units="ISO8601">${ (",").join([dt.strftime("%Y-%m-%dT%H:%M:%SZ") for dt in layer.get_all_valid_times()]) }</Dimension>
<Dimension tal:condition="layer.uses_inittime_dimension()" name="INIT_TIME" units="ISO8601">${ (",").join([dt.strftime("%Y-%m-%dT%H:%M:%SZ") for dt in layer.get_init_times()]) }</Dimension>
</Layer>
</Layer>
</Capability>
</WMS_Capabilities>

14 changes: 7 additions & 7 deletions mslib/mswms/xml_templates/service_exception130.pt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ServiceExceptionReport version="1.3.0"
xmlns="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
<ServiceException code='${code}' > ${ text } </ServiceException>
</ServiceExceptionReport>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ServiceExceptionReport version="1.3.0"
xmlns="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
<ServiceException code='${code}' > ${ text } </ServiceException>
</ServiceExceptionReport>
74 changes: 37 additions & 37 deletions tests/_test_utils/test_version.py
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
# -*- coding: utf-8 -*-
"""
mslib._tests.test_version
~~~~~~~~~~~~~~~~~~
This module provides a test for the version string
This file is part of MSS.
:copyright: Copyright 2023 rootxrishabh
:copyright: Copyright 2023-2024 by the MSS team, see AUTHORS.
:license: APACHE-2.0, see LICENSE for details.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import pytest
import packaging

from mslib import __version__


def test_version_string():
try:
packaging.version.Version(__version__)
except packaging.version.InvalidVersion:
pytest.fail("Version parsing fails")
# -*- coding: utf-8 -*-
"""
mslib._tests.test_version
~~~~~~~~~~~~~~~~~~
This module provides a test for the version string
This file is part of MSS.
:copyright: Copyright 2023 rootxrishabh
:copyright: Copyright 2023-2024 by the MSS team, see AUTHORS.
:license: APACHE-2.0, see LICENSE for details.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import pytest
import packaging

from mslib import __version__


def test_version_string():
try:
packaging.version.Version(__version__)
except packaging.version.InvalidVersion:
pytest.fail("Version parsing fails")
58 changes: 29 additions & 29 deletions tutorials/textfiles/tutorial_waypoints.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
This is the waypoints tutorial,i.e., whenever we are going to plan a flight track, we have to place the waypoints in some places and, form a flight path.
Now, we will learn the basic technacalities of the waypoint.
Here is the MSS(mission support system) Software and it will be maximised automatically in few seconds.
This is the TOP VIEW window, the red dot that is being shown here is the cursor.
The origin is set at Nagpur, New Delhi being the first way point.
Clicking ADD WAY POINT BUTTON, we can add new way points.The WAY POINTS 2,3,4 and 5 are added at required locations.
We are moving the WAY POINT NO.5 by clicking the MOVE WAY POINT button. We can see that blue dot is demonstrating the double click.
Now, we are going to delete a WAY POINT, it is asking for the confirmation to delete it or not.
For placing the WAY POINTS and other operations, we have options to select Europe, Germany, and so on. Selecting GLOBAL displays the world map.
For a customised map, we can click on zoom button, and drag the cursor over map, clicking left. We can also pan the map.
Clicking Left and Right arrow buttons changes the map region to previous and next respectively.
Clicking Home button on the top left shows the global view of the map.
Finally we can save the map by clicking SAVE button. This saves the image in .png format.
This is the waypoints tutorial,i.e., whenever we are going to plan a flight track, we have to place the waypoints in some places and, form a flight path.

Now, we will learn the basic technacalities of the waypoint.

Here is the MSS(mission support system) Software and it will be maximised automatically in few seconds.


This is the TOP VIEW window, the red dot that is being shown here is the cursor.


The origin is set at Nagpur, New Delhi being the first way point.


Clicking ADD WAY POINT BUTTON, we can add new way points.The WAY POINTS 2,3,4 and 5 are added at required locations.



We are moving the WAY POINT NO.5 by clicking the MOVE WAY POINT button. We can see that blue dot is demonstrating the double click.
Now, we are going to delete a WAY POINT, it is asking for the confirmation to delete it or not.

For placing the WAY POINTS and other operations, we have options to select Europe, Germany, and so on. Selecting GLOBAL displays the world map.

For a customised map, we can click on zoom button, and drag the cursor over map, clicking left. We can also pan the map.

Clicking Left and Right arrow buttons changes the map region to previous and next respectively.

Clicking Home button on the top left shows the global view of the map.

Finally we can save the map by clicking SAVE button. This saves the image in .png format.