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

Unit Test Engineering of the sarracenia/config.py module. #1058

Merged
merged 13 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
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
19 changes: 10 additions & 9 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
metpx-sr3 (3.00.53rc2) unstable; urgency=medium
metpx-sr3 (3.00.54) UNRELEASED; urgency=medium

* fixed #927 sanity not restarting crashed polls.
* bug fixes and unit tests for AM

-- SSC-5CD2310S60 <[email protected]> Fri, 17 May 2024 12:29:22 -0400

metpx-sr3 (3.00.53) unstable; urgency=medium

* NEW! merge PR #1019 Azure Transfer protocol driver (experimental)
* NEW! merge PR #1030 WMO-00 Accumulated file support (experimental.)
Expand All @@ -17,11 +24,6 @@ metpx-sr3 (3.00.53rc2) unstable; urgency=medium
* fix #1020 Added sourceFromMessage option for v2 compatibility.
* fix #1012 *persist* is now a configurable option (was always on.)
* fix #947 sr3 status should ignore files if not .inc or .conf

-- peter <[email protected]> Wed, 17 Apr 2024 14:31:12 -0400

metpx-sr3 (3.00.53rc1) unstable; urgency=medium

* NEW! merge PR #1010 S3 Transfer protocol driver (experimental)
* fix #1004 make persistence an option (was always persistent until now.)
* fix #1002 sftp accellerator failure when colons in the destination name.
Expand All @@ -44,11 +46,10 @@ metpx-sr3 (3.00.53rc1) unstable; urgency=medium
* fix #973 AM ... add missing tokIsYear better AM message filtering.
* fix #971 Add missing to list of possible process status
* docs: Add topicPrefix for #961
* docs: some revisions for clarity/syntax.
* docs: some revisions for clarity/syntax.
* some fixes for misnaming of some (rare) files received by gather/am


-- Peter Silva <[email protected]> Thu, 06 Apr 2024 16:31:04 -0400
-- Peter Silva <[email protected]> Thu, 17 May 2024 09:31:04 -0400

metpx-sr3 (3.00.52) unstable; urgency=medium

Expand Down
6 changes: 6 additions & 0 deletions docs/source/How2Guides/UPGRADING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ Installation Instructions
git
---

3.0.54
------

*CHANGE*: *sr3 sanity* only restarts missing instances, not stopped ones.
this is considered more in accordance with analyst expectations (POLA)

3.0.53
------

Expand Down
7 changes: 4 additions & 3 deletions docs/source/Reference/sr3_options.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ OPTION TYPES

sr3 options come in several types:

count
integer count type.
count, size
integer count type. same as size described below.

duration
a floating point number indicating a quantity of seconds (0.001 is 1 milisecond)
Expand All @@ -249,9 +249,10 @@ set

size
integer size. Suffixes k, m, and g for kilo, mega, and giga (base 2) multipliers.
alone base 10: 1k=1000, with a 'b' suffix, base 2: 1kb=1024

str
an string value
a string value


OPTIONS
Expand Down
6 changes: 6 additions & 0 deletions docs/source/fr/CommentFaire/MiseANiveau.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ Instructions d’installation
git
---

3.0.54
------

*CHANGEMENT* : *sr3 sanity* redémarre uniquement les instances manquantes, pas celles arrêtées.
cela est considéré comme plus conforme aux attentes des analystes.

3.0.53
------

Expand Down
5 changes: 3 additions & 2 deletions docs/source/fr/Reference/sr3_options.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ TYPES D'OPTIONS
Les options de sr3 ont plusieurs types :

count
type de nombre entier.
type de nombre entier. Même format que *size* détaillé plus bas.

duration
un nombre à virgule flottante qui indique une quantité en secondes (0.001 est 1 milliseconde)
Expand All @@ -246,7 +246,8 @@ set
un assortissement de chaîne de caractères, chaque occurrence successive s'unionise au total.

size
taille entière. Suffixes k, m et g pour les multiplicateurs kilo, méga et giga (base 2).
taille entière. Suffixes k, m et g pour les multiplicateurs kilo, méga et giga (base 10).
si on rajoute ´b' ... c´est base 2 : 1k=1000, 1kb=1024

str
une chaîne de caractères.
Expand Down
2 changes: 1 addition & 1 deletion sarracenia/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.00.53rc2"
__version__ = "3.00.54rc1"
8 changes: 4 additions & 4 deletions sarracenia/bulletin.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _verifyYear(self, bulletin_year):

return True

def verifyHeader(self, header):
def verifyHeader(self, header, charset):
"""Derived from Sundew -> https://github.com/MetPX/Sundew/blob/main/lib/bulletin.py#L601-L671.
Verifies the integrity of the bulletin header. Flag if there is an error in the header.
Called by the buildHeader method.
Expand Down Expand Up @@ -92,13 +92,13 @@ def verifyHeader(self, header):
return header, isProblem

# Verify BBB field(s) -> https://www.weather.gov/tg/headef. Remove it if it's corrupted.
if not tokens[3].isalpha() or len(tokens[3]) != 3 or tokens[3][0] not in ['C','A','R','P']:
if not tokens[3].isalpha() or len(tokens[3]) != 3 or tokens[3].decode(charset)[0] not in ['C','A','R','P']:
logger.info("Header normalized: fourth and later fields removed.")
del tokens[3:]
rebuild = 1

if len(tokens) == 5 and \
(not tokens[4].isalpha() or len(tokens[4]) != 3 or tokens[4][0] not in ['C','A','R','P']):
(not tokens[4].isalpha() or len(tokens[4]) != 3 or tokens[4].decode(charset)[0] not in ['C','A','R','P']):
logger.info("Header normalized: fifth and later fields removed")
del tokens[4:]
rebuild = 1
Expand Down Expand Up @@ -249,7 +249,7 @@ def getStation(self, data):
# Added to SR3
# The station needs to be alphanumeric, between 3 and 5 characters. If not, don't assign a station
if re.search('^[a-zA-Z0-9]{3,5}$', station) == None:
station = ''
station = None

return station

Expand Down
Loading
Loading