Skip to content

Commit

Permalink
Recovery commit
Browse files Browse the repository at this point in the history
  • Loading branch information
birdyLinch committed Nov 20, 2024
0 parents commit cfc466f
Show file tree
Hide file tree
Showing 302 changed files with 29,819 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
46 changes: 46 additions & 0 deletions .github/workflow/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Linting and code formatting

on: []
# Trigger the workflow on push or pull request,
# but only for the main branch
# push:
# branches: []
# pull_request:
# branches: []


jobs:
build-linux:
runs-on: ubuntu-latest

steps:
# Setup
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8.10
- name: Get cache
uses: actions/cache@v2
with:
path: /opt/hostedtoolcache/Python/3.8.10/x64/lib/python3.8/site-packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}

# Install packages
- name: Install packages required for installation
run: python -m pip install --upgrade pip setuptools wheel
- name: Install dependencies
run: pip install -r requirements.txt

# Check code
- name: Check formatting with yapf
run: python -m yapf --style=.style.yapf --diff --recursive .
# - name: Lint with flake8
# run: flake8 --config=.flake8 .
# - name: Check type annotations with mypy
# run: mypy --config-file=.mypy.ini .

- name: Test with pytest
run: python -m pytest tests
14 changes: 14 additions & 0 deletions .github/workflow/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Pre-Commit Checks

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0
29 changes: 29 additions & 0 deletions .github/workflow/unittest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: unit tests
on:
pull_request:
push:
branches: [main]

jobs:
pytest-container:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"

- name: Install requirements
run: |
pip install -U pip
pip install .[dev]
- name: Log installed environment
run: |
python3 -m pip freeze
- name: Run unit tests
run: |
pytest tests
46 changes: 46 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Linting and code formatting

on: []
# Trigger the workflow on push or pull request,
# but only for the main branch
# push:
# branches: []
# pull_request:
# branches: []


jobs:
build-linux:
runs-on: ubuntu-latest

steps:
# Setup
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8.10
- name: Get cache
uses: actions/cache@v2
with:
path: /opt/hostedtoolcache/Python/3.8.10/x64/lib/python3.8/site-packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}

# Install packages
- name: Install packages required for installation
run: python -m pip install --upgrade pip setuptools wheel
- name: Install dependencies
run: pip install -r requirements.txt

# Check code
- name: Check formatting with yapf
run: python -m yapf --style=.style.yapf --diff --recursive .
# - name: Lint with flake8
# run: flake8 --config=.flake8 .
# - name: Check type annotations with mypy
# run: mypy --config-file=.mypy.ini .

- name: Test with pytest
run: python -m pytest tests
45 changes: 45 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
build/
*.egg-info/

# pytest
.pytest_cache/

# mypy
.mypy_cache/

# IDE
.idea/
.vscode/
*.txt
*.log
*.out

# Distribution
dist/

# Jupyter Notebook
.ipynb_checkpoints

# DS_Store
.DS_Store
*.models
*.pt
/wandb
*.xyz
/checkpoints
*.model
/results
/logs

# plots
*.png
*.gif

cache_files/
creat_links.sh
39 changes: 39 additions & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[mypy]
# Platform configuration
python_version = 3.8

# Untyped definitions and calls
check_untyped_defs = True

[mypy-mace.tools.torch_geometric.*]
ignore_errors = True

[mypy-mace.tools.scatter]
ignore_errors = True

[mypy-setuptools.*]
ignore_missing_imports = True

[mypy-e3nn.*]
ignore_missing_imports = True

[mypy-scipy.*]
ignore_missing_imports = True

[mypy-ase.*]
ignore_missing_imports = True

[mypy-prettytable.*]
ignore_missing_imports = True

[mypy-torch_ema.*]
ignore_missing_imports = True

[mypy-matplotlib.*]
ignore_missing_imports = True

[mypy-pandas.*]
ignore_missing_imports = True

[mypy-opt_einsum.*]
ignore_missing_imports = True
50 changes: 50 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.12.1
hooks:
- id: black
name: Black Formating

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: Sort imports

# Failing - to be investigated separately
# - repo: local
# hooks:
# - id: pylint
# name: Pylint Checks
# entry: pylint
# language: system
# types: [python]
# args:
# [
# "--rcfile=pyproject.toml",
# "mace",
# "tests",
# "scripts"
# ]

# - repo: local
# hooks:
# - id: mypy
# name: mypy type checks
# entry: mypy
# language: system
# types: [python]
# args:
# [
# --config-file=.mypy.ini,
# mace,
# tests,
# scripts
# ]

13 changes: 13 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
MIT License

Copyright (c) 2022 ACEsuit/mace

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Loading

0 comments on commit cfc466f

Please sign in to comment.