Skip to content

Commit 02570c8

Browse files
committed
fix(user-sync): drop python-dotenv, use default accounts.pwd.yaml
1 parent 4d6f440 commit 02570c8

3 files changed

Lines changed: 12 additions & 21 deletions

File tree

‎examples/user_sync.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
uv run python examples/user_sync.py --domain llm4eln.semos.dev --dry-run
55
"""
66

7-
import dotenv
8-
7+
from osw.defaults import paths
98
from osw.express import OswExpress
109
from osw.tools.user_sync import config_from_args, run_user_sync
1110

1211

1312
def main() -> None:
14-
dotenv.load_dotenv()
1513
config = config_from_args()
16-
osw = OswExpress(domain=config.domain, cred_filepath=config.cred_filepath)
14+
cred_filepath = config.cred_filepath
15+
if cred_filepath is None and paths.cred_filepath.is_file():
16+
# OswExpress only reads OSW_CRED_FILEPATH; use the default accounts file.
17+
cred_filepath = paths.cred_filepath
18+
osw = OswExpress(domain=config.domain, cred_filepath=cred_filepath)
1719
report = run_user_sync(config, osw=osw)
1820
print(report.summary())
1921
for title in report.created:

‎pyproject.toml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ workflow = [
8686
]
8787
tutorial = ["osw[dataimport]"]
8888
all = ["osw[dataimport,DB,UI,S3,wikitext]"]
89-
examples = [
90-
"python-dotenv>=1.2.4",
91-
]
9289

9390
[build-system]
9491
requires = ["hatchling"]

‎uv.lock‎

Lines changed: 6 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)