Skip to content

Commit

Permalink
Merge branch 'main' into feat/add_bond_types
Browse files Browse the repository at this point in the history
  • Loading branch information
daico007 committed Oct 23, 2023
2 parents 48c8fc5 + 882fd32 commit dfb9825
Show file tree
Hide file tree
Showing 67 changed files with 843 additions and 1,569 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ Please include a code snippet that can be used to reproduce this bug.

**Software versions**

- Which version of Foyer are you using? (`python -c "import foyer; print(foyer.version)"`)
- Which version of Foyer are you using? (`python -c "import foyer; print(foyer.__version__)"`)
- Which version of Python (`python --version`)?
- Which operating system?
135 changes: 135 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: CI

on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
schedule:
- cron: "0 0 * * *"

jobs:
test:
if: github.event.pull_request.draft == false
name: Foyer Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10"]
exclude:
- os: windows-latest
python-version: "3.9"

defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v3
name: Checkout Branch / Pull Request

- name: Install Mamba (Linux)
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev.yml
python-version: ${{ matrix.python-version }}
if: runner.os != 'Windows'

- name: Install Mamba (Windows)
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev-win.yml
python-version: ${{ matrix.python-version }}
if: runner.os == 'Windows'

- name: Install Package
run: python -m pip install -e .

- name: Test (OS -> ${{ matrix.os }} / Python -> ${{ matrix.python-version }})
run: python -m pytest -v -nauto --cov=foyer --cov-report=xml --cov-append --cov-config=setup.cfg --color yes --pyargs foyer

- name: Upload Coverage Report
uses: codecov/codecov-action@v2
with:
name: Foyer-Coverage
verbose: true
files: ./coverage.xml

bleeding-edge-test:
if: github.event.pull_request.draft == false
name: Bleeding Edge mosdef Tests for Foyer
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v3
name: Checkout Branch / Pull Request

- name: Install Mamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev.yml
python-version: "3.10"

- name: Clone mBuild and GMSO
run: |
git clone https://github.com/mosdef-hub/mbuild.git
git clone https://github.com/mosdef-hub/gmso.git
- name: Update Environment with mbuild/gmso Dependencies
run: |
micromamba update --name foyer-dev --file mbuild/environment.yml
micromamba update --name foyer-dev --file gmso/environment.yml
- name: Install Packages from Source
run: |
pip install -e mbuild
pip install -e gmso
pip install -e .
- name: Run Bleeding Edge Tests
run: |
python -m pytest -v -nauto --color yes --pyargs foyer
docker:
runs-on: ubuntu-latest
needs: test
name: Build Docker Image
if: ${{ false }}

steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Get Tagged Version
run: |
echo "DOCKER_TAGS=mosdef/foyer:${GITHUB_REF_NAME}, mosdef/foyer:stable" >> $GITHUB_ENV if: github.ref_type == 'tag'
- name: Get Push Version
run: |
echo "DOCKER_TAGS=mosdef/foyer:${GITHUB_REF_NAME}, mosdef/foyer:stable" >> $GITHUB_ENV if: github.ref_type == 'branch'
- name: Docker Image Info
run: |
echo Docker Image tags: ${DOCKER_TAGS}
- name: Build and Push
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ env.DOCKER_TAGS }}
41 changes: 41 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: "20 9 * * 4"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ python ]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
14 changes: 0 additions & 14 deletions .landscape.yaml

This file was deleted.

8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ ci:
submodules: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: 'setup.cfg'
- repo: https://github.com/psf/black
rev: 21.9b0
rev: 23.9.1
hooks:
- id: black
args: [--line-length=80]
- repo: https://github.com/pycqa/isort
rev: 5.9.3
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args: [--profile=black, --line-length=80]
- repo: https://github.com/pycqa/pydocstyle
rev: '6.1.1'
rev: '6.3.0'
hooks:
- id: pydocstyle
exclude: ^(foyer/tests/|docs/|devtools/|setup.py)
Expand Down
6 changes: 5 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
version: 2
formats:
- htmlzip
- pdf
conda:
environment: docs/docs-env.yml

build:
os: ubuntu-20.04
tools:
python: "mambaforge-4.10"
sphinx:
builder: html
configuration: docs/source/conf.py
Expand Down
118 changes: 118 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: >-
Foyer: A package for atom-typing as well as
applying and disseminating forcefields
message: >-
If you use this software, please cite it using the
metadata from this file and the preferred citation.
type: software
authors:
- given-names: Christoph
family-names: Klein
affiliation: "Vanderbilt University"
- given-names: "Andrew Z."
family-names: Summers
affiliation: "Vanderbilt University"
orcid: 'https://orcid.org/0000-0001-8477-3059'
- given-names: "Matthew W."
family-names: Thompson
affiliation: "Vanderbilt University"
orcid: 'https://orcid.org/0000-0002-1460-3983'
- given-names: "Justin B."
family-names: Gilmer
affiliation: "Vanderbilt University"
orcid: 'https://orcid.org/0000-0002-6915-5591'
- given-names: "Co D."
family-names: Quach
affiliation: "Vanderbilt University"
orcid: 'https://orcid.org/0000-0002-1255-4161'
- given-names: Umesh
family-names: Timalsina
affiliation: "Vanderbilt University"
orcid: 'https://orcid.org/0000-0002-5430-3993'
- given-names: Peter
family-names: Volgyesi
orcid: 'https://orcid.org/0000-0002-7478-4317'
affiliation: "Vanderbilt University"
- given-names: Janos
family-names: Sallai
affiliation: "Vanderbilt University"
- given-names: "Chris R."
family-names: Iacovella
affiliation: "Vanderbilt University"
orcid: 'https://orcid.org/0000-0003-0557-0427'
- given-names: Clare
family-names: McCabe
affiliation: "Vanderbilt University"
orcid: 'https://orcid.org/0000-0002-8552-9135'
- given-names: "Peter T."
family-names: Cummings
affiliation: "Vanderbilt University"
orcid: 'https://orcid.org/0000-0002-9766-2216'
identifiers:
- type: doi
value: 10.5281/zenodo.6229092
description: Zenodo Doi
repository-code: 'https://github.com/mosdef-hub/foyer'
url: 'https://foyer.mosdef.org'
repository: 'https://github.com/mosdef-hub/foyer'
repository-artifact: 'https://github.com/mosdef-hub/foyer/releases'
abstract: >-
Foyer is an open-source Python tool for defining
and applying force field atom-typing rules in a
format that is both human- and machine-readable. It
parametrizes chemical topologies, generating,
syntactically correct input files for various
simulation engines. Foyer provides a framework for
force field dissemination, helping to eliminate
ambiguity in atom-typing and improving
reproducibility.
keywords:
- atom-typing
- reproducibility
- 'TRUE'
- mosdef
- python
license: MIT
preferred-citation:
type: article
authors:
- given-names: Christoph
family-names: Klein
affiliation: "Vanderbilt University"
- given-names: "Andrew Z."
family-names: Summers
affiliation: "Vanderbilt University"
orcid: 'https://orcid.org/0000-0001-8477-3059'
- given-names: "Matthew W."
family-names: Thompson
affiliation: "Vanderbilt University"
orcid: 'https://orcid.org/0000-0002-1460-3983'
- given-names: "Justin B."
family-names: Gilmer
affiliation: "Vanderbilt University"
orcid: 'https://orcid.org/0000-0002-6915-5591'
- given-names: Clare
family-names: McCabe
affiliation: "Vanderbilt University"
orcid: 'https://orcid.org/0000-0002-8552-9135'
- given-names: "Peter T."
family-names: Cummings
affiliation: "Vanderbilt University"
orcid: 'https://orcid.org/0000-0002-9766-2216'
- given-names: Janos
family-names: Sallai
affiliation: "Vanderbilt University"
- given-names: "Chris R."
family-names: Iacovella
affiliation: "Vanderbilt University"
orcid: 'https://orcid.org/0000-0003-0557-0427'
title: "Formalizing atom-typing and the dissemination of force fields with foyer"
journal: "Comput. Mater. Sci."
volume: "167"
pages: "12"
year: "2019"
doi: "10.1016/j.commatsci.2019.05.026"
Loading

0 comments on commit dfb9825

Please sign in to comment.