Commit Graph

340 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 bb132c9bff
fix: Honour `CONDA_ENVS_PATH` again (#3725)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2025-01-06 17:23:42 +01:00
Hind-M 9c61b5f71c
Always add `root_prefix/envs` in `envs_dirs` (#3692) 2024-12-18 12:25:10 +01:00
Hind-M a25cde7914
Fix channel in `PackageInfo` (#3681) 2024-12-12 17:12:05 +01:00
Julien Jerphanion 8c80ae90b1
test: Add two tests on MatchSpec's version comparison (#3679)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-12-10 16:09:44 +01:00
Ayaz Salikhov 76d06a7f5a
maint: Cleanup CMake files and delete not compiled files (#3667) 2024-12-09 20:27:12 +01:00
Julien Jerphanion 53ba5c0326
fix: Activated environment name (#3670)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-12-09 12:44:50 +01:00
Ayaz Salikhov c3a2c1c66e
maint: Use Catch2 instead of doctest (#3618) 2024-12-06 08:57:33 +01:00
Hind-M ebe0d4f89c
Fix build trailing `*` display (#3619) 2024-11-21 11:38:40 +01:00
Ayaz Salikhov ad9b2d6b88
maint: Update clang-format to v19 (#3600) 2024-11-18 17:29:18 +01:00
Ayaz Salikhov 6654e15633
maint: Address compiler warnings (#3605)
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
2024-11-18 13:21:35 +01:00
Ayaz Salikhov 6467000748
Fix some warnings (#3595) 2024-11-14 13:27:08 +01:00
ChaonengQuan 554d9264da
fix: Skip misformatted configuration files (#3580)
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Chaoneng Quan <chaonengquan@Chaonengs-MacBook-Pro.local>
2024-11-12 10:16:22 +01:00
Hind-M 47e962968d
Fix test on windows (#3555) 2024-10-28 09:43:29 +01: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
Julien Jerphanion c4068d3117
fix: Ignore inline comment in environment specification (#3512)
Fix https://github.com/mamba-org/mamba/issues/3509

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-10-07 19:18:31 +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
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 860ae0ea04
test: `MatchSpec` edges cases (#3458)
Add edge case test

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-09-20 14:49:54 +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
Julien Jerphanion ca8cee50fe
test: Comparability and hashability of `PackageInfo` and `MatchSpec` (#3369)
test: Add test for comparability and hashability

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-07-30 17:35:50 +02:00
Julien Jerphanion d0d7eea49a
build: Support fmt 11 (follow-up) (#3371)
* build: Support fmt 11

A few other elements were required, as observed in:
https://github.com/mamba-org/mamba/pull/3352

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

* Unpin python on 3.9

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

* ci: use libcxx<18 for macOS

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

* Add TODO comment

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

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

---------

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-07-30 15:57:15 +02:00
Julien Jerphanion 154012f256
Replace `Context` with `Context::platform` where possible (#3364)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-07-29 10:59:27 +02:00
Hind-M ce1c4f22bd
Allow leading lowercase letter in version (#3361) 2024-07-25 09:23:39 +02:00
Hind-M c6f2f24d5a
Allow spaces in version after operator (#3358)
Allow spaces in version after operator
2024-07-23 13:28:12 +02:00
Hind-M 43da6b02a2
Fix repo usage after removal (#3340)
not use repo after removal
2024-07-15 15:20:42 +02:00
Klaim (Joël Lamotte) 76570f83b8
Splitt `ContextOptions::enable_logging_and_signal_handling` into 2 different options (#3329)
Splitt `ContextOptions::enable_logging_and_signal_handling` into 2 different options.
2024-06-19 16:29:47 +02:00
Klaim (Joël Lamotte) ab088e5d8a
libmambapy: use `Context` explicitly (#3309)
* All python singletons lifetime are bound to a unique `Context` instance lifetime

In `libmambapy`:
- bound singletons lifetime to the first `Context` instance created
- throw an error if more than one `Context` instance are created at any time
(this only applies to python and will be changed at another time)
- therefore the python user must create a `Context` before using any other functions

This specific change does not (yet) changes the other functions APIs to take
explicitly the `Context` object.

* simplify python expressions

* python API change, added requirement for a `Context` instance

affected functions:
- MultiPackageCache (constructor)
- SubdirData.create_repo
- SubdirIndex.create
- SubdirIndex.download
- clean
- transmute
- get_virtual_packages
- cancel_json_output

* libmamba loggers are now unregistered when Context instance is destroyed

* fixed: dont use `default` as a name

* remove quick-test file

* linter fixes

* Updated documentation

* temptative fix for potential data race in libmamba tests

* libmamba tests: added an assertion to be sure

* linter pass

* fixup libmambatests

* added log for helping understanding ci failure

* review fixes
2024-06-14 09:50:58 +02:00
Julien Jerphanion d12f3711e6
maint: Remove some warnings (#3320)
* maint: Remove some warnings

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

* Lint

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

---------

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
2024-06-13 16:56:17 +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 56c0a8397c
Fix osx version test (#3308) 2024-06-07 10:27:55 +02:00
Hind-M 36d2035764
[CEP-15] Support `base_url` with `repodata_version: 2` using `mamba` parser (#3282)
* Support repodata_version:2/cep-15 with mamba parser

* Fix behavior when base_url is missing with repodata_version 2
2024-05-28 09:48:33 +02:00
Hind-M 93d565e75f
Fix OCIMirror use (#3296)
* Modifications for a first test (forcing params/not cleaned up yet)

* Handle specs checksums

* Remove cout and unnecessary code

* Handle zst extension of repodata

* Add missing invoke_on_failure
Add back curl config

* Organize comments and remove useless leftovers

* Correctly use hide_secrets

* Handle "oci" scheme
2024-05-27 14:11:41 +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
Antoine Prouvost 453c9667a5
Fix VersionSpec equal and glob (#3269) 2024-04-10 10:22:02 +02:00
Antoine Prouvost a425e4b487
Fix pin repr in solver error messages (#3268)
* Add solver pin test

* Improve pin repr in SAT error messages
2024-04-09 17:15:37 +02:00
Antoine Prouvost 08d7b4e9cb
Don't add duplicate .conda and .tar.bz2 packages (#3253)
* Refactor signatures arg

* Remove set_solvables_with_sigs

* Fix optional signature type

* Change Database package type interface

* Change PackageType for libsolv parser

* Change PackageType for mamba parser

* Don't duplicate .conda and .tar.bz2 in mamba exe

* Fix error message disconnected graph
2024-03-29 12:07:35 +01:00
Antoine Prouvost 245de2009e
Update pre-commit hooks" (#3252)
* Update Pre-commit hooks

* Apply updated hook
2024-03-28 16:18:19 +01:00
Antoine Prouvost 327534724a
Refactor os utilities (#3248)
* Refactor make_virtual_package

* Refactor macos_version

* Add new windows_version

* Add __win virtual package version

* Use new util::windows_version

* Add virtual packages version test

* Add Plaform os detection

* Refactor linux_version

* Fix linux_version on mac with unix_name_version
2024-03-28 14:08:35 +01:00
Antoine Prouvost 7942d3feaf
Handle regex in build string (#3239) 2024-03-20 18:52:22 +01:00
Antoine Prouvost 43e38efb18
Custom resolve complex MatchSpec in Solver (#3233)
* Add ObjPool::current_error

* Support reference_wrapper in MatchSpec::contains

* Rename subdir > platform in solv-cpp

* Add Matcher as namespace callback

* Add MatcherFlags

* Redefine MatchSpec::is_simple

* Add VersionSpec::from_predicate

* Refactor reinstall jobs

* Fix MatchSpec::is_simple

* Handle complex MatchSpec in solver

* Add version cache in Matcher

* Add more pool namespace tests

* Handle exception in ObjPool callback

* Try removing SOLVABLE_PROVIDES

* Add unsolvable complex spec test

* Fix Database callback exceptions

* Add channel in Matcher

* Adapt channel_specific tests

* Fix updates
2024-03-19 19:52:56 +01:00
Antoine Prouvost 7125518164
Add MatchSpec::contains_except_channel" (#3231)
* Add MatchSpec::contains_except_channel

* Add MatchSpec::contains_except_channel overload

* Bind MatchSpec::contains_except_channel

* Add documentation for MatchSpec::contains
2024-03-13 16:37:25 +01:00
Hind-M ce840bbf8c
[mamba content trust] Enable verifying packages signatures (#3192)
* Enable verifying packages signatures

* Remove post hook and use LOG_DEBUG instead of LOG_INFO

* Move getting "signatures" from `pkg_signatures` to `verify_package`

* Add tests for solvable and PackageInfo
Remove signatures from field in PackageInfo

* Add const and reorganize repo_checker
Add text in description for verify-package flag

* Add bindings and make `trusted_channels` configurable

* Define MAX_CONDA_TIMESTAMP

* Code review

* Add tests for add_repo_from_repodata_json in test_database

* Remove fake_signatures in favor of optional
2024-03-08 20:37:18 +01:00
Antoine Prouvost c54ab6ce7b
Refactor MatchSpec::str (#3215)
* Add split_once_on_any

* Split MatchSpec::track_features

* Add VersionSpec::expression_size

* Add UnresolvedChannel::is_package

* Refactor MatchSpec::str to use fmt

* Forbid version of in MatchSpec in attributes

* Document more Conda discrepencies
2024-03-08 17:09:22 +01:00
Antoine Prouvost fd42d8dd8e
Subdir renaming (#3214)
* Rename PackageInfo::depends > dependencies

* Change BuildNumberSpec nuild number type

* Rename MatchSpec::subdirs > platforms

* Rename Platform > KnownPlatform

* Add DynamicPlatform alias

* Rename PackageInfo::subdir > platform

* Fix build platform

* Fix PackageInfo::platform on OSX
2024-03-05 16:31:54 +01:00
Antoine Prouvost 9965527410
Fully bind MatchSpec (#3213)
* Fix MatchSpec name_space bounds

* Bind MatchSpec to Python

* Add specs binding negative tests
2024-03-04 21:35:58 +01:00
Antoine Prouvost daccab0c0e
Add more MatchSpec tests (#3211)
* Refactor test_matchspec

* Add more MatchSpec tests
2024-03-04 16:55:41 +01:00
Antoine Prouvost 1f7b9de94f
Expected in specs parse API (#3207)
* Expected in CondaURL::parse

* Expected in Channel::resolve

* Expected in MatchSpec::parse

* Expected in MatchSpec::parse_url

* Return errors in exepcted in MatchSpec::parse

* Expected in PackageInfo::from_url
2024-03-04 14:27:04 +01:00
Antoine Prouvost 9141381ca3
Refactor MatchSpec::parse (#3205)
* Add find_not_in_parentheses with multiple parens

* Refactor MatchSpec URL with md5

* Refactor find_not_in_parentheses

* Refactor find_not_in_parentheses for genericity

* Use npos ins find_not_in_parentheses

* Add rfind_not_in_parentheses

* Use rfind_not_in_parentheses in MatchSpec

* Refactor chan ns spec split

* Allocation guard

* Refactor MatchSpec filename handling

* Remove MatchSpec::url

* Refactor MatchSpec::subdirs

* Refactor MatchSpec attribute parsing

* Flexible build and version setting

* Refactor find_matching_parenthesis

* Refactor find_matching_parenthesis

* Simplify parsers

* Add find_matching_parentheses with multiple parenthesese

* Add rfind_matching_parentheses

* Refactor MatchSpec section parsing

* Refacator MatchSpec name parsing

* Simplify version and build parsing
2024-02-29 09:42:25 +01:00
Johan Mabille 8f276cbefa
Added HTTP Mirrors (#3178)
* Added HTTP Mirrors

* Mirror mirror on the wall...

* True hope lies beyond the coast

* You're a damned kind can't you see

* That the winds will change

* Mirror mirror on the wall

* True hope lies beyond the coast

* You're a damned kind can't you see

* That tomorrow bears insanity
2024-02-27 18:47:30 +01:00