Skip to content

Commit

Permalink
Adding in new formatting guidelines / tools.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucaweihs committed May 3, 2024
1 parent 90fd880 commit 46c7445
Show file tree
Hide file tree
Showing 9 changed files with 270 additions and 392 deletions.
6 changes: 6 additions & 0 deletions .csharpierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
unity/Dependencies/
unity/Assets/MagicMirror
unity/Assets/MessagePack
unity/Assets/MIConvexHull
unity/Assets/Priority Queue
unity/Assets/Plugins
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ csharp_prefer_braces = true:error

[*.cs]
indent_size = 4
insert_final_newline = true

# Newline settings
csharp_new_line_before_open_brace = none
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/black.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@23.12.1 # If version changed, update requirements-dev.txt
22 changes: 22 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Contributing

We welcome contributions from the greater community. If you would like to make such a contributions we recommend first submitting an [issue](https://github.com/allenai/ai2thor/issues) describing your proposed improvement. Doing so can ensure we can validate your suggestions before you spend a great deal of time upon them. Improvements and bug fixes should be made via a pull request from your fork of the repository at [https://github.com/allenai/ai2thor](https://github.com/allenai/ai2thor).

All code in pull requests should adhere to the following guidelines.

## Found a bug or want to suggest an enhancement?

Please submit an [issue](https://github.com/allenai/ai2thor/issues) in which you note the steps
to reproduce the bug or in which you detail the enhancement.

## Making a pull request?

When making a pull request we require that any code respects the following guidelines.

### Auto-formatting

All Python and C# must be auto-formatted. To do this, simply run
```bash
invoke format
```
from the root of the repository.
21 changes: 21 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[tool.black]
line-length = 100

include = '\.pyi?$'

exclude = '''
(
__pycache__
| \.git
| \.mypy_cache
| \.pytest_cache
| \.vscode
| \.venv
| \bdist\b
| \bdoc\b
)
'''

[tool.isort]
profile = "black"
multi_line_output = 3
8 changes: 8 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
pytest
pytest-timeout
pytest-cov
jsonschema
shapely
pytest-mock
dictdiffer
black==23.12.1 # If version changed, update .github/workflows/black.yaml
7 changes: 0 additions & 7 deletions requirements-test.txt

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _read_reqs(relpath):
]

REQUIREMENTS = _read_reqs("requirements.txt")
REQUIREMENTS_TEST = _read_reqs("requirements-test.txt")
REQUIREMENTS_TEST = _read_reqs("requirements-dev.txt")

setup(
name="ai2thor",
Expand Down
Loading

0 comments on commit 46c7445

Please sign in to comment.