y_agent_environment 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- y_agent_environment-0.4.0/.github/actions/setup-python-env/action.yml +30 -0
- y_agent_environment-0.4.0/.github/workflows/main.yml +59 -0
- y_agent_environment-0.4.0/.github/workflows/on-release-main.yml +65 -0
- y_agent_environment-0.4.0/.github/workflows/validate-codecov-config.yml +15 -0
- y_agent_environment-0.4.0/.gitignore +140 -0
- y_agent_environment-0.4.0/.pre-commit-config.yaml +28 -0
- y_agent_environment-0.4.0/.python-version +1 -0
- y_agent_environment-0.4.0/.vscode/settings.json +3 -0
- y_agent_environment-0.4.0/CONTRIBUTING.md +122 -0
- y_agent_environment-0.4.0/LICENSE +28 -0
- y_agent_environment-0.4.0/Makefile +46 -0
- y_agent_environment-0.4.0/PKG-INFO +33 -0
- y_agent_environment-0.4.0/README.md +9 -0
- y_agent_environment-0.4.0/codecov.yaml +14 -0
- y_agent_environment-0.4.0/pyproject.toml +117 -0
- y_agent_environment-0.4.0/pytest.ini +4 -0
- y_agent_environment-0.4.0/tests/__init__.py +1 -0
- y_agent_environment-0.4.0/tests/conftest.py +200 -0
- y_agent_environment-0.4.0/tests/test_environment.py +236 -0
- y_agent_environment-0.4.0/tests/test_exceptions.py +82 -0
- y_agent_environment-0.4.0/tests/test_file_operator.py +691 -0
- y_agent_environment-0.4.0/tests/test_protocols.py +37 -0
- y_agent_environment-0.4.0/tests/test_resources.py +816 -0
- y_agent_environment-0.4.0/tests/test_utils.py +95 -0
- y_agent_environment-0.4.0/uv.lock +751 -0
- y_agent_environment-0.4.0/y_agent_environment/__init__.py +69 -0
- y_agent_environment-0.4.0/y_agent_environment/environment.py +341 -0
- y_agent_environment-0.4.0/y_agent_environment/exceptions.py +69 -0
- y_agent_environment-0.4.0/y_agent_environment/file_operator.py +917 -0
- y_agent_environment-0.4.0/y_agent_environment/protocols.py +316 -0
- y_agent_environment-0.4.0/y_agent_environment/resources.py +516 -0
- y_agent_environment-0.4.0/y_agent_environment/shell.py +86 -0
- y_agent_environment-0.4.0/y_agent_environment/types.py +27 -0
- y_agent_environment-0.4.0/y_agent_environment/utils.py +131 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: "Setup Python Environment"
|
|
2
|
+
description: "Set up Python environment for the given Python version"
|
|
3
|
+
|
|
4
|
+
inputs:
|
|
5
|
+
python-version:
|
|
6
|
+
description: "Python version to use"
|
|
7
|
+
required: true
|
|
8
|
+
default: "3.13"
|
|
9
|
+
uv-version:
|
|
10
|
+
description: "uv version to use"
|
|
11
|
+
required: true
|
|
12
|
+
default: "0.6.2"
|
|
13
|
+
|
|
14
|
+
runs:
|
|
15
|
+
using: "composite"
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: ${{ inputs.python-version }}
|
|
20
|
+
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@v5
|
|
23
|
+
with:
|
|
24
|
+
version: ${{ inputs.uv-version }}
|
|
25
|
+
enable-cache: 'true'
|
|
26
|
+
cache-suffix: ${{ matrix.python-version }}
|
|
27
|
+
|
|
28
|
+
- name: Install Python dependencies
|
|
29
|
+
run: uv sync --frozen --python=${{ matrix.python-version }}
|
|
30
|
+
shell: bash
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: Main
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
types: [opened, synchronize, reopened, ready_for_review]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
quality:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Check out
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- uses: actions/cache@v4
|
|
18
|
+
with:
|
|
19
|
+
path: ~/.cache/pre-commit
|
|
20
|
+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
|
|
21
|
+
|
|
22
|
+
- name: Set up the environment
|
|
23
|
+
uses: ./.github/actions/setup-python-env
|
|
24
|
+
|
|
25
|
+
- name: Run checks
|
|
26
|
+
run: make check
|
|
27
|
+
|
|
28
|
+
tests-and-type-check:
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
strategy:
|
|
31
|
+
matrix:
|
|
32
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
33
|
+
fail-fast: false
|
|
34
|
+
env:
|
|
35
|
+
UV_PYTHON: ${{ matrix.python-version }}
|
|
36
|
+
defaults:
|
|
37
|
+
run:
|
|
38
|
+
shell: bash
|
|
39
|
+
steps:
|
|
40
|
+
- name: Check out
|
|
41
|
+
uses: actions/checkout@v4
|
|
42
|
+
|
|
43
|
+
- name: Set up the environment
|
|
44
|
+
uses: ./.github/actions/setup-python-env
|
|
45
|
+
with:
|
|
46
|
+
python-version: ${{ matrix.python-version }}
|
|
47
|
+
|
|
48
|
+
- name: Run tests
|
|
49
|
+
run: uv run python -m pytest tests --cov --cov-config=pyproject.toml --cov-report=xml
|
|
50
|
+
|
|
51
|
+
- name: Check typing
|
|
52
|
+
run: uv run pyright
|
|
53
|
+
|
|
54
|
+
- name: Upload coverage reports to Codecov
|
|
55
|
+
uses: codecov/codecov-action@v5
|
|
56
|
+
with:
|
|
57
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
58
|
+
slug: wh1isper/y-agent-environment
|
|
59
|
+
if: ${{ matrix.python-version == '3.13'}}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: release-main
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: write
|
|
5
|
+
packages: write
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
release:
|
|
9
|
+
types: [published]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
set-version:
|
|
13
|
+
runs-on: ubuntu-24.04
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Export tag
|
|
18
|
+
id: vars
|
|
19
|
+
run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
|
|
20
|
+
if: ${{ github.event_name == 'release' }}
|
|
21
|
+
|
|
22
|
+
- name: Update project version
|
|
23
|
+
run: |
|
|
24
|
+
sed -i "s/^version = \".*\"/version = \"$RELEASE_VERSION\"/" pyproject.toml
|
|
25
|
+
env:
|
|
26
|
+
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
|
|
27
|
+
if: ${{ github.event_name == 'release' }}
|
|
28
|
+
|
|
29
|
+
- name: Upload updated pyproject.toml
|
|
30
|
+
uses: actions/upload-artifact@v4
|
|
31
|
+
with:
|
|
32
|
+
name: pyproject-toml
|
|
33
|
+
path: pyproject.toml
|
|
34
|
+
|
|
35
|
+
publish:
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
needs: [set-version]
|
|
38
|
+
steps:
|
|
39
|
+
- name: Check out
|
|
40
|
+
uses: actions/checkout@v4
|
|
41
|
+
|
|
42
|
+
- name: Set up the environment
|
|
43
|
+
uses: ./.github/actions/setup-python-env
|
|
44
|
+
|
|
45
|
+
- name: Download updated pyproject.toml
|
|
46
|
+
uses: actions/download-artifact@v4
|
|
47
|
+
with:
|
|
48
|
+
name: pyproject-toml
|
|
49
|
+
|
|
50
|
+
- name: Build package
|
|
51
|
+
run: uv build
|
|
52
|
+
|
|
53
|
+
- name: Publish package
|
|
54
|
+
run: uv publish
|
|
55
|
+
env:
|
|
56
|
+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
|
57
|
+
|
|
58
|
+
- name: Upload dists to release
|
|
59
|
+
uses: svenstaro/upload-release-action@v2
|
|
60
|
+
with:
|
|
61
|
+
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
62
|
+
file: dist/*
|
|
63
|
+
file_glob: true
|
|
64
|
+
tag: ${{ github.ref }}
|
|
65
|
+
overwrite: true
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name: validate-codecov-config
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
paths: [codecov.yaml]
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
validate-codecov-config:
|
|
11
|
+
runs-on: ubuntu-22.04
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- name: Validate codecov configuration
|
|
15
|
+
run: curl -sSL --fail-with-body --data-binary @codecov.yaml https://codecov.io/validate
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
docs/source
|
|
2
|
+
|
|
3
|
+
# From https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore
|
|
4
|
+
|
|
5
|
+
# Byte-compiled / optimized / DLL files
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*$py.class
|
|
9
|
+
|
|
10
|
+
# C extensions
|
|
11
|
+
*.so
|
|
12
|
+
|
|
13
|
+
# Distribution / packaging
|
|
14
|
+
.Python
|
|
15
|
+
build/
|
|
16
|
+
develop-eggs/
|
|
17
|
+
dist/
|
|
18
|
+
downloads/
|
|
19
|
+
eggs/
|
|
20
|
+
.eggs/
|
|
21
|
+
lib/
|
|
22
|
+
lib64/
|
|
23
|
+
parts/
|
|
24
|
+
sdist/
|
|
25
|
+
var/
|
|
26
|
+
wheels/
|
|
27
|
+
share/python-wheels/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
MANIFEST
|
|
32
|
+
|
|
33
|
+
# PyInstaller
|
|
34
|
+
# Usually these files are written by a python script from a template
|
|
35
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
36
|
+
*.manifest
|
|
37
|
+
*.spec
|
|
38
|
+
|
|
39
|
+
# Installer logs
|
|
40
|
+
pip-log.txt
|
|
41
|
+
pip-delete-this-directory.txt
|
|
42
|
+
|
|
43
|
+
# Unit test / coverage reports
|
|
44
|
+
htmlcov/
|
|
45
|
+
.tox/
|
|
46
|
+
.nox/
|
|
47
|
+
.coverage
|
|
48
|
+
.coverage.*
|
|
49
|
+
.cache
|
|
50
|
+
nosetests.xml
|
|
51
|
+
coverage.xml
|
|
52
|
+
*.cover
|
|
53
|
+
*.py,cover
|
|
54
|
+
.hypothesis/
|
|
55
|
+
.pytest_cache/
|
|
56
|
+
cover/
|
|
57
|
+
|
|
58
|
+
# Translations
|
|
59
|
+
*.mo
|
|
60
|
+
*.pot
|
|
61
|
+
|
|
62
|
+
# Django stuff:
|
|
63
|
+
*.log
|
|
64
|
+
local_settings.py
|
|
65
|
+
db.sqlite3
|
|
66
|
+
db.sqlite3-journal
|
|
67
|
+
|
|
68
|
+
# Flask stuff:
|
|
69
|
+
instance/
|
|
70
|
+
.webassets-cache
|
|
71
|
+
|
|
72
|
+
# Scrapy stuff:
|
|
73
|
+
.scrapy
|
|
74
|
+
|
|
75
|
+
# Sphinx documentation
|
|
76
|
+
docs/_build/
|
|
77
|
+
|
|
78
|
+
# PyBuilder
|
|
79
|
+
.pybuilder/
|
|
80
|
+
target/
|
|
81
|
+
|
|
82
|
+
# Jupyter Notebook
|
|
83
|
+
.ipynb_checkpoints
|
|
84
|
+
|
|
85
|
+
# IPython
|
|
86
|
+
profile_default/
|
|
87
|
+
ipython_config.py
|
|
88
|
+
|
|
89
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
90
|
+
__pypackages__/
|
|
91
|
+
|
|
92
|
+
# Celery stuff
|
|
93
|
+
celerybeat-schedule
|
|
94
|
+
celerybeat.pid
|
|
95
|
+
|
|
96
|
+
# SageMath parsed files
|
|
97
|
+
*.sage.py
|
|
98
|
+
|
|
99
|
+
# Environments
|
|
100
|
+
.env
|
|
101
|
+
.venv
|
|
102
|
+
env/
|
|
103
|
+
venv/
|
|
104
|
+
ENV/
|
|
105
|
+
env.bak/
|
|
106
|
+
venv.bak/
|
|
107
|
+
|
|
108
|
+
# Spyder project settings
|
|
109
|
+
.spyderproject
|
|
110
|
+
.spyproject
|
|
111
|
+
|
|
112
|
+
# Rope project settings
|
|
113
|
+
.ropeproject
|
|
114
|
+
|
|
115
|
+
# mkdocs documentation
|
|
116
|
+
/site
|
|
117
|
+
|
|
118
|
+
# mypy
|
|
119
|
+
.mypy_cache/
|
|
120
|
+
.dmypy.json
|
|
121
|
+
dmypy.json
|
|
122
|
+
|
|
123
|
+
# Pyre type checker
|
|
124
|
+
.pyre/
|
|
125
|
+
|
|
126
|
+
# pytype static type analyzer
|
|
127
|
+
.pytype/
|
|
128
|
+
|
|
129
|
+
# Cython debug symbols
|
|
130
|
+
cython_debug/
|
|
131
|
+
|
|
132
|
+
# Vscode config files
|
|
133
|
+
# .vscode/
|
|
134
|
+
|
|
135
|
+
# PyCharm
|
|
136
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
137
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
138
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
139
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
140
|
+
#.idea/
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: "v6.0.0"
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-case-conflict
|
|
6
|
+
- id: check-merge-conflict
|
|
7
|
+
- id: check-toml
|
|
8
|
+
- id: check-yaml
|
|
9
|
+
- id: check-json
|
|
10
|
+
exclude: ^.devcontainer/devcontainer.json
|
|
11
|
+
- id: pretty-format-json
|
|
12
|
+
exclude: ^.devcontainer/devcontainer.json
|
|
13
|
+
args: [--autofix]
|
|
14
|
+
- id: end-of-file-fixer
|
|
15
|
+
- id: trailing-whitespace
|
|
16
|
+
- repo: https://github.com/executablebooks/mdformat
|
|
17
|
+
rev: 1.0.0
|
|
18
|
+
hooks:
|
|
19
|
+
- id: mdformat
|
|
20
|
+
args: [--number]
|
|
21
|
+
additional_dependencies:
|
|
22
|
+
[mdformat-gfm, mdformat-front-matters, mdformat-footnote]
|
|
23
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
24
|
+
rev: "v0.14.14"
|
|
25
|
+
hooks:
|
|
26
|
+
- id: ruff
|
|
27
|
+
args: [--exit-non-zero-on-fix]
|
|
28
|
+
- id: ruff-format
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Contributing to `y_agent_environment`
|
|
2
|
+
|
|
3
|
+
Contributions are welcome, and they are greatly appreciated!
|
|
4
|
+
Every little bit helps, and credit will always be given.
|
|
5
|
+
|
|
6
|
+
You can contribute in many ways:
|
|
7
|
+
|
|
8
|
+
# Types of Contributions
|
|
9
|
+
|
|
10
|
+
## Report Bugs
|
|
11
|
+
|
|
12
|
+
If you are reporting a bug, please include:
|
|
13
|
+
|
|
14
|
+
- Your operating system name and version.
|
|
15
|
+
- Any details about your local setup that might be helpful in troubleshooting.
|
|
16
|
+
- Detailed steps to reproduce the bug.
|
|
17
|
+
|
|
18
|
+
## Fix Bugs
|
|
19
|
+
|
|
20
|
+
Look through the GitHub issues for bugs.
|
|
21
|
+
Anything tagged with "bug" and "help wanted" is open to whoever wants to implement a fix for it.
|
|
22
|
+
|
|
23
|
+
## Implement Features
|
|
24
|
+
|
|
25
|
+
Look through the GitHub issues for features.
|
|
26
|
+
Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.
|
|
27
|
+
|
|
28
|
+
## Write Documentation
|
|
29
|
+
|
|
30
|
+
y_agent_environment could always use more documentation, whether as part of the official docs, in docstrings, or even on the web in blog posts, articles, and such.
|
|
31
|
+
|
|
32
|
+
## Submit Feedback
|
|
33
|
+
|
|
34
|
+
If you are proposing a new feature:
|
|
35
|
+
|
|
36
|
+
- Explain in detail how it would work.
|
|
37
|
+
- Keep the scope as narrow as possible, to make it easier to implement.
|
|
38
|
+
- Remember that this is a volunteer-driven project, and that contributions
|
|
39
|
+
are welcome :)
|
|
40
|
+
|
|
41
|
+
# Get Started!
|
|
42
|
+
|
|
43
|
+
Ready to contribute? Here's how to set up `y_agent_environment` for local development.
|
|
44
|
+
Please note this documentation assumes you already have `uv` and `Git` installed and ready to go.
|
|
45
|
+
|
|
46
|
+
1. Fork the `y_agent_environment` repo on GitHub.
|
|
47
|
+
|
|
48
|
+
2. Clone your fork locally:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
cd <directory_in_which_repo_should_be_created>
|
|
52
|
+
git clone git@github.com:Wh1isper/y-agent-environment.git
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
3. Now we need to install the environment. Navigate into the directory
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
cd y_agent_environment
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Then, install and activate the environment with:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
uv sync
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
4. Install pre-commit to run linters/formatters at commit time:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
uv run pre-commit install
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
5. Create a branch for local development:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
git checkout -b name-of-your-bugfix-or-feature
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Now you can make your changes locally.
|
|
80
|
+
|
|
81
|
+
6. Don't forget to add test cases for your added functionality to the `tests` directory.
|
|
82
|
+
|
|
83
|
+
7. When you're done making changes, check that your changes pass the formatting tests.
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
make check
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Now, validate that all unit tests are passing:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
make test
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
9. Before raising a pull request you should also run tox.
|
|
96
|
+
This will run the tests across different versions of Python:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
tox
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
This requires you to have multiple versions of python installed.
|
|
103
|
+
This step is also triggered in the CI/CD pipeline, so you could also choose to skip this step locally.
|
|
104
|
+
|
|
105
|
+
10. Commit your changes and push your branch to GitHub:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
git add .
|
|
109
|
+
git commit -m "Your detailed description of your changes."
|
|
110
|
+
git push origin name-of-your-bugfix-or-feature
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
11. Submit a pull request through the GitHub website.
|
|
114
|
+
|
|
115
|
+
# Pull Request Guidelines
|
|
116
|
+
|
|
117
|
+
Before you submit a pull request, check that it meets these guidelines:
|
|
118
|
+
|
|
119
|
+
1. The pull request should include tests.
|
|
120
|
+
|
|
121
|
+
2. If the pull request adds functionality, the docs should be updated.
|
|
122
|
+
Put your new functionality into a function with a docstring, and add the feature to the list in `README.md`.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, wh1isper
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.PHONY: install
|
|
2
|
+
install: ## Install the virtual environment and install the pre-commit hooks
|
|
3
|
+
@echo "🚀 Creating virtual environment using uv"
|
|
4
|
+
@uv sync
|
|
5
|
+
@uv run pre-commit install
|
|
6
|
+
|
|
7
|
+
.PHONY: check
|
|
8
|
+
check: ## Run code quality tools.
|
|
9
|
+
@echo "🚀 Checking lock file consistency with 'pyproject.toml'"
|
|
10
|
+
@uv lock --locked
|
|
11
|
+
@echo "🚀 Linting code: Running pre-commit"
|
|
12
|
+
@uv run pre-commit run -a
|
|
13
|
+
@echo "🚀 Static type checking: Running pyright"
|
|
14
|
+
@uv run pyright
|
|
15
|
+
@echo "🚀 Checking for obsolete dependencies: Running deptry"
|
|
16
|
+
@uv run deptry .
|
|
17
|
+
|
|
18
|
+
.PHONY: test
|
|
19
|
+
test: ## Test the code with pytest
|
|
20
|
+
@echo "🚀 Testing code: Running pytest"
|
|
21
|
+
@uv run python -m pytest -vv --cov --cov-config=pyproject.toml --cov-report term-missing
|
|
22
|
+
|
|
23
|
+
.PHONY: build
|
|
24
|
+
build: clean-build ## Build wheel file
|
|
25
|
+
@echo "🚀 Creating wheel file"
|
|
26
|
+
@uvx --from build pyproject-build --installer uv
|
|
27
|
+
|
|
28
|
+
.PHONY: clean-build
|
|
29
|
+
clean-build: ## Clean build artifacts
|
|
30
|
+
@echo "🚀 Removing build artifacts"
|
|
31
|
+
@uv run python -c "import shutil; import os; shutil.rmtree('dist') if os.path.exists('dist') else None"
|
|
32
|
+
|
|
33
|
+
.PHONY: publish
|
|
34
|
+
publish: ## Publish a release to PyPI.
|
|
35
|
+
@echo "🚀 Publishing."
|
|
36
|
+
@uvx twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
|
|
37
|
+
|
|
38
|
+
.PHONY: build-and-publish
|
|
39
|
+
build-and-publish: build publish ## Build and publish.
|
|
40
|
+
|
|
41
|
+
.PHONY: help
|
|
42
|
+
help:
|
|
43
|
+
@uv run python -c "import re; \
|
|
44
|
+
[[print(f'\033[36m{m[0]:<20}\033[0m {m[1]}') for m in re.findall(r'^([a-zA-Z_-]+):.*?## (.*)$$', open(makefile).read(), re.M)] for makefile in ('$(MAKEFILE_LIST)').strip().split()]"
|
|
45
|
+
|
|
46
|
+
.DEFAULT_GOAL := help
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: y_agent_environment
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Environmental Abstraction for General Agent.
|
|
5
|
+
Project-URL: Repository, https://github.com/Wh1isper/y-agent-environment
|
|
6
|
+
Author-email: wh1isper <dev@wh1isper.com>
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Keywords: python
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Programming Language :: Python
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
|
+
Requires-Python: <4.0,>=3.10
|
|
19
|
+
Requires-Dist: anyio>=4.0.0
|
|
20
|
+
Requires-Dist: pathspec>=0.12.0
|
|
21
|
+
Requires-Dist: pydantic>=2.0.0
|
|
22
|
+
Requires-Dist: typing-extensions>=4.0.0
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# Agent Environment
|
|
26
|
+
|
|
27
|
+
[](https://img.shields.io/github/v/release/Wh1isper/y-agent-environment)
|
|
28
|
+
[](https://github.com/Wh1isper/y-agent-environment/actions/workflows/main.yml?query=branch%3Amain)
|
|
29
|
+
[](https://codecov.io/gh/Wh1isper/y-agent-environment)
|
|
30
|
+
[](https://img.shields.io/github/commit-activity/m/Wh1isper/y-agent-environment)
|
|
31
|
+
[](https://img.shields.io/github/license/Wh1isper/y-agent-environment)
|
|
32
|
+
|
|
33
|
+
Environmental Abstraction for the General Agent.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Agent Environment
|
|
2
|
+
|
|
3
|
+
[](https://img.shields.io/github/v/release/Wh1isper/y-agent-environment)
|
|
4
|
+
[](https://github.com/Wh1isper/y-agent-environment/actions/workflows/main.yml?query=branch%3Amain)
|
|
5
|
+
[](https://codecov.io/gh/Wh1isper/y-agent-environment)
|
|
6
|
+
[](https://img.shields.io/github/commit-activity/m/Wh1isper/y-agent-environment)
|
|
7
|
+
[](https://img.shields.io/github/license/Wh1isper/y-agent-environment)
|
|
8
|
+
|
|
9
|
+
Environmental Abstraction for the General Agent.
|