Commit Graph

221 Commits

Author SHA1 Message Date
Ayaz Salikhov d0c7458839
maint: Add prettier pre-commit hook (#3663) 2025-01-13 09:09:07 +01:00
Julien Jerphanion 0abd7d54e7
fix: Correctly populate lists of `MatchSpec` in `MTransaction`'s history (#3724)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2025-01-06 17:25:17 +01:00
Hind-M 9dd3999b8d
Fix install using explicit url (#3710) 2025-01-06 12:35:55 +01:00
Hind-M 3dcbf76a04
Fix display of env activation message and co (#3715) 2025-01-06 09:56:21 +01:00
Hind-M 9c61b5f71c
Always add `root_prefix/envs` in `envs_dirs` (#3692) 2024-12-18 12:25:10 +01:00
Hind-M 7f3f481b47
Add `no-pip` flag to `list` command (#3696) 2024-12-18 10:57:32 +01:00
Ayaz Salikhov f67914ef8a
maint: Add pyupgrade pre-commit hook (#3671) 2024-12-09 17:05:54 +01:00
Julien Jerphanion 178593351b
fix: Skip empty lines in environment spec files (#3662)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Klaim <Klaim@users.noreply.github.com>
2024-12-09 08:55:39 +01:00
Hind-M 6141540b94
Handle `.tar.gz` in pkg url (#3640) 2024-12-06 08:55:03 +01:00
Julien Jerphanion 8ea3103d3c
fix: Effectively apply dry-run on installation from PyPI (#3644)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-12-05 15:01:47 +01:00
Julien Jerphanion e67178ce8a
fix: Handle environment with empty or absent `dependencies` (#3657)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-12-05 15:00:15 +01:00
Julien Jerphanion 575809fbc3
fix: Reintroduce the `uninstall` command (#3650)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-12-04 18:02:42 +01:00
Hind-M 3f49aa5f6e
Uncomment test (#3641) 2024-12-02 11:56:42 +01:00
Julien Jerphanion b163ce9027
fix: Return JSON on environment creation dry run (#3627)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-11-22 15:23:27 +01:00
Julien Jerphanion 7b0a957dc0
feat: List PyPI packages in environment export (#3623)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Johan Mabille <johan.mabille@gmail.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
2024-11-21 11:27:52 +01:00
Ayaz Salikhov ccbf795281
fix: Export `'channels'` as part of environments' export (#3587) 2024-11-18 11:20:55 +01:00
Ayaz Salikhov 0f4ad44c2e
Update pre-commit hooks except clang-format (#3599) 2024-11-14 10:27:18 +01:00
Ayaz Salikhov 4535562cb8
fix: Correct `mamba env export --json --from-history` (#3590) 2024-11-12 14:06:58 +01:00
Hind-M 0075a24e4c
pip packages support with `list` (#3565) 2024-10-30 10:20:25 +01:00
Hind-M 47e962968d
Fix test on windows (#3555) 2024-10-28 09:43:29 +01:00
Julien Jerphanion d2d16517ed
fix: JSON output for environment export (#3559)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Johan Mabille <johan.mabille@gmail.com>
2024-10-22 17:31:33 +02:00
Julien Jerphanion d26c7f5632
fix: Support `conda env export` `no-builds` flag (#3563)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-10-22 16:32:41 +02:00
Julien Jerphanion dfcc7c0bf1
fix: Export the environment prefix in specification (#3562)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-10-22 15:20:21 +02:00
Hind-M 3d9486fea5
Fix relative path in local channel (#3540)
Fix relative path in local channels
2024-10-21 15:09:57 +02:00
Hind-M 607c39035c
Correctly rename test to be run (#3545)
* Correctly rename test to be run

* Fix test

* Skip oci test

* Real fix hopefully

* Skip test on windows

* Adjust comment
2024-10-21 09:18:57 +02:00
Hind-M 3d71f57517
Create empty base prefix with `env update` (#3519) 2024-10-16 10:53:51 +02:00
Julien Jerphanion 91a2a2b868
fix: Adapt `test_env_update_pypi_with_conda_forge` (#3537)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-10-15 17:06:07 +02:00
Julien Jerphanion b7367417f7
fix: Handle `MatchSpec` with brackets when parsing environments' history (#3490)
* fix: Adapt `parse_comment_line` to handle more `MatchSpec`

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* test: Add non-regression python test

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* test: Add non-regression C++ test

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Apply review comments

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

Co-authored-by: Johan Mabille <johan.mabille@gmail.com>

* test: Skip test on Windows

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

---------

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Johan Mabille <johan.mabille@gmail.com>
2024-10-02 17:21:57 +02:00
Hind-M 45c437a3c8
Fix `channel` and `base_url` in `list` cmd (#3488)
* Fix channel and base_url in list cmd

* Add func

* Fix oci tests
2024-10-02 14:01:07 +02:00
Johan Mabille b23a07956a
--full-name option for list (#3485)
Added --full-name option to the list command
2024-09-30 19:28:04 +02:00
Julien Jerphanion 0b824fe252
fix: Support for PEP 440 "Compatible Releases" (operator `~=` for `MatchSpec`) (#3483)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Johan Mabille <johan.mabille@gmail.com>
2024-09-30 16:41:49 +02:00
Julien Jerphanion 1c755675bf
fix: Handle extra white-space in `MatchSpec` (#3456)
* test: Add non-regression test for #3453

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Minimal suboptimal fix

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Add edge cases to the env specification

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* test: Add `MatchSpec` parsing subcases

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* test: Complete `test_env_create_whitespace`

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Add kytea test case

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Merge replacement of binary operators

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Lint with pre-commit

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Adapt MatchSpec

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

Co-authored-by: Hind Montassif <hind.montassif@gmail.com>

* Remove redundant test

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

Co-authored-by: Hind Montassif <hind.montassif@gmail.com>

* Rename subcase

Co-authored-by: Hind-M <70631848+Hind-M@users.noreply.github.com>

* Adapt comparison on versions

Co-authored-by: Hind-M <70631848+Hind-M@users.noreply.github.com>

* Adapt test case

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Remove pytorch-cpu as it is not available on windows

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

---------

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Hind Montassif <hind.montassif@gmail.com>
Co-authored-by: Hind-M <70631848+Hind-M@users.noreply.github.com>
2024-09-19 16:54:58 +02:00
Sylvain Corlay 6db44c8a64
Support CONDA_DEFAULT_ENV (#3445)
* Support CONDA_DEFAULT_ENV

* Fix test
2024-09-19 16:40:00 +02:00
Hind-M fc06ae8bbc
Fix `test_env_update_pypi_with_conda_forge` (#3459)
Fix test
2024-09-19 11:43:05 +02:00
Hind-M b08d40d4d7
Fix test in osx (#3448)
Use PRE_COMMIT_USE_MAMBA instead of PRE_COMMIT_USE_MICROMAMBA
2024-09-17 13:40:38 +02:00
Hind-M 12fef58c37
Add fallback to root prefix (#3435)
* Add fallback to root prefix

* Fix test_not_env

* Fix tests

* Add tests with no env var
2024-09-10 15:10:21 +02:00
Julien Jerphanion c4a6e78a78
fix: PyPI support for `env update` (#3419)
* Simple fix

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Factor elements in `pip_utils.{hpp,cpp}`

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* docs: Add TODO

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* test: Creation and update of env with pip sections

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Use quiet mode for pip

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Address review comments

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

Co-authored-by: Johan Mabille <johan.mabille@gmail.com>

* Invert headers' inclusion

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Address review comments

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

Co-authored-by: Hind Montassif <hind.montassif@gmail.com>

* Add more tests

* Use enum instead of bool

* Adapt tests

* Add warning

* Clean up

---------

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Johan Mabille <johan.mabille@gmail.com>
Co-authored-by: Hind Montassif <hind.montassif@gmail.com>
2024-09-05 15:41:39 +02:00
Julien Jerphanion 5251abaad0
test: Adapt `test_remove_orphaned` unlinks (#3417)
* test: Adapt `test_remove_orphaned` unlinks

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Relax test by only checking for at least two unlinks' presence.

Co-authored-by: Hind-M <70631848+Hind-M@users.noreply.github.com>

* Revert to the commented and previously used value

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

Co-authored-by: Hind Montassif <hind.montassif@gmail.com>

* Revert "Revert to the commented and previously used value"

This reverts commit 009f982c54.

---------

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Hind-M <70631848+Hind-M@users.noreply.github.com>
Co-authored-by: Hind Montassif <hind.montassif@gmail.com>
2024-08-29 14:22:35 +02:00
Julien Jerphanion 0a01ecfc9d
fix: Reduce logging system overhead (#3416)
* test: Non-regression test

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* fix: Use penultimate libsolv's log level

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Only run `test_env_spdlog_overhead_regression` on Linux

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

Co-authored-by: Johan Mabille <johan.mabille@gmail.com>

* Add time-out on test and rename conda env

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

Co-authored-by: Hind Montassif <hind.montassif@gmail.com>

* Decrease timout to 15 seconds and use dry-run

A dry run takes slightly less than 10 seconds.

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Use bounded value of `output_params.verbosity` as in 1.x

See: https://github.com/mamba-org/mamba/blob/1.x/libmamba/src/core/pool.cpp#L72

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Instead define and use and alternative `set_level`

I was hesitating between the previous solution and
this one (which is not really ideal either) but
which at least does not leak the `Context`.

Friend function could be used but we get this kind of
issue, but I am currently meeting this problem:
https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2174

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Revert "Instead define and use and alternative `set_level`"

This reverts commit f1f41b71d0.

* Simply hardcode the verbosity level to 3

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

Co-authored-by: Hind Montassif <hind.montassif@gmail.com>

* Increase timeout from 15 to 30 seconds

15 seconds is not sufficient as shown on the CI.

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* From 30 sec to 60 sec

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* DEBUG No timeout

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* test: Remove edge-case for unlinks

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* test: Adapt number of unlinks on Linux

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Assert success

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

Co-authored-by: Hind Montassif <hind.montassif@gmail.com>

* docs: Update comments

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* `const`-qualify `level`

* Use 100 seconds for the timeout

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

Co-authored-by: Hind Montassif <hind.montassif@gmail.com>

* Use 200 seconds for the timeout

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* Adapt according to `1.x`'s behavior

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

* fixup! Adapt according to `1.x`'s behavior

* Revert changes to handle CI failures

This is handled by another PR.

See: https://github.com/mamba-org/mamba/pull/3417

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

---------

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Johan Mabille <johan.mabille@gmail.com>
Co-authored-by: Hind Montassif <hind.montassif@gmail.com>
2024-08-29 14:03:18 +02:00
Hind-M d17ebc52cc
[micromamba] Fix behavior of `env update` (to mimick conda) (#3396)
* Fix behavior of env update (to mimick conda)

* Code review:
Use struct and enum class for update parameters
2024-08-08 12:00:45 +02:00
Julien Jerphanion 16fec215e9
test: Adapt test_explicit_export_topologically_sorted (#3377)
As of pip 24.1.2 distribution on conda-forge,
pip does not depend on wheel anymore:
https://github.com/conda-forge/pip-feedstock/pull/121/files#diff-f3725a55bf339595bf865fec73bda8ac99f283b0810c205442021f29c06eea9aR21-R25

Hence wheel index being 0 causing the bug.

Let's omit it entirely.

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-07-31 18:39:50 +02:00
Paul Brit 413285c7b7
fix: micromamba run when cwd does not exist (#3336)
fail micromamba run if cwd does not exist

Co-authored-by: Hind-M <70631848+Hind-M@users.noreply.github.com>
2024-07-15 17:30:32 +02:00
Hind-M a71f63f1e0
Attempt to fix `test_proxy_install` (#3324)
Attempt to fix test_proxy_install random failure on CI
2024-07-02 11:15:30 +02:00
Hind-M 7f70ac900a
Fix `test_no_python_pinning` (#3321)
* Enable test_no_python_pinning

* Fix test_no_python_pinning
2024-07-02 11:14:57 +02:00
Johan Mabille b277685bb5
Temporarily disabled no_python_pinning test on Windows (#3322) 2024-06-14 11:42:35 +02:00
Hind-M 287bf22de2
OCI/Conda mapping (#3310)
* Map packages names starting with '_' to match OCI registries rules (and CEP 70)

* Use _go_select instead of _libgcc_mutex in tests
Remove dry-run and check result with umamba_list
2024-06-13 09:38:24 +02:00
Hind-M 7f8d5649c0
[OCI - Mirrors] Add tests and doc (#3307)
* Add doc and micromamba python test

* Add some tests for mirrors

* Use another channel name to avoid interfering with conda-forge

* Add test parameter to use libsolv parser

* Remove dry-run from tests
2024-06-12 16:36:31 +02:00
Hind-M 4604d390e9
Fix test_no_python_pinning (#3319) 2024-06-12 14:29:16 +02:00
Hind-M 3e1e97b0e6
Add checking typos to pre-commit (#3278)
* Add checking typos to pre-commit

* Add missed corrections

* Add more corrections to doc
2024-05-27 09:16:14 +02:00
Johan Mabille dcd777fbd1
Test with xtensor-python instead of unmaintained xframe (#3286)
Upgraded tests to use packages available on osx-arm64
2024-05-03 18:02:33 +02:00