Skip to content

Commit

Permalink
Merge branch 'master' into enable_using_check_functions_on_gzipped_fi…
Browse files Browse the repository at this point in the history
…les_for_VASP
  • Loading branch information
shyuep authored Jun 24, 2024
2 parents 363f8b5 + 2412b87 commit 8769c8f
Show file tree
Hide file tree
Showing 1,155 changed files with 76,348 additions and 247,944 deletions.
17 changes: 17 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "en-US"
early_access: false
reviews:
request_changes_workflow: false
high_level_summary: false
poem: false
review_status: false
collapse_walkthrough: false
auto_review:
enabled: true
ignore_title_keywords:
- "WIP"
- "DO NOT MERGE"
drafts: false
chat:
auto_reply: true
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# declare HTML, rST and test files as vendored/docs to exclude them when calculating repo languages on GitHub
**/tests/files/**/* linguist-vendored
docs/**/* linguist-documentation
28 changes: 28 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
changelog:
exclude:
authors: [dependabot, github-actions, pre-commit-ci]
categories:
- title: 🎉 New Features
labels: [feature]
- title: 🐛 Bug Fixes
labels: [fix]
- title: 🛠 Enhancements
labels: [enhancement, DX, UX]
- title: 📖 Documentation
labels: [docs]
- title: 🧹 House-Keeping
labels: [housekeeping]
- title: 🚀 Performance
labels: [performance]
- title: 💡 Refactoring
labels: [refactor]
- title: 🧪 Tests
labels: [tests]
- title: 💥 Breaking Changes
labels: [breaking]
- title: 🔒 Security Fixes
labels: [security]
- title: 🏥 Package Health
labels: [pkg]
- title: 🤷‍♂️ Other Changes
labels: ["*"]
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Linting

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: pip

- name: Run pre-commit
run: |
pip install pre-commit
pre-commit run --all-files
42 changes: 0 additions & 42 deletions .github/workflows/linting.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/pytest.yml

This file was deleted.

47 changes: 11 additions & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,21 @@ on:
workflow_dispatch:

jobs:
build:
strategy:
max-parallel: 1
matrix:
os: [ubuntu-latest]
python-version: ['3.9']

runs-on: ${{ matrix.os }}
test:
# run test.yml first to ensure that the test suite is passing
uses: ./.github/workflows/test.yml

build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install OpenBabel
shell: bash -l {0}
run: conda install -c conda-forge openbabel

- name: Install dependencies
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-ci.txt
pip install -e .
- name: pytest
shell: bash -l {0}
env:
PMG_MAPI_KEY: ${{ secrets.PMG_MAPI_KEY }}
MPLBACKEND: "Agg"
run: |
pytest custodian --color=yes
- name: release
shell: bash -l {0}
run: |
pip install build twine
python -m build
twine upload --skip-existing dist/*.tar.gz
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
pip install setuptools wheel twine
python setup.py sdist bdist_wheel
twine upload --skip-existing dist/*.tar.gz
60 changes: 60 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Testing

on:
push:
branches: [master]
paths-ignore: [docs/**]
pull_request:
branches: [master]
paths-ignore: [docs/**]
workflow_dispatch:
# make this workflow reusable by release.yml
workflow_call:

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
# not testing on 3.9 because tests use glob("*", root_dir=TEST_FILES)
# and root_dir only added in 3.10
python-version: ["3.10", "3.12"]

runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml

- name: Install uv
run: pip install uv

- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
activate-environment: qchem

- name: Install OpenBabel
run: conda install -c conda-forge openbabel

- name: Install dependencies
run: uv pip install numpy==1.26.4 ; uv pip install -e '.[dev]' --system

- name: pytest
env:
PMG_MAPI_KEY: ${{ secrets.PMG_MAPI_KEY }}
MPLBACKEND: Agg
run: pytest --cov=custodian --color=yes tests

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ nosetests.xml
.mr.developer.cfg
.project
.pydevproject

_build
_site
Gemfile.lock
.DS_Store
docs/_build

Expand Down
57 changes: 19 additions & 38 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,55 +1,36 @@
exclude: ^(docs|.*test_files|cmd_line|dev_scripts)

default_language_version:
python: python3.8
exclude: ^(docs|tests/files)

ci:
autoupdate_schedule: monthly
skip: [mypy]
autofix_commit_msg: pre-commit auto-fixes
autoupdate_commit_msg: pre-commit autoupdate

repos:

- repo: https://github.com/PyCQA/autoflake
rev: v2.1.1
hooks:
- id: autoflake
args:
- --in-place
- --remove-unused-variables
- --remove-all-unused-imports
- --expand-star-imports
- --ignore-init-module-imports

- repo: https://github.com/asottile/pyupgrade
rev: v3.3.2
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.7
hooks:
- id: pyupgrade
args: [--py38-plus]
- id: ruff
args: [--fix, --ignore, D, --unsafe-fixes]
- id: ruff-format

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-yaml
exclude: pymatgen/analysis/vesta_cutoffs.yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.2.0
rev: v1.10.0
hooks:
- id: mypy
additional_dependencies: [types-requests]

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
stages: [commit, commit-msg]
exclude_types: [html]
additional_dependencies: [tomli] # needed to read pyproject.toml below py3.11
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 8769c8f

Please sign in to comment.