Skip to content

Commit

Permalink
api: use semantic version with hour/minute
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Aug 25, 2022
1 parent df5dc5e commit c128a7a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mpcontribs-api/mpcontribs/api/config.py
Expand Up @@ -6,14 +6,21 @@
import json
import gzip

from semantic_version import Version

formulae_path = os.path.join(
os.path.dirname(__file__), "contributions", "formulae.json.gz"
)

with gzip.open(formulae_path) as f:
FORMULAE = json.load(f)

VERSION = datetime.datetime.now().strftime("v%Y%m%d%H%M")
now = datetime.datetime.now()
VERSION = Version(
major=now.year, minor=now.month, patch=now.day,
prerelease=(str(now.hour), str(now.minute))
)

JSON_SORT_KEYS = False
JSON_ADD_STATUS = False
SECRET_KEY = "super-secret" # TODO in local prod config
Expand Down
1 change: 1 addition & 0 deletions mpcontribs-api/requirements.txt
Expand Up @@ -27,6 +27,7 @@ pyopenssl==22.0.0
python-snappy==0.6.1
#rq-dashboard==0.6.1
rq-scheduler==0.11.0
semantic-version==2.10.0
supervisor==4.2.4
setproctitle==1.3.2
uncertainties==3.1.7
Expand Down

0 comments on commit c128a7a

Please sign in to comment.