Skip to content

Commit

Permalink
Merge pull request NOAA-GFDL#327 from NOAA-GFDL/bump-package-version
Browse files Browse the repository at this point in the history
Update package version to 2025.01.01
  • Loading branch information
ilaflott authored Feb 10, 2025
2 parents acb0ded + 1d0ad28 commit 0e3ee36
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fre/cmor/cmor_mixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from .cmor_helpers import *

# ----- \start consts # TODO make this an input argument flag or smth.
DEBUG_MODE_RUN_ONE = True
DEBUG_MODE_RUN_ONE = False
# ----- \end consts


Expand Down
11 changes: 10 additions & 1 deletion fre/fre.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@
version_minor = "0" + version_unexpanded_split[1]
else:
version_minor = version_unexpanded_split[1]
version = version_unexpanded_split[0] + '.' + version_minor
# if the patch version is present, then use it. otherwise, omit
try:
len(version_unexpanded_split[2])
if len(version_unexpanded_split[2]) == 1:
version_patch = "0" + version_unexpanded_split[2]
else:
version_patch = version_unexpanded_split[2]
version = version_unexpanded_split[0] + '.' + version_minor + '.' + version_patch
except IndexError:
version = version_unexpanded_split[0] + '.' + version_minor

# click and lazy group loading
@click.group(
Expand Down
2 changes: 1 addition & 1 deletion fre/tests/test_files/cmip6-cmor-tables
4 changes: 2 additions & 2 deletions fre/tests/test_fre_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ def test_cli_fre_option_dne():

def test_fre_version():
''' module import flavor of below cli test '''
assert '2025.01' == fre.version
assert '2025.01.01' == fre.version

def test_cli_fre_version():
''' fre --version '''
result = runner.invoke(fre.fre, args='--version')
expected_out = 'fre, version 2025.01'
expected_out = 'fre, version 2025.01.01'
assert all( [ result.exit_code == 0,
expected_out in result.stdout.split('\n') ] )
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='fre-cli',
version='2025.01',
version='2025.01.01',
description='Command Line Interface for FRE commands',
author='MSD Workflow Team, Bennett Chang, Dana Singh, Chris Blanton',
author_email='[email protected]',
Expand Down

0 comments on commit 0e3ee36

Please sign in to comment.