Skip to content

Commit

Permalink
Reverts
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Sep 7, 2024
1 parent 8b95bf2 commit 2f3d26f
Show file tree
Hide file tree
Showing 23 changed files with 109 additions and 298 deletions.
224 changes: 105 additions & 119 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ authors = ["uv"]
license = "MIT OR Apache-2.0"

[workspace.dependencies]
thing = { path = "foo/bar/thing" }
cache-key = { path = "crates/cache-key" }
distribution-filename = { path = "crates/distribution-filename" }
distribution-types = { path = "crates/distribution-types" }
Expand Down
1 change: 0 additions & 1 deletion crates/uv-workspace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ itertools = { workspace = true }
anyhow = { workspace = true }
assert_fs = { version = "1.1.0" }
insta = { version = "1.39.0", features = ["filters", "json", "redactions"] }
predicates = { version = "3.0.4" }
regex = { workspace = true }
tempfile = { workspace = true }

Expand Down
69 changes: 3 additions & 66 deletions crates/uv-workspace/src/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1546,14 +1546,14 @@ impl<'env> From<&'env VirtualProject> for InstallTarget<'env> {
#[cfg(test)]
#[cfg(unix)] // Avoid path escaping for the unit tests
mod tests {
use insta::assert_json_snapshot;
use std::env;
use std::env::temp_dir;

use std::path::Path;

use anyhow::Result;
use assert_fs::fixture::ChildPath;
use assert_fs::prelude::*;
use insta::assert_json_snapshot;

use crate::workspace::{DiscoveryOptions, ProjectWorkspace};

Expand All @@ -1575,7 +1575,7 @@ mod tests {
}

async fn temporary_test(folder: &Path) -> (ProjectWorkspace, String) {
let project = ProjectWorkspace::discover(&folder, &DiscoveryOptions::default())
let project = ProjectWorkspace::discover(folder, &DiscoveryOptions::default())
.await
.unwrap();
let root_escaped = regex::escape(folder.to_string_lossy().as_ref());
Expand Down Expand Up @@ -1672,69 +1672,6 @@ mod tests {
});
}

#[tokio::test]
async fn albatross_project_excludes() {
let (project, root_escaped) = workspace_test("albatross-project-in-excluded").await;
let filters = vec![(root_escaped.as_str(), "[ROOT]")];
insta::with_settings!({filters => filters}, {
assert_json_snapshot!(
project,
{
".workspace.packages.*.pyproject_toml" => "[PYPROJECT_TOML]"
},
@r###"
{
"project_root": "[ROOT]/albatross-project-in-excluded",
"project_name": "albatross",
"workspace": {
"install_path": "[ROOT]/albatross-project-in-excluded",
"packages": {
"albatross": {
"root": "[ROOT]/albatross-project-in-excluded",
"project": {
"name": "albatross",
"version": "0.1.0",
"requires-python": ">=3.12",
"optional-dependencies": null
},
"pyproject_toml": "[PYPROJECT_TOML]"
}
},
"sources": {},
"pyproject_toml": {
"project": {
"name": "albatross",
"version": "0.1.0",
"requires-python": ">=3.12",
"optional-dependencies": null
},
"tool": {
"uv": {
"sources": null,
"workspace": {
"members": [
"packages/*"
],
"exclude": [
"excluded/*",
"packages/bird-feeder"
]
},
"managed": null,
"package": null,
"dev-dependencies": null,
"environments": null,
"override-dependencies": null,
"constraint-dependencies": null
}
}
}
}
}
"###);
});
}

#[tokio::test]
async fn albatross_root_workspace() {
let (project, root_escaped) = workspace_test("albatross-root-workspace").await;
Expand Down
1 change: 0 additions & 1 deletion projects/.python-version

This file was deleted.

Empty file removed projects/README.md
Empty file.
Empty file.
14 changes: 0 additions & 14 deletions projects/projects/product-a/project/pyproject.toml

This file was deleted.

2 changes: 0 additions & 2 deletions projects/projects/product-a/project/src/product_a/__init__.py

This file was deleted.

Empty file.
14 changes: 0 additions & 14 deletions projects/projects/product-b/project/pyproject.toml

This file was deleted.

2 changes: 0 additions & 2 deletions projects/projects/product-b/project/src/product_b/__init__.py

This file was deleted.

1 change: 0 additions & 1 deletion projects/projects/project-a/.python-version

This file was deleted.

Empty file.
6 changes: 0 additions & 6 deletions projects/projects/project-a/hello.py

This file was deleted.

7 changes: 0 additions & 7 deletions projects/projects/project-a/pyproject.toml

This file was deleted.

13 changes: 0 additions & 13 deletions projects/pyproject.toml

This file was deleted.

2 changes: 0 additions & 2 deletions projects/src/projects/__init__.py

This file was deleted.

24 changes: 0 additions & 24 deletions projects/uv.lock

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies = ["tqdm>=4,<5"]

[tool.uv.workspace]
members = ["packages/*"]
exclude = ["excluded/*", "packages/bird-feeder"]
exclude = ["excluded/*"]

[build-system]
requires = ["hatchling"]
Expand Down

0 comments on commit 2f3d26f

Please sign in to comment.