Skip to content

Commit

Permalink
feat(otel): switch to honeycomb-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
vringar committed Jan 24, 2024
1 parent 3d0f060 commit 3f627f7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
3 changes: 1 addition & 2 deletions environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ dependencies:
- multiprocess=0.70.15
- mypy=1.8.0
- nodejs=20.9.0
- opentelemetry-api=1.22.0
- opentelemetry-sdk=1.22.0
- pandas=2.2.0
- pillow=10.2.0
- pip=23.3.2
Expand All @@ -43,6 +41,7 @@ dependencies:
- pip:
- dataclasses-json==0.6.3
- domain-utils==0.7.1
- honeycomb-opentelemetry==0.2.3b0
- jsonschema==4.21.1
- tranco==0.7.1
- types-pyyaml==6.0.12.12
Expand Down
3 changes: 1 addition & 2 deletions scripts/environment-unpinned.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ dependencies:
- leveldb
- multiprocess
- nodejs
- opentelemetry-api
- opentelemetry-sdk
- pandas
- pip
- pillow
Expand All @@ -35,3 +33,4 @@ dependencies:
- domain-utils
- dataclasses-json
- tranco
- honeycomb-opentelemetry==0.2.3b0
20 changes: 8 additions & 12 deletions scripts/prune-environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,21 @@ def iterate_deps(
break # break out of the sep loop to avoid duplicate entries


def split_off_pip_if_exists(env: dict[str, list[str]], has_pip: bool) -> list[str]:
return env["dependencies"][:-1] if has_pip else env["dependencies"]


deps_not_pip: List[str] = []
deps_pip: List[str] = []

env_unpinned_contains_pip = "pip" in env_unpinned["dependencies"][-1]
env_unpinned_dev_contains_pip = "pip" in env_unpinned_dev["dependencies"][-1]
iterate_deps(
env_pinned["dependencies"][:-1]
if env_unpinned_contains_pip or env_unpinned_dev_contains_pip
else env_pinned["dependencies"],
(
env_unpinned["dependencies"][:-1]
if env_unpinned_contains_pip
else env_unpinned["dependencies"]
)
+ (
env_unpinned_dev["dependencies"][:-1]
if env_unpinned_dev_contains_pip
else env_unpinned_dev["dependencies"]
split_off_pip_if_exists(
env_pinned, env_unpinned_contains_pip or env_unpinned_dev_contains_pip
),
split_off_pip_if_exists(env_unpinned, env_unpinned_contains_pip)
+ split_off_pip_if_exists(env_unpinned_dev, env_unpinned_dev_contains_pip),
deps_not_pip,
)

Expand Down
1 change: 0 additions & 1 deletion scripts/repin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Darwin)
;;
esac


# Export the environment including manually specify channels
mamba env export --no-builds --override-channels -c conda-forge -c main -f ../environment.yaml

Expand Down

0 comments on commit 3f627f7

Please sign in to comment.