Skip to content

Commit

Permalink
chore(dev-tools): remove unnecessary all extra (#8928)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored Apr 10, 2024
1 parent ab0eb57 commit 58e7573
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 61 deletions.
17 changes: 1 addition & 16 deletions .github/workflows/check-generated-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,8 @@ jobs:
- name: check consistency with pyproject.toml
run: poetry check --lock

- name: check that the `all` extra matches the current lock file
run: |
set -euo pipefail
js="$(mktemp --suffix=.pyproject.json)"
docker run --rm -i sclevine/yj -tj < pyproject.toml > "$js"
old="$(mktemp --suffix=.old)"
jq -rM '.tool.poetry.extras.all | unique | sort' < "$js" > "$old"
new="$(mktemp --suffix=.new)"
jq -rM '.tool.poetry.extras | with_entries(select(.key != "all")) | [.[]] | add | unique | sort' < "$js" > "$new"
diff --unified "$old" "$new"
- name: generate requirements-dev.txt
run: poetry export --extras all --with dev --with test --with docs --without-hashes --no-ansi > requirements-dev.txt
run: poetry export --all-extras --with dev --with test --with docs --without-hashes --no-ansi > requirements-dev.txt

- name: check requirements-dev.txt
run: git diff --exit-code requirements-dev.txt
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@

default = pkgs.ibis312;

inherit (pkgs) update-lock-files gen-all-extras gen-examples check-release-notes-spelling;
inherit (pkgs) update-lock-files gen-examples check-release-notes-spelling;
};

devShells = rec {
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ lock:
exit 1
fi
poetry lock --no-update
poetry export --extras all --with dev --with test --with docs --without-hashes --no-ansi > requirements-dev.txt
poetry export --all-extras --with dev --with test --with docs --without-hashes --no-ansi > requirements-dev.txt
# show all backends
@list-backends:
Expand Down
9 changes: 0 additions & 9 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,4 @@ in
python "$PWD/ibis/examples/gen_registry.py" "''${@}"
'';
};

gen-all-extras = pkgs.writeShellApplication {
name = "gen-all-extras";
runtimeInputs = with pkgs; [ yj jq ];
text = ''
echo -n 'all = '
yj -tj < pyproject.toml | jq -rM '.tool.poetry.extras | with_entries(select(.key != "all")) | [.[]] | add | unique | sort'
'';
};
}
5 changes: 2 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 0 additions & 31 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -140,37 +140,6 @@ leafmap = { version = ">=0.29.6,<0.31", python = ">=3.10,<3.13" }
lonboard = { version = "==0.4.0", python = ">=3.10,<3.13" }

[tool.poetry.extras]
# generate the `all` extra using nix run '.#gen-all-extras'
all = [
"black",
"clickhouse-connect",
"dask",
"datafusion",
"db-dtypes",
"deltalake",
"duckdb",
"fsspec",
"geopandas",
"google-cloud-bigquery",
"google-cloud-bigquery-storage",
"graphviz",
"impyla",
"oracledb",
"packaging",
"pins",
"polars",
"psycopg2",
"pydata-google-auth",
"pydruid",
"pyexasol",
"pymysql",
"pyodbc",
"pyspark",
"regex",
"shapely",
"snowflake-connector-python",
"trino",
]
bigquery = [
"db-dtypes",
"google-cloud-bigquery",
Expand Down

0 comments on commit 58e7573

Please sign in to comment.