Skip to content

Commit

Permalink
Add exception in generate pip from conda script when pulling from rep…
Browse files Browse the repository at this point in the history
…o directly
  • Loading branch information
rhugonnet committed Sep 24, 2023
1 parent b471cfd commit 348e4e3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion .github/scripts/generate_pip_deps_from_conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,14 @@ def generate_pip_from_conda(conda_path: pathlib.Path, pip_path: pathlib.Path, co
if conda_dep:
pip_deps.append(conda_dep)
elif isinstance(dep, dict) and len(dep) == 1 and "pip" in dep:
pip_deps.extend(dep["pip"])
# If pulled directly from GitHub (temporary CI passing),
# such as git+https://github.com/GlacioHack/geoutils.git,
# rename to the package repo name
dep_pips = dep["pip"]
for dep_pip in dep_pips:
if "+" in dep_pip and dep_pip.split("+")[0] == "git":
dep_pip = dep_pip.split("/")[-1].split(".git")[0]
pip_deps.append(dep_pip)
else:
raise ValueError(f"Unexpected dependency {dep}")

Expand Down
2 changes: 1 addition & 1 deletion dev-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ dependencies:
- noisyopt

# To run CI against latest GeoUtils
- git+https://github.com/GlacioHack/GeoUtils.git
- git+https://github.com/GlacioHack/geoutils.git
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ dependencies:
- pip

- pip:
- git+https://github.com/GlacioHack/GeoUtils.git
- git+https://github.com/GlacioHack/geoutils.git
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ tqdm
scikit-image
scikit-gstat>=1.0
pip
git+https://github.com/GlacioHack/GeoUtils.git
geoutils
setuptools>=42
setuptools_scm[toml]>=6.2

0 comments on commit 348e4e3

Please sign in to comment.