Skip to content

Commit d5b32a0

Browse files
Merge pull request #13 from huggingface/main
Merge HF
2 parents 8dea443 + 7927bca commit d5b32a0

113 files changed

Lines changed: 22493 additions & 3015 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Bug report
3+
about: The clearer your bug report, the faster it will be fixed!
4+
title: "[BUG]"
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**Code to reproduce the error**
14+
The simplest code snippet that produces your bug.
15+
16+
**Error logs (if any)**
17+
Provide error logs if there are any.
18+
19+
**Expected behavior**
20+
A clear and concise description of what you expected to happen.
21+
22+
**Packages version:**
23+
Run `pip freeze | grep smolagents` and paste it here.
24+
25+
**Additional context**
26+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Custom issue template
3+
about: Describe this issue template's purpose here.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Is this not possible with the current options.**
17+
Make sure to consider if what you're requesting can be done with current abstractions.
18+
19+
**Describe alternatives you've considered**
20+
A clear and concise description of any alternative solutions or features you've considered.
21+
22+
**Additional context**
23+
Add any other context or screenshots about the feature request here.

.github/workflows/build_documentation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
commit_sha: ${{ github.sha }}
2121
package: smolagents
2222
languages: en
23+
notebook_folder: smolagents_doc
2324
# additional_args: --not_python_module # use this arg if repository is documentation only
2425
secrets:
2526
token: ${{ secrets.HUGGINGFACE_PUSH }}

.github/workflows/tests.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434
# Run all tests separately for individual feedback
3535
# Use 'if success() || failure()' so that all tests are run even if one failed
3636
# See https://stackoverflow.com/a/62112985
37+
- name: Import tests
38+
run: |
39+
uv run pytest ./tests/test_import.py
40+
if: ${{ success() || failure() }}
41+
3742
- name: Agent tests
3843
run: |
3944
uv run pytest ./tests/test_agents.py
@@ -58,14 +63,24 @@ jobs:
5863
uv run pytest ./tests/test_models.py
5964
if: ${{ success() || failure() }}
6065

66+
- name: Memory tests
67+
run: |
68+
uv run pytest ./tests/test_memory.py
69+
if: ${{ success() || failure() }}
70+
6171
- name: Monitoring tests
6272
run: |
6373
uv run pytest ./tests/test_monitoring.py
6474
if: ${{ success() || failure() }}
6575

66-
- name: Python interpreter tests
76+
- name: Local Python executor tests
6777
run: |
68-
uv run pytest ./tests/test_python_interpreter.py
78+
uv run pytest ./tests/test_local_python_executor.py
79+
if: ${{ success() || failure() }}
80+
81+
- name: E2B executor tests
82+
run: |
83+
uv run pytest ./tests/test_e2b_executor.py
6984
if: ${{ success() || failure() }}
7085

7186
- name: Search tests
@@ -78,6 +93,11 @@ jobs:
7893
uv run pytest ./tests/test_tools.py
7994
if: ${{ success() || failure() }}
8095

96+
- name: Tool validation tests
97+
run: |
98+
uv run pytest ./tests/test_tool_validation.py
99+
if: ${{ success() || failure() }}
100+
81101
- name: Types tests
82102
run: |
83103
uv run pytest ./tests/test_types.py
@@ -88,6 +108,11 @@ jobs:
88108
uv run pytest ./tests/test_utils.py
89109
if: ${{ success() || failure() }}
90110

111+
- name: Gradio UI tests
112+
run: |
113+
uv run pytest ./tests/test_gradio_ui.py
114+
if: ${{ success() || failure() }}
115+
91116
- name: Function type hints utils tests
92117
run: |
93118
uv run pytest ./tests/test_function_type_hints_utils.py

CONTRIBUTING.md

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,17 @@ However you choose to contribute, please be mindful and respect our
3333

3434
There are several ways you can contribute to smolagents.
3535

36-
* Fix outstanding issues with the existing code.
3736
* Submit issues related to bugs or desired new features.
3837
* Contribute to the examples or to the documentation.
38+
* Fix outstanding issues with the existing code.
3939

4040
> All contributions are equally valuable to the community. 🥰
4141
42-
## Fixing outstanding issues
43-
44-
If you notice an issue with the existing code and have a fix in mind, feel free to [start contributing](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) and open
45-
a Pull Request!
46-
4742
## Submitting a bug-related issue or feature request
4843

44+
At any moment, feel welcome to open an issue, citing your exact error traces and package versions if it's a bug.
45+
It's often even better to open a PR with your proposed fixes/changes!
46+
4947
Do your best to follow these guidelines when submitting a bug-related issue or a feature
5048
request. It will make it easier for us to come back to you quickly and with good
5149
feedback.
@@ -89,10 +87,41 @@ We're always looking for improvements to the documentation that make it more cle
8987
how the documentation can be improved such as typos and any content that is missing, unclear or inaccurate. We'll be
9088
happy to make the changes or help you make a contribution if you're interested!
9189

90+
## Fixing outstanding issues
91+
92+
If you notice an issue with the existing code and have a fix in mind, feel free to [start contributing](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) and open
93+
a Pull Request!
94+
95+
### Making code changes
96+
97+
To install dev dependencies, run:
98+
```
99+
pip install -e ".[dev]"
100+
```
101+
102+
When making changes to the codebase, please check that it follows the repo's code quality requirements by running:
103+
To check code quality of the source code:
104+
```
105+
make quality
106+
```
107+
108+
If the checks fail, you can run the formatter with:
109+
```
110+
make style
111+
```
112+
113+
And commit the changes.
114+
115+
To run tests locally, run this command:
116+
```bash
117+
make test
118+
```
119+
</details>
120+
92121
## I want to become a maintainer of the project. How do I get there?
93122

94123
smolagents is a project led and managed by Hugging Face. We are more than
95124
happy to have motivated individuals from other organizations join us as maintainers with the goal of helping smolagents
96125
make a dent in the world of Agents.
97126

98-
If you are such an individual (or organization), please reach out to us and let's collaborate.
127+
If you are such an individual (or organization), please reach out to us and let's collaborate.

0 commit comments

Comments
 (0)