modernize: add .env support, move to uv/ruff#5
Conversation
There was a problem hiding this comment.
Pull request overview
Modernizes the project’s tooling and packaging (uv + Ruff + Hatch) and adds dependency-free .env support to sec.load().
Changes:
- Add
.envparsing/loading to the secret lookup chain and add tests for parsing + loading. - Migrate packaging metadata to PEP 621 + Hatchling and replace Poetry/Pipenv/Travis with uv + GitHub Actions.
- Add Ruff configuration and new CI workflows for linting/formatting/tests.
Reviewed changes
Copilot reviewed 9 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
sec.py |
Adds .env parsing/loading helpers and updates load() lookup order. |
test_sec.py |
Adds tests for .env parsing/loading and updates load() tests to include .env. |
pyproject.toml |
Migrates to PEP 621 + Hatchling; defines uv dependency groups and Ruff config. |
uv.lock |
Introduces uv lockfile for reproducible dev dependencies. |
README.md |
Updates install/dev instructions for uv + Ruff; documents .env lookup step. |
AGENTS.md |
Adds repo-wide contributor/automation/tooling rules. |
.github/workflows/ci.yml |
Adds GitHub Actions CI (ruff + pytest) using uv. |
.github/workflows/publish.yml |
Updates PyPI publish workflow to use uv build + gh-action-pypi-publish. |
.gitignore |
Ignores .venv/. |
poetry.lock |
Removed (Poetry deprecation). |
Pipfile |
Removed (Pipenv deprecation). |
Pipfile.lock |
Removed (Pipenv deprecation). |
.travis.yml |
Removed (Travis deprecation). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
parisk
left a comment
There was a problem hiding this comment.
Great work! Left a few comments only for polishing.
akalipetis
left a comment
There was a problem hiding this comment.
@copilot update this PR according to comments
Agent-Logs-Url: https://github.com/withlogicco/sec/sessions/944106c0-4dad-4f0a-ba27-00cf483a133a Co-authored-by: akalipetis <788386+akalipetis@users.noreply.github.com>
Head branch was pushed to by a user without write access
parisk
left a comment
There was a problem hiding this comment.
Tests on Python 3.14 are crashing.
|
@copilot fix tests crashing on Python 3.14 Details``` ==================================== ERRORS ==================================== _________________________ ERROR collecting test_sec.py _________________________ /opt/hostedtoolcache/Python/3.14.4/x64/lib/python3.14/importlib/__init__.py:88: in import_module return _bootstrap._gcd_import(name[level:], package, level) :1406: in _gcd_import ??? :1371: in _find_and_load ??? :1342: in _find_and_load_unlocked ??? :938: in _load_unlocked ??? .venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:161: in exec_module source_stat, co = _rewrite_test(fn, self.config) .venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:355: in _rewrite_test rewrite_asserts(tree, source, fn_, config) .venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:418: in rewrite_asserts AssertionRewriter(module_path, config, source).run(mod) .venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:741: in run new.extend(self.visit(child)) /opt/hostedtoolcache/Python/3.14.4/x64/lib/python3.14/ast.py:506: in visit return visitor(node) .venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:872: in visit_Assert top_condition, explanation = self.visit(assert_.test) /opt/hostedtoolcache/Python/3.14.4/x64/lib/python3.14/ast.py:506: in visit return visitor(node) .venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:1055: in visit_Compare left_res, left_expl = self.visit(comp.left) /opt/hostedtoolcache/Python/3.14.4/x64/lib/python3.14/ast.py:506: in visit return visitor(node) .venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:1014: in visit_Call new_func, func_expl = self.visit(call.func) /opt/hostedtoolcache/Python/3.14.4/x64/lib/python3.14/ast.py:506: in visit return visitor(node) .venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:1046: in visit_Attribute value, value_expl = self.visit(attr.value) /opt/hostedtoolcache/Python/3.14.4/x64/lib/python3.14/ast.py:506: in visit return visitor(node) .venv/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:958: in visit_Name inlocs = ast.Compare(ast.Str(name.id), [ast.In()], [locs]) E AttributeError: module 'ast' has no attribute 'Str' =========================== short test summary info ============================ ERROR test_sec.py - AttributeError: module 'ast' has no attribute 'Str' !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! =============================== 1 error in 0.15s =============================== Error: Process completed with exit code 2. ``` |
Agent-Logs-Url: https://github.com/withlogicco/sec/sessions/7bce1972-78b4-4e84-b595-2e7d0185ed68 Co-authored-by: akalipetis <788386+akalipetis@users.noreply.github.com>
Head branch was pushed to by a user without write access
|
@copilot bump, all dependencies and make sure that the major version is stable |
Agent-Logs-Url: https://github.com/withlogicco/sec/sessions/1844509f-b251-40ec-9bb9-0331fd322e97 Co-authored-by: akalipetis <788386+akalipetis@users.noreply.github.com>
Updated in Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
No description provided.