Skip to content

Commit

Permalink
Update settings to automatically infer project version.
Browse files Browse the repository at this point in the history
  • Loading branch information
ropable committed Nov 28, 2023
1 parent 83f2192 commit 7b18b2f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ibms_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
from pathlib import Path
import sys
import tomli

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = str(Path(__file__).resolve().parents[1])
Expand Down Expand Up @@ -80,7 +81,8 @@
]
SITE_TITLE = 'Integrated Business Management System'
SITE_ACRONYM = 'IBMS'
APPLICATION_VERSION_NO = '2.8.1'
project = tomli.load(open(os.path.join(BASE_DIR, "pyproject.toml"), "rb"))
APPLICATION_VERSION_NO = project["tool"]["poetry"]["version"]
MANAGERS = (
('Zen Wee', '[email protected]', '9219 9928'),
('Graham Holmes', '[email protected]', '9881 9212'),
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ openpyxl = "3.1.2"
webtemplate-dbca = "1.6.0"
whitenoise = {version = "6.6.0", extras = ["brotli"]}
mixer = "7.2.2"
tomli = "2.0.1"

[tool.poetry.group.dev.dependencies]
ipython = "^8.10.0"
Expand Down

0 comments on commit 7b18b2f

Please sign in to comment.