Skip to content

Commit

Permalink
Merge pull request #38
Browse files Browse the repository at this point in the history
Release: v0.18.0
  • Loading branch information
macro128 authored Jun 8, 2024
2 parents e03ee46 + 677183f commit 70d2dd2
Show file tree
Hide file tree
Showing 36 changed files with 429 additions and 234 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.18.0] - 08/06/2024

### Added

* Now compatible with `pdm==v2.15.4`.
* Add `conda.active` config to activate/deactivate pdm-conda plugin.

### Changed

* Only modify PDM config while the plugin is active.

## [0.17.6] - 16/05/2024

### Added

* Now compatible with `pdm==v2.15.2`.


## [0.17.5] - 08/05/2024

### Changed
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ A PDM plugin to resolve/install/uninstall project dependencies with Conda.

| Config item | Description | Default value | Possible values | Environment variable |
|-----------------------------------|------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|--------------------------------|---------------------------------|
| `conda.active` | Force plugin usage or not | `True` | | `PDM_CONDA_ACTIVE` |
| `conda.runner` | Conda runner executable | `conda` | `conda`, `mamba`, `micromamba` | `PDM_CONDA_RUNNER` |
| `conda.solver` | Solver to use for Conda resolution | `conda` | `conda`, `libmamba` | `PDM_CONDA_SOLVER` |
| `conda.channels` | Conda channels to use, order will be enforced | `[]` | | |
Expand Down Expand Up @@ -33,6 +34,7 @@ solver = "libmamba"
excludes = ["pytest-cov"] # don't install with conda even if it's a dependency from other packages
installation-method = "copy"
batched-commands = true
active = false

[tool.pdm.conda.pypi-mapping]
download-dir = "/tmp"
Expand Down Expand Up @@ -108,6 +110,9 @@ Some environment variables were overridden too:
* `PDM_IGNORE_ACTIVE_VENV` if conda settings detected in `pyproject.toml` and `VIRTUAL_ENV` or `CONDA_PREFIX`
environment variables are set then this variable is set to `False`.

All this changes will be maintained only during the execution of the command, after that the settings will be restored
to the previous values.

#### Lock strategy

* Lock strategy `no_cross_platform` for `pdm lock` is always forced as Conda doesn't produce cross-platform locks.
Expand Down
2 changes: 1 addition & 1 deletion base
Submodule base updated from 5b097f to 95e94d
2 changes: 1 addition & 1 deletion deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ FROM ${base} AS src-app
# install PDM and create app environment
ARG app_env
ARG python_version="3.10.*"
ARG pdm_version="2.15.2"
ARG pdm_version="2.15.4"
ENV BIN_PATH=/opt/conda/_bin
RUN --mount=type=cache,target=/opt/conda/pkgs,id=mamba,mode=0775,uid=1000,gid=1000,sharing=locked \
micromamba install -y pdm==${pdm_version} -n base -c conda-forge --always-copy && \
Expand Down
2 changes: 1 addition & 1 deletion deploy/docker-compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
dependencies: ":all"
local_path: $PWD
image: pdm-conda:latest-dev
platform: linux/arm64
platform: linux/x86_64
volumes:
- ../tests:/app/tests
- ../src/pdm_conda:/app/src/pdm_conda
Expand Down
138 changes: 12 additions & 126 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ classifiers = [
]

dependencies = [
"pdm==2.15.2",
"pdm==2.15.4",
"typing-extensions>=4.10.0",
"httpx>=0.27.0",
]
Expand Down
1 change: 0 additions & 1 deletion scripts/docker-compose.sh

This file was deleted.

36 changes: 36 additions & 0 deletions scripts/docker-compose.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
DEV=false
COMMAND=''
while [[ $# -gt 0 ]]; do
case "$1" in
--dev | -d)
DEV=true
;;
*)
COMMAND=$*
shift $(($# - 1))
;;
esac
shift
done

ENV_FILE="$PWD"/.env
ENV_FILE_DEST="$PWD"/deploy/.env
if [[ -f "$ENV_FILE" ]] && [[ ! -f "$ENV_FILE_DEST" ]]; then
ln -s "$ENV_FILE" "$ENV_FILE_DEST"
fi

OPTS=""
if $DEV; then
OPTS="-f deploy/docker-compose.dev.yaml"
UID_GID="$(id -u):$(id -g)"
export UID_GID
fi

if [[ "$COMMAND" == run* ]] && [[ "$COMMAND" != run*--rm* ]]; then
readarray -td ' ' _COMMAND <<<"$COMMAND"
COMMAND="${_COMMAND[0]} --rm "
unset "_COMMAND[0]"
COMMAND+="${_COMMAND[*]}"
fi

docker compose -f deploy/docker-compose.yaml $OPTS $COMMAND
1 change: 0 additions & 1 deletion scripts/fix_report.py

This file was deleted.

Loading

0 comments on commit 70d2dd2

Please sign in to comment.