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

feat/array of tables support #10

Merged
merged 26 commits into from
Jan 3, 2025

Conversation

blast-hardcheese
Copy link
Contributor

  • Simplifying Op
  • Unifying path and dotted_path, dotted_path is slated for removal for being a duplicate of path
  • Permitting path to be optional, enabling top-level table literals
  • Adding /[[]] syntax to table_header_path
  • Moving table_header_adder tests to adder to ensure coverage

Copy link
Contributor

@rmehri01 rmehri01 left a comment

Choose a reason for hiding this comment

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

Thanks for adding this! For our use case in replit/upm#323, I think we'd need some way to check that [[tool.uv.index]] already contains pytorch-cpu so we don't end up adding it multiple times right?

src/adder.rs Outdated Show resolved Hide resolved
@blast-hardcheese
Copy link
Contributor Author

@rmehri01 That's already supported, fortunately:

Given:

[project]
name = "beep"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = []

[tool.uv.sources]
torch = "[{ \"index\": \"pytorch-cpu\", \"marker\": \"platform_system == 'Linux'\"}]"
torchvision = "[{ \"index\": \"pytorch-cpu\", \"marker\": \"platform_system == 'Linux'\"}]"

[[tool.uv.index]]
name = "pytorch-cpu"
$ jq -c -n '[{op: "get", path: "tool/uv/index"}]' | cargo run -- --path ./pyproject.toml

yields

{"status":"success","message":null,"results":[[{"name":"pytorch-cpu"}]]}

@blast-hardcheese blast-hardcheese merged commit 040f3d2 into main Jan 3, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants