Skip to content

Commit

Permalink
More comments and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
marius-baseten committed Oct 28, 2024
1 parent e59b130 commit ca6b6f5
Show file tree
Hide file tree
Showing 9 changed files with 135 additions and 157 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-truss-utils.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Install poetry packages
working-directory: truss-utils
run: poetry install --no-dev
run: poetry install --extras=all

- name: Build
working-directory: truss-utils
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Truss was first created at [Baseten](https://baseten.co), but as an open and liv

We use GitHub features for project management on Truss:

* For bugs and feature requests, file an issue.
* For changes and updates, create a pull request.
* For bugs and feature requests, [file an issue](https://github.com/basetenlabs/truss/issues).
* For changes and updates, create a [pull request](https://github.com/basetenlabs/truss/pulls).
* To view and comment on the roadmap, [check the projects tab](https://github.com/orgs/basetenlabs/projects/3).

## Local development
Expand Down
8 changes: 0 additions & 8 deletions Dockerfile

This file was deleted.

15 changes: 14 additions & 1 deletion bin/pyproject_toml_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ def _populate_extras(pyproject_path: pathlib.Path) -> None:
extra_sections: DefaultDict[str, Set[str]] = collections.defaultdict(set)
all_deps: Set[str] = set()

for key in dependencies.keys():
for key, value in dependencies.items():
if isinstance(value, dict):
is_optional = value.get("optional", False)
else:
is_optional = False # Base dependencies.

if not is_optional:
continue

if key not in dependency_metadata:
raise ValueError(
f"`{key}` is missing in `[tool.dependency_metadata]`. "
Expand Down Expand Up @@ -46,6 +54,11 @@ def _populate_extras(pyproject_path: pathlib.Path) -> None:

extras_section["all"] = tomlkit.array()
extras_section["all"].extend(sorted(all_deps))
# TODO: this is temporary workaround until "local" is properly isolated.
# Goal is to guarantee full functionality of CLI if installed as
# `pip install truss[local]`.
extras_section["local"] = tomlkit.array()
extras_section["local"].extend(sorted(all_deps))

if "extras" not in content["tool"]["poetry"]:
raise ValueError("Expected section [tool.poetry.extras] to be present.")
Expand Down
3 changes: 1 addition & 2 deletions context_builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ COPY ./README.md ./README.md

# https://python-poetry.org/docs/configuration/#virtualenvsin-project
# to write to project root .venv file to be used for context builder test
RUN poetry config virtualenvs.in-project true \
&& poetry install --extras=image_builder
RUN poetry config virtualenvs.in-project true && poetry install --extras=all
9 changes: 0 additions & 9 deletions docs/contribute/contributing.md

This file was deleted.

38 changes: 0 additions & 38 deletions docs/contribute/setup.md

This file was deleted.

Loading

0 comments on commit ca6b6f5

Please sign in to comment.