Skip to content

Commit

Permalink
Extend tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xhochy committed Jan 16, 2024
1 parent bb87ba3 commit aeb718c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions grayskull/strategy/py_toml.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ def __get_constrained_dep_dict(dep_spec: dict, dep_name: str):
)
elif m := re.match(r">=(\d)\.(\d+)", dep_spec["python"]):
python_selector = f" # [py>={m.group(1)}{m.group(2)}]"
elif m := re.match(r"\^(\d)\.(\d+)", dep_spec["python"]):
next_major = (int(m.group(1)) + 1) * 100
python_selector = f" # [py>={m.group(1)}{m.group(2)} and py<{next_major}]"
else:
raise ValueError(
f"Unsupported Python version expression: {dep_spec['python']}"
Expand Down
11 changes: 5 additions & 6 deletions tests/data/poetry/langchain-expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@ source:
build:
entry_points:
- langchain-server = langchain.server:main
noarch: python
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
number: 0

requirements:
host:
- python >=3.8,<4.0
- python
- poetry-core
- pip
run:
- python >=3.8.1,<4.0
- python
- pydantic >=1.0.0,<2.0.0
- sqlalchemy >=1.0.0,<2.0.0
- requests >=2.0.0,<3.0.0
Expand All @@ -44,14 +43,14 @@ requirements:
- beautifulsoup4 >=4.0.0,<5.0.0
- pytorch >=1.0.0,<2.0.0
- jinja2 >=3.0.0,<4.0.0
- tiktoken >=0.0.0,<1.0.0
- tiktoken >=0.0.0,<1.0.0 # [py>=39 and py<400]
- pinecone-client >=2.0.0,<3.0.0
- weaviate-client >=3.0.0,<4.0.0
- google-api-python-client 2.70.0
- wolframalpha 5.0.0
- anthropic >=0.2.2,<0.3.0
- qdrant-client >=1.0.4,<2.0.0
- tensorflow-text >=2.11.0,<3.0.0
- qdrant-client >=1.0.4,<2.0.0 # [py>=38]
- tensorflow-text >=2.11.0,<3.0.0 # [py>=310 and py<400]
- cohere >=3.0.0,<4.0.0
- openai >=0.0.0,<1.0.0
- nlpcloud >=1.0.0,<2.0.0
Expand Down

0 comments on commit aeb718c

Please sign in to comment.