Skip to content

Commit

Permalink
refactor(__version__): move dlunch __version__ from __init__.py to co…
Browse files Browse the repository at this point in the history
…re.py

__version__ is still imported in __init__.py
  • Loading branch information
Michele-Alberti committed Nov 4, 2024
1 parent 66d3b8d commit 46ece93
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
11 changes: 2 additions & 9 deletions dlunch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
"""Main Data-Lunch package."""

import importlib.resources
import pathlib
import hydra
import logging
import panel as pn
from omegaconf import DictConfig, OmegaConf

# Database imports
# Relative imports
from . import models

# Other Data-Lunch imports
from . import core
from .core import __version__
from . import gui
from . import auth
from .auth import pn_user

# App metadata
__version__ = "3.3.0"
"""str: Data-Lunch version."""

# LOGGER ----------------------------------------------------------------------
log = logging.getLogger(__name__)
"""Logger: module logger."""
Expand Down
8 changes: 8 additions & 0 deletions dlunch/cli.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""Module with Data-Lunch's command line.
The command line is built with ``click``.
Call ``data-lunch --help`` from the terminal inside an environment where the
``dlunch`` package is installed.
"""

import click
import pkg_resources
from hydra import compose, initialize
Expand Down
11 changes: 6 additions & 5 deletions dlunch/core.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import cryptography.fernet
import panel as pn
import pandas as pd
import pathlib
import logging
import socket
import subprocess
from . import __version__
from . import models
from omegaconf import DictConfig, OmegaConf
from openpyxl.utils import get_column_interval
from openpyxl.styles import Alignment, Font
Expand All @@ -20,12 +19,14 @@
from time import sleep

# Graphic interface imports (after class definition)
from . import models
from . import gui

# Authentication
from . import auth
from .auth import pn_user
import cryptography.fernet

# APP METADATA ----------------------------------------------------------------
__version__ = "3.3.0"
"""str: Data-Lunch version."""

# LOGGER ----------------------------------------------------------------------
log = logging.getLogger(__name__)
Expand Down
1 change: 1 addition & 0 deletions dlunch/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from . import auth
from .auth import pn_user

# LOGGER ----------------------------------------------------------------------
log = logging.getLogger(__name__)


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ exclude = '''
name = "cz_conventional_commits"
version = "3.3.0"
version_files = [
"dlunch/__init__.py",
"dlunch/core.py",
"pyproject.toml:version",
"docs/conf.py:release",
]
Expand Down

0 comments on commit 46ece93

Please sign in to comment.