Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ src/.streamlit/secrets.toml
# uv
.venv/
.python-version

# setuptools
*.egg-info/
__pycache__/
*.py[cod]
*$py.class
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libpq-dev \
gcc \
curl \
git \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Install uv
Expand All @@ -18,6 +19,7 @@ WORKDIR /app
# Copy pyproject.toml and README.md for dependency installation
COPY pyproject.toml ./
COPY README.md ./
COPY .git .git

# Install dependencies using uv (generate lock file during build)
RUN uv sync
Expand Down
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
requires = ["setuptools>=61", "setuptools-scm>=8.0"]
build-backend = "setuptools.build_meta"

[project]
name = "analysis-dashboard"
version = "0.1.0"
dynamic = ["version"]
description = "Analysis dashboard for OCF forecasting systems"
readme = {file = "README.md", content-type = "text/markdown"}
requires-python = ">=3.12.0,<3.13"
Expand Down Expand Up @@ -72,3 +72,6 @@ python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
pythonpath = ["src"]

[tool.setuptools_scm]
local_scheme = "no-local-version"
9 changes: 8 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
from adjuster import adjuster_page
from batch_page import batch_page

from importlib.metadata import PackageNotFoundError, version

try:
__version__ = version("analysis-dashboard")
except PackageNotFoundError:
__version__ = "v?"

st.get_option("theme.primaryColor")
st.set_page_config(layout="wide", page_title="OCF Dashboard")

Expand Down Expand Up @@ -252,7 +259,7 @@ def metric_page():


def main_page():
st.text('This is the Analysis Dashboard UK. Please select the page you want from the menu at the top of this page')
st.text(f'This is the Analysis Dashboard UK v{__version__}. Please select the page you want from the menu at the top of this page')


if check_password():
Expand Down
9 changes: 8 additions & 1 deletion src/main_india.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,18 @@
from weather_graph import weather_graph_page
from batch_page import batch_page

from importlib.metadata import PackageNotFoundError, version

try:
__version__ = version("analysis-dashboard")
except PackageNotFoundError:
__version__ = "v?"

st.get_option("theme.primaryColor")
st.set_page_config(layout="wide", page_title="OCF Dashboard")

def main_page():
st.text('This is the Analysis Dashboard India. Please select the page you want on the left hand side')
st.text(f'This is the Analysis Dashboard India v{__version__}. Please select the page you want on the left hand side')


if check_password():
Expand Down