-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e1cb42e
Showing
54 changed files
with
5,650 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: "MacOS | Python 3.12|3.11|3.10" | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
jobs: | ||
test: | ||
name: Python ${{ matrix.python-version }} | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.12", "3.11", "3.10"] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Run install script | ||
run: | | ||
chmod +x ./install.bash | ||
./install.bash | ||
- name: Cache packages | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-packages | ||
with: | ||
path: ~/Library/Caches/Homebrew | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('install.bash') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.cache-name }}- | ||
- name: Run tests | ||
run: | | ||
hatch run test |
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,61 @@ | ||
name: "Ubuntu" | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
ubuntu: | ||
name: ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, ubuntu-latest] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Run install script | ||
run: | | ||
chmod +x ./install.bash | ||
./install.bash | ||
- name: Cache packages | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-packages | ||
with: | ||
path: ~/.local/bin ~/.local/lib .mbodied/envs/mbodied | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('install.bash') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.cache-name }}- | ||
- name: Check disk usage | ||
run: df -h | ||
|
||
- name: Clean up before running tests | ||
run: | | ||
# Add commands to clean up unnecessary files | ||
sudo apt-get clean | ||
sudo rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d | ||
# Add more cleanup commands as needed | ||
- name: Check disk usage after cleanup | ||
run: df -h | ||
|
||
- name: Run tests | ||
run: | | ||
hatch run test |
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,191 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
/docs/generated | ||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# poetry | ||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. | ||
# This is especially recommended for binary packages to ensure reproducibility, and is more | ||
# commonly ignored for libraries. | ||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control | ||
#poetry.lock | ||
|
||
# pdm | ||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. | ||
#pdm.lock | ||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it | ||
# in version control. | ||
# https://pdm.fming.dev/#use-with-ide | ||
.pdm.toml | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
.logfire | ||
.pytest* | ||
.*_cache | ||
|
||
# Cython debug symbols | ||
cython_debug/ | ||
|
||
# PyCharm | ||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
.idea/ | ||
|
||
# Additionanl files | ||
*.hdf5 | ||
*.ckpt | ||
*.jsonl | ||
images/ | ||
*.zip | ||
dataset_cache/ | ||
*frames | ||
*.mp4 | ||
*.pt | ||
*.h5 | ||
*.gpt_runner | ||
.DS_Store | ||
outputs/* | ||
**/*/outs/**/* | ||
outs/ | ||
src/mbodied/outs | ||
.command_history* | ||
wandb/ | ||
# Additional files | ||
*.hdf5outputs/ | ||
.log | ||
.jpeg | ||
.jpg | ||
.tmp_listen* | ||
.tmp_speak* | ||
saved_datasets/ |
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,38 @@ | ||
# Contributing | ||
|
||
## Development Practices | ||
|
||
### Git Workflow | ||
|
||
To ensure a clean and linear project history, we enforce specific Git practices: | ||
|
||
### Commit Messages | ||
|
||
- Always use gitlens (preferred), easycode, or write good commit messages. | ||
|
||
|
||
### Pulling Changes | ||
|
||
Always try to pull with `--ff-only` or `--rebase` when pulling changes from the `main` branch: | ||
|
||
```bash | ||
git pull --rebase | ||
``` | ||
|
||
We recommend setting up your Git configuration as: | ||
|
||
```bash | ||
git config --global pull.ff only | ||
|
||
git config --global pull.rebase true | ||
|
||
``` | ||
|
||
### Style Guide | ||
|
||
1. Lint with Ruff | ||
2. Place tests in a dedicated tests/ directory, with each test file named with a test_ prefix. | ||
3. Prefix all test function names with test_ to enable Pytest to automatically identify and execute them. | ||
4. Use Google-style docstrings to document all public classes, methods, functions, and modules. | ||
5. Include an example usage in the docstring for each important class, method, and function. | ||
6. Pydantic models should be tested for json serialization, deserialization, and saving to h5 files. |
Oops, something went wrong.