Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/psf/black
rev: 22.3.0 # Use the latest stable version of Black
hooks:
- id: black
args: [--line-length=88] # Adjust line length as needed
- repo: https://github.com/pycqa/flake8
rev: 7.2.0 # pick a git hash / tag to point to
hooks:
- id: flake8
3 changes: 2 additions & 1 deletion dev_dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pytest
pytest-asyncio
pytest-mock
pytest-mock
pre-commit
63 changes: 63 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Scripts

This folder contains helpful scripts for development.

## Development Setup Scripts

Both of these scripts will create a Python environment based on the default version of `python` in your PATH. Ensure the version is at least 3.9 by running:

```bash
python --version
```

The virtual environment, by default, will created as a directory named `venv` that will be placed at the root of this project.

### Windows

Powershell needs to be set to allow running of scripts. Do this by opening PowerShell in admin mode and running:

```bash
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
```

Then, from the root directory, run:

```bash
. ./scripts/dev_setup.ps1
```

From the root of the project, you can activate the environment:

```bash
. ./venv/Scripts/activate
```

To deactivate:

```bash
deactivate
```

### Linux and macOS

From the root directory, run:

```bash
. ./scripts/dev_setup.sh
```

From the root of the project, you can activate the environment:

```bash
. ./venv/bin/activate
```

To deactivate:

```bash
deactivate
```

## Troubleshooting

If you encounter any issues, please create an issue on GitHub.
16 changes: 16 additions & 0 deletions scripts/dev_setup.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
python -m venv venv

. .\venv\Scripts\Activate.ps1

pip install -e ./libraries/microsoft-agents-activity/ --config-settings editable_mode=compat
pip install -e ./libraries/microsoft-agents-authentication-msal/ --config-settings editable_mode=compat
pip install -e ./libraries/microsoft-agents-copilotstudio-client/ --config-settings editable_mode=compat
pip install -e ./libraries/microsoft-agents-hosting-aiohttp/ --config-settings editable_mode=compat
pip install -e ./libraries/microsoft-agents-hosting-core/ --config-settings editable_mode=compat
pip install -e ./libraries/microsoft-agents-hosting-teams/ --config-settings editable_mode=compat
pip install -e ./libraries/microsoft-agents-storage-blob/ --config-settings editable_mode=compat
pip install -e ./libraries/microsoft-agents-storage-cosmos/ --config-settings editable_mode=compat

pip install -r dev_dependencies.txt

pre-commit install
16 changes: 16 additions & 0 deletions scripts/dev_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
python -m venv venv

. .\venv\bin\activate

pip install -e ./libraries/microsoft-agents-activity/ --config-settings editable_mode=compat
pip install -e ./libraries/microsoft-agents-authentication-msal/ --config-settings editable_mode=compat
pip install -e ./libraries/microsoft-agents-copilotstudio-client/ --config-settings editable_mode=compat
pip install -e ./libraries/microsoft-agents-hosting-aiohttp/ --config-settings editable_mode=compat
pip install -e ./libraries/microsoft-agents-hosting-core/ --config-settings editable_mode=compat
pip install -e ./libraries/microsoft-agents-hosting-teams/ --config-settings editable_mode=compat
pip install -e ./libraries/microsoft-agents-storage-blob/ --config-settings editable_mode=compat
pip install -e ./libraries/microsoft-agents-storage-cosmos/ --config-settings editable_mode=compat

pip install -r dev_dependencies.txt

pre-commit install