-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reset project in preparation of re-write (#42)
- Loading branch information
1 parent
fcefc51
commit 0e349a3
Showing
51 changed files
with
448 additions
and
5,926 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
FROM --platform=linux/x86_64 condaforge/mambaforge:latest | ||
|
||
RUN apt update \ | ||
&& apt install -y git make build-essentials \ | ||
&& rm -rf /var/lib/apt/lists/* |
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,4 @@ | ||
{ | ||
"build": { "dockerfile": "Dockerfile" }, | ||
"postCreateCommand": "make env" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,62 +1,32 @@ | ||
name: CI | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
branches: | ||
- "main" | ||
schedule: | ||
- cron: "0 0 * * *" | ||
push: { branches: [ "main" ] } | ||
pull_request: { branches: [ "main" ] } | ||
|
||
jobs: | ||
test: | ||
|
||
name: ${{ matrix.os }} python=${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: [3.7] | ||
runs-on: ubuntu-latest | ||
container: condaforge/mambaforge:latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
|
||
- name: Setup Conda Environment | ||
uses: conda-incubator/setup-miniconda@v2.1.1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
environment-file: devtools/conda-envs/meta.yaml | ||
|
||
channels: conda-forge,defaults | ||
|
||
activate-environment: test | ||
auto-update-conda: true | ||
auto-activate-base: false | ||
show-channel-urls: true | ||
|
||
- name: Install Package | ||
shell: bash -l {0} | ||
run: | | ||
python setup.py develop --no-deps | ||
- name: Conda Environment Information | ||
shell: bash -l {0} | ||
run: | | ||
conda info | ||
conda list | ||
- uses: actions/checkout@v3.3.0 | ||
|
||
- name: Run Tests | ||
shell: bash -l {0} | ||
run: | | ||
pytest -v --cov=descent --cov-report=xml --color=yes descent/tests/ | ||
apt update && apt install -y git make | ||
make env | ||
make lint | ||
make test | ||
- name: CodeCov | ||
uses: codecov/codecov-action@v2.0.3 | ||
uses: codecov/codecov-action@v3.1.1 | ||
with: | ||
file: ./coverage.xml | ||
flags: unittests | ||
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} |
This file was deleted.
Oops, something went wrong.
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
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 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: isort | ||
name: "[Package] Import formatting" | ||
language: system | ||
entry: isort | ||
files: \.py$ | ||
|
||
- id: black | ||
name: "[Package] Code formatting" | ||
language: system | ||
entry: black | ||
files: \.py$ | ||
|
||
- id: flake8 | ||
name: "[Package] Linting" | ||
language: system | ||
entry: flake8 | ||
files: \.py$ | ||
|
||
- id: isort-examples | ||
name: "[Examples] Import formatting" | ||
language: system | ||
entry: nbqa isort | ||
files: examples/.+\.ipynb$ | ||
|
||
- id: black-examples | ||
name: "[Examples] Code formatting" | ||
language: system | ||
entry: nbqa black | ||
files: examples/.+\.ipynb$ | ||
|
||
- id: flake8-examples | ||
name: "[Examples] Linting" | ||
language: system | ||
entry: nbqa flake8 --ignore=E402 | ||
files: examples/.+\.ipynb$ |
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
This file was deleted.
Oops, something went wrong.
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,32 @@ | ||
PACKAGE_NAME := descent | ||
CONDA_ENV_RUN := conda run --no-capture-output --name $(PACKAGE_NAME) | ||
|
||
.PHONY: pip-install env lint format test test-examples | ||
|
||
pip-install: | ||
$(CONDA_ENV_RUN) pip install --no-build-isolation --no-deps -e . | ||
|
||
env: | ||
mamba create --name $(PACKAGE_NAME) | ||
mamba env update --name $(PACKAGE_NAME) --file devtools/envs/base.yaml | ||
$(CONDA_ENV_RUN) pip install --no-build-isolation --no-deps -e . | ||
$(CONDA_ENV_RUN) pre-commit install || true | ||
|
||
lint: | ||
$(CONDA_ENV_RUN) isort --check-only $(PACKAGE_NAME) | ||
$(CONDA_ENV_RUN) black --check $(PACKAGE_NAME) | ||
$(CONDA_ENV_RUN) flake8 $(PACKAGE_NAME) | ||
$(CONDA_ENV_RUN) nbqa isort --check-only examples | ||
$(CONDA_ENV_RUN) nbqa black --check examples | ||
$(CONDA_ENV_RUN) nbqa flake8 --ignore=E402 examples | ||
|
||
format: | ||
$(CONDA_ENV_RUN) isort $(PACKAGE_NAME) | ||
$(CONDA_ENV_RUN) black $(PACKAGE_NAME) | ||
$(CONDA_ENV_RUN) flake8 $(PACKAGE_NAME) | ||
$(CONDA_ENV_RUN) nbqa isort examples | ||
$(CONDA_ENV_RUN) nbqa black examples | ||
$(CONDA_ENV_RUN) nbqa flake8 --ignore=E402 examples | ||
|
||
test: | ||
$(CONDA_ENV_RUN) pytest -v --cov=$(PACKAGE_NAME) --cov-report=xml --color=yes $(PACKAGE_NAME)/tests/ |
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 |
---|---|---|
@@ -1,12 +1,10 @@ | ||
""" | ||
DESCENT | ||
descent | ||
Optimize force field parameters against QC data using `pytorch` | ||
Optimize classical force field parameters against reference data | ||
""" | ||
|
||
from ._version import get_versions | ||
from . import _version | ||
|
||
versions = get_versions() | ||
__version__ = versions["version"] | ||
__git_revision__ = versions["full-revisionid"] | ||
del get_versions, versions | ||
__version__ = _version.get_versions()["version"] | ||
__all__ = ["__version__"] |
Oops, something went wrong.