Skip to content
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

Refactors recipe conversion work #22

Merged
merged 10 commits into from
Apr 11, 2024
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ jobs:
conda activate conda-recipe-manager
conda install -y -c conda-forge rattler-build
convert -o recipe/recipe.yaml recipe/meta.yaml
rattler-build build -r recipe/
mkdir -p ../temp
rattler-build build -r recipe/ --output-dir=../temp
## Integration tests ##
integration-rattler:
runs-on: ubuntu-latest
Expand Down
7 changes: 4 additions & 3 deletions conda_recipe_manager/commands/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
File: convert.py
Description: CLI for converting an old recipe file to the "new" format.
"""

Copy link
Collaborator Author

@schuylermartin45 schuylermartin45 Apr 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

black got an update in pre-commit the other day, hence the change here and in other files.

from __future__ import annotations

import json
Expand All @@ -16,7 +17,7 @@

import click

from conda_recipe_manager.parser.recipe_parser import RecipeParser
from conda_recipe_manager.parser.recipe_parser_convert import RecipeParserConvert
from conda_recipe_manager.parser.types import MessageCategory, MessageTable

# Pre-CEP-13 name of the recipe file
Expand Down Expand Up @@ -112,9 +113,9 @@ def convert_file(file_path: Path, output: Optional[Path], print_output: bool) ->
conversion_result.msg_tbl.add_message(MessageCategory.EXCEPTION, e_msg)
return conversion_result

parser: RecipeParser
parser: RecipeParserConvert
try:
parser = RecipeParser(recipe_content)
parser = RecipeParserConvert(recipe_content)
except Exception as e: # pylint: disable=broad-exception-caught
e_msg = "EXCEPTION: An exception occurred while parsing the recipe file"
if print_output:
Expand Down
1 change: 1 addition & 0 deletions conda_recipe_manager/commands/rattler_bulk_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
File: rattler_bulk_build.py
Description: CLI tool that performs a bulk build operation for rattler-build.
"""

from __future__ import annotations

import json
Expand Down
1 change: 1 addition & 0 deletions conda_recipe_manager/parser/_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
File: _node.py
Description: Provides a private node class only used by the parser. This class is fundamental to tree formation.
"""

from __future__ import annotations

from typing import Optional
Expand Down
1 change: 1 addition & 0 deletions conda_recipe_manager/parser/_selector_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
File: _selector_info.py
Description: Provides the `SelectorInfo` class, used to store selector information.
"""

from __future__ import annotations

from typing import NamedTuple
Expand Down
1 change: 1 addition & 0 deletions conda_recipe_manager/parser/_traverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
File: py
Description: Provides tree traversal functions only used by the parser.
"""

from __future__ import annotations

from typing import Callable, Final, Optional
Expand Down
1 change: 1 addition & 0 deletions conda_recipe_manager/parser/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
File: _types.py
Description: Provides private types, type aliases, constants, and small classes used by the parser and related files.
"""

from __future__ import annotations

import re
Expand Down
1 change: 1 addition & 0 deletions conda_recipe_manager/parser/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
File: _utils.py
Description: Provides private utility functions only used by the parser.
"""

from __future__ import annotations

import json
Expand Down
1 change: 1 addition & 0 deletions conda_recipe_manager/parser/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
File: enums.py
Description: Provides enumerated types used by the parser.
"""

from __future__ import annotations

from enum import Enum
Expand Down
1 change: 1 addition & 0 deletions conda_recipe_manager/parser/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
File: exceptions.py
Description: Provides exceptions thrown by the parser.
"""

from __future__ import annotations

import json
Expand Down
Loading
Loading