From c18797e9c2dc38bb947c1e0de1ccb74785c4faf3 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Aug 10 2020 17:40:31 +0000 Subject: Add version.py and countme.__version__ Pretty minor addition but it's useful for setup.{cfg,py} --- diff --git a/countme/__init__.py b/countme/__init__.py index c853ac1..40eec33 100644 --- a/countme/__init__.py +++ b/countme/__init__.py @@ -17,20 +17,13 @@ # # Author: Will Woods # -# The main point of this script, as it says above, is parsing access_log to +# The reason this module exists, as it says above, is for parsing access_logs # structured data. I'm trying to avoid packing Fedora-specific data-massaging # into this; tools further down the pipeline can be responsible for figuring -# out how to group "updates-released-f32" and "fedora-modular-source-32". +# out what arches are valid or whether to group "updates-released-f32" and +# "fedora-modular-source-32" hits into the same buckets. -import os -import re -from datetime import date, time, datetime, timezone, timedelta -from urllib.parse import parse_qsl -from typing import NamedTuple, Optional - -from .regex import COUNTME_LOG_RE, MIRRORS_LOG_RE - -# TODO: clean this up so it only exports the common/needed bits +# TODO: this should probably get cleaned up? __all__ = ( 'weeknum', 'parse_logtime', 'parse_querydict', @@ -43,6 +36,15 @@ __all__ = ( 'LogMatcher', 'MirrorMatcher', 'CountmeMatcher', ) +import os +import re +from datetime import date, time, datetime, timezone, timedelta +from urllib.parse import parse_qsl +from typing import NamedTuple, Optional + +from .regex import COUNTME_LOG_RE, MIRRORS_LOG_RE +from .version import __version__, __version_info__ + # =========================================================================== # ====== Output item definitions and helpers ================================ # =========================================================================== diff --git a/countme/version.py b/countme/version.py new file mode 100644 index 0000000..1d5cbc2 --- /dev/null +++ b/countme/version.py @@ -0,0 +1,2 @@ +__version__ = "0.0.1" +__version_info__ = tuple(__version__.split('.'))