-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
207 Refactor RecipeParserDeps
#209
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ent dependency section
schuylermartin45
added
bug
Something isn't working
enhancement
New feature or request
labels
Oct 18, 2024
beeankha
approved these changes
Oct 21, 2024
ForgottenProgramme
pushed a commit
that referenced
this pull request
Nov 6, 2024
* Renames RecipeParserDeps -> RecipeReaderDeps * Renames RecipeParserDeps -> RecipeReaderDeps * Fleshes-out initial utility functions in the new RecipeParserDeps class * Improves SelectorParser capabilities * Adds selector management to the add_dependency() function * Adds unit test for selector rendering * Added SelectorParser type variant to test_add_selector() * Adds initial RecipeParserDeps unit tests * Adds initial multi-output add_dependency() test variants * Adds unit tests for remove_dependency() * Adds invalid path tests to test_add_dependency() * Adds alternative DependencyMode unit tests to test_add_dependency() * Adds missing invalid path checks for test_add_dependency() * Adds more edge-case unit tests to test_add_dependency() * Fixes patch-add append edge case * Adds missing unit test for adding a dependency to a non-existent dependency section * Adds another missing unit test for adding a dependency to a non-existent dependency section
schuylermartin45
added a commit
that referenced
this pull request
Nov 6, 2024
* add bump-recipe command * fix type error * add test * fix failing tests * Update conda_recipe_manager/commands/bump_recipe.py Co-authored-by: Schuyler Martin <schuylermartin45@gmail.com> * add some suggestions from the code review * more changes based on previous code review * check if the build number was actually incremented * parametrize the test * Update tests/commands/test_bump_recipe.py Co-authored-by: Schuyler Martin <schuylermartin45@gmail.com> * Update tests/commands/test_bump_recipe.py Co-authored-by: Schuyler Martin <schuylermartin45@gmail.com> * Update tests/commands/test_bump_recipe.py Co-authored-by: Schuyler Martin <schuylermartin45@gmail.com> * Update tests/commands/test_bump_recipe.py Co-authored-by: Schuyler Martin <schuylermartin45@gmail.com> * Update tests/commands/test_bump_recipe.py Co-authored-by: Schuyler Martin <schuylermartin45@gmail.com> * Update `convert` to properly handle complex Jinja expressions (#176) * Add tilde to _JINJA_VAR_FUNCTION_PATTERN * Create V0_FORBIDDEN_JINJA constant and check for strings containing them when converting recipes * Add exception for when Jinja syntax that is too complex to convert is detected * Make the linter happy * Change name of V0_UNSUPPORTED_JINJA constant * Log 'complex Jinja' warning with the MessageTable instance instead of throwing an exception * Add more unsupported Jinja to regression_jinja_sub.yaml test recipe file to catch new warning in test * Simplify warning message and update related test * Fixes #186: Parser cannot handle addition in JINJA replacements (#191) * Fixes #186 and adds some support for JINJA addition/concatenation * Adds unit tests for JINJA addition/concatentation evaluations * Python code Dependency Scanner Prototype (#180) * Initial blueprint for dependency scanning module * Starts to adapt work from abandonned dependency CLI branch * Finishes initial work on pulling module names as dependencies * Adds local module filtering * Adds dependency type support to PythonDependencyScanner * Adds MessageTable instance to base dependency class * Adds missing docs * Minor fixes * Adds note about scanning performance * Addresses linter and analyzer issues * Adds initial dependency scanning unit test * Adds ignore line to dummy project file * Improves unit test coverage * Updates recipe file to ignore test data directory * Adds support for multiple imports on one line * Add __init__ files to all test directories (#192) * v0.3.0 commit (#193) * Forgot to include some minor changes in the v0.3.0 release commit (#194) * Updates the recipe doc link (#195) * Fixes #197 and adds regression tests. Partially fixes #190 (#199) * Removes missed debug statement (#200) * 🤖 updated file(s) (#201) * v0.3.1 (#202) * Removes conda-forge channel (#204) * Test the `MessageTable` class (#196) * Add test for all methods in MessageTable class from types.py * Split up/parametrize MessageTable unit tests * Parametrize the MessageTable class tests and expand test cases * Correct doc string formatting * 207 Refactor `RecipeParserDeps` (#209) * Renames RecipeParserDeps -> RecipeReaderDeps * Renames RecipeParserDeps -> RecipeReaderDeps * Fleshes-out initial utility functions in the new RecipeParserDeps class * Improves SelectorParser capabilities * Adds selector management to the add_dependency() function * Adds unit test for selector rendering * Added SelectorParser type variant to test_add_selector() * Adds initial RecipeParserDeps unit tests * Adds initial multi-output add_dependency() test variants * Adds unit tests for remove_dependency() * Adds invalid path tests to test_add_dependency() * Adds alternative DependencyMode unit tests to test_add_dependency() * Adds missing invalid path checks for test_add_dependency() * Adds more edge-case unit tests to test_add_dependency() * Fixes patch-add append edge case * Adds missing unit test for adding a dependency to a non-existent dependency section * Adds another missing unit test for adding a dependency to a non-existent dependency section * v0.3.2 (#210) * Fixes `numpy {{numpy}}` dependency bug (#214) * Fixes resilience issue with dependency_data_from_str() function also makes function names more consistent * Adds missing unit tests for dependency module * Removes outdated TODO comment * Adds regression testing for the numpy dependency parsing issue * v0.3.3 (#216) * v0.3.4 (#217) * Improves pytest config filter to be less aggressive (#223) * 🤖 updated file(s) (#226) * Incorporating user documentation feedback and simplifies the `Makefile` (#227) * Ignores another pytest deprecation * Simplifications and deprecations for the Makefile. The preferred method for installing CRM is through conda/conda-forge * Overhauls existing README documentation * Updates README TOC * More README doc work * More README improvements * Filling more doc gaps * Simplifies and automates the API documentaiton process * Update README.md Co-authored-by: Mahe Iram Khan <65779580+ForgottenProgramme@users.noreply.github.com> * Update README.md Co-authored-by: Mahe Iram Khan <65779580+ForgottenProgramme@users.noreply.github.com> * Update README.md Co-authored-by: Mahe Iram Khan <65779580+ForgottenProgramme@users.noreply.github.com> * Adds a contribution file * Update CONTRIBUTING.md --------- Co-authored-by: Mahe Iram Khan <65779580+ForgottenProgramme@users.noreply.github.com> * remove dangling else statements --------- Co-authored-by: Schuyler Martin <schuylermartin45@gmail.com> Co-authored-by: Bianca Henderson <bhenderson@anaconda.com> Co-authored-by: conda-bot <18747875+conda-bot@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #207
While developing another prototype, I noticed that we did not have an ability to add or remove
Dependency
objects in recipe files. I also noticed thatRecipeParserDeps
was not in line with the newParser/Reader
naming scheme.Hence this PR that contains:
RecipeParserDeps
->RecipeReaderDeps
RecipeParserDeps
that extends theRecipeReaderDeps
class and includes editing capabilitiesadd_dependency()
andremove_dependency()
functionsSelectorParser::render()
function.patch()
,SelctorParser
and other bug fixes found along the wayTODO Add V1 support
notices