generated from pypa/sampleproject
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-pytests
- Loading branch information
Showing
20 changed files
with
444 additions
and
316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,10 @@ | |
"version": "3.11" | ||
} | ||
} | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.black-formatter" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: Lint | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: psf/black@stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,7 @@ __pycache__/ | |
# due to using tox and pytest | ||
.tox | ||
.cache | ||
.venv/ | ||
.venv/ | ||
|
||
# Project specific files | ||
db.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,44 @@ | ||
# A sample Python project | ||
# Social Norms Trees | ||
Experiments on teaching social norms to autonomous agents. | ||
|
||
## Developer Setup | ||
|
||
Prerequisites: | ||
- Python 3.11+ | ||
- git | ||
|
||
Clone the repository: | ||
```bash | ||
git clone https://github.com/brown-ccv/social-norms-trees | ||
``` | ||
|
||
Enter the repository directory: | ||
```bash | ||
cd social-norms-trees | ||
``` | ||
|
||
Create a virtual environment: | ||
```bash | ||
python3 -m venv .venv | ||
``` | ||
|
||
Activate the environment: | ||
```bash | ||
. .venv/bin/activate | ||
``` | ||
|
||
Install the package in editable mode for development: | ||
```bash | ||
pip install --editable ".[test]" | ||
``` | ||
|
||
Run the tests: | ||
```bash | ||
pytest | ||
``` | ||
|
||
Run the example experiment: | ||
```bash | ||
social-norms-trees examples/entering-a-room.json | ||
``` | ||
|
||
![Python Logo](https://www.python.org/static/community_logos/python-logo.png "Sample inline image") | ||
|
||
A sample project that exists as an aid to the [Python Packaging User | ||
Guide][packaging guide]'s [Tutorial on Packaging and Distributing | ||
Projects][distribution tutorial]. | ||
|
||
This project does not aim to cover best practices for Python project | ||
development as a whole. For example, it does not provide guidance or tool | ||
recommendations for version control, documentation, or testing. | ||
|
||
[The source for this project is available here][src]. | ||
|
||
The metadata for a Python project is defined in the `pyproject.toml` file, | ||
an example of which is included in this project. You should edit this file | ||
accordingly to adapt this sample project to your needs. | ||
|
||
---- | ||
|
||
This is the README file for the project. | ||
|
||
The file should use UTF-8 encoding and can be written using | ||
[reStructuredText][rst] or [markdown][md use] with the appropriate [key set][md | ||
use]. It will be used to generate the project webpage on PyPI and will be | ||
displayed as the project homepage on common code-hosting services, and should be | ||
written for that purpose. | ||
|
||
Typical contents for this file would include an overview of the project, basic | ||
usage examples, etc. Generally, including the project changelog in here is not a | ||
good idea, although a simple “What's New” section for the most recent version | ||
may be appropriate. | ||
|
||
[packaging guide]: https://packaging.python.org | ||
[distribution tutorial]: https://packaging.python.org/tutorials/packaging-projects/ | ||
[src]: https://github.com/pypa/sampleproject | ||
[rst]: http://docutils.sourceforge.net/rst.html | ||
[md]: https://tools.ietf.org/html/rfc7764#section-3.5 "CommonMark variant" | ||
[md use]: https://packaging.python.org/specifications/core-metadata/#description-content-type-optional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Example Experiments | ||
|
||
This directory includes configuration files for example experiments. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"context": "A nurse assistant robot in a hospital is taking medicine to Mrs. Jones during the day. The robot has already collected the medicine and enters the corridor outside Mrs. Jones' room. It needs to enter the room to take Mrs. Jones her medicine.", | ||
"behavior_tree": { | ||
"name": "", | ||
"type": "Sequence", | ||
"children": [ | ||
{ | ||
"name": "Approach the door", | ||
"type": "Behavior" | ||
}, | ||
{ | ||
"name": "Open the door", | ||
"type": "Behavior" | ||
}, | ||
{ | ||
"name": "Go through the doorway", | ||
"type": "Behavior" | ||
} | ||
] | ||
}, | ||
"behavior_library": [ | ||
{ | ||
"id": "anonymous-sequence", | ||
"display_name": "", | ||
"type": "Sequence", | ||
"show": false | ||
}, | ||
{ | ||
"id": "approach-door", | ||
"display_name": "Approach the door", | ||
"type": "Behavior", | ||
"show": true | ||
}, | ||
{ | ||
"id": "open-door", | ||
"display_name": "Open the door", | ||
"type": "Behavior", | ||
"show": true | ||
}, | ||
{ | ||
"id": "go-through-doorway", | ||
"display_name": "Go through the doorway", | ||
"type": "Behavior", | ||
"show": true | ||
}, | ||
{ | ||
"id": "knock-on-the-door", | ||
"display_name": "Knock on the door", | ||
"type": "Behavior", | ||
"show": true | ||
}, | ||
{ | ||
"id": "sing-a-song", | ||
"display_name": "Sing a song", | ||
"type": "Behavior", | ||
"show": true | ||
}, | ||
{ | ||
"id": "announce-your-presence", | ||
"display_name": "Announce your presence", | ||
"type": "Behavior", | ||
"show": true | ||
}, | ||
{ | ||
"id": "contact-supervisor-guidance", | ||
"display_name": "Contact supervisor for guidance", | ||
"type": "Behavior", | ||
"show": true | ||
}, | ||
{ | ||
"id": "stop", | ||
"display_name": "Stop", | ||
"type": "Behavior", | ||
"show": true | ||
}, | ||
{ | ||
"id": "return-to-charging-station", | ||
"display_name": "Return to charging station", | ||
"type": "Behavior", | ||
"show": false | ||
} | ||
] | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.