Skip to content

Commit

Permalink
style: about window, improved how dev version is determined
Browse files Browse the repository at this point in the history
  • Loading branch information
ElpadoCan committed Jun 15, 2023
1 parent 3b6f1ae commit a68873e
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions cellacdc/myutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1953,12 +1953,10 @@ def get_slices_local_into_global_arr(bbox_coords, global_shape):
def get_pip_install_cellacdc_version_command(version=None):
if version is None:
version = read_version()
try:
commit_hash = re.findall(r'\+g(.+)\.', version)[0]
is_dev_version = True
except Exception as e:
is_dev_version = False
commit_hash_idx = version.find('+g') != -1
is_dev_version = commit_hash_idx > 0
if is_dev_version:
commit_hash = version[commit_hash_idx+2:]
command = f'pip install --upgrade "git+{github_home_url}.git@{commit_hash}"'
else:
command = f'pip install --upgrade cellacdc=={version}'
Expand All @@ -1967,10 +1965,11 @@ def get_pip_install_cellacdc_version_command(version=None):
def get_git_pull_checkout_cellacdc_version_commands(version=None):
if version is None:
version = read_version()
try:
commit_hash = re.findall(r'\+g(.+)\.', version)[0]
except Exception as e:
commit_hash_idx = version.find('+g') != -1
is_dev_version = commit_hash_idx > 0
if not is_dev_version:
return []
commit_hash = version[commit_hash_idx+2:]
commands = (
f'cd "{cellacdc_path}"',
'git pull',
Expand Down

0 comments on commit a68873e

Please sign in to comment.