Skip to content

Commit

Permalink
Merge branch 'transformed_cube' of https://github.com/Ali-Tehrani/grid
Browse files Browse the repository at this point in the history
…into transformed_cube
  • Loading branch information
Ali-Tehrani committed May 16, 2023
2 parents cc4625e + a9f2a85 commit 435577e
Show file tree
Hide file tree
Showing 196 changed files with 4,223 additions and 1,007 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/ci.yml

This file was deleted.

110 changes: 110 additions & 0 deletions .github/workflows/ci_rob.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: CI Roberto
on:
push:
tags:
- '[1-9]+.[0-9]+.[0-9]+*'
branches:
- master
pull_request:
branches:
- master

jobs:
# These are quick tests using Python's venv on different Python versions.
test-venv:
timeout-minutes: 30
if: "! startsWith(github.ref, 'refs/tags')"
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python-version: 3.7
- os: ubuntu-latest
python-version: 3.8
- os: ubuntu-latest
python-version: 3.9
- os: macos-latest
python-version: 3.7
- os: macos-latest
python-version: 3.8
- os: macos-latest
python-version: 3.9

runs-on: ${{ matrix.os }}
env:
# Tell Roberto to upload coverage results
ROBERTO_UPLOAD_COVERAGE: 1
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Fetch base branch (usually master)
run: |
if [[ -n "${GITHUB_HEAD_REF}" ]]; then
git fetch origin ${GITHUB_BASE_REF} --depth=2
fi
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- uses: actions/cache@v2
with:
path: ~/.local/venvs
key: ${{ runner.os }}-Python-${{ matrix.python-version }}-venv
- name: Install Pip and Roberto
run: |
python -m pip install --upgrade pip
python -m pip install roberto>=2.0.0
- name: Test with Roberto
run: |
if [[ -n "${GITHUB_HEAD_REF}" ]]; then
ROBERTO_GIT_MERGE_BRANCH=${GITHUB_SHA} \
ROBERTO_GIT_BRANCH=${GITHUB_BASE_REF} \
python -m roberto
else
ROBERTO_TESTENV_USE=venv \
python -m roberto robot
fi
test-conda:
# This is a slow test in a Conda environment, including deployment of
# tagged releases.
timeout-minutes: 30
if: (github.ref == 'refs/heads/master') || startsWith(github.ref, 'refs/tags')
strategy:
fail-fast: false

runs-on: ubuntu-latest
env:
ROBERTO_UPLOAD_COVERAGE: 1
ROBERTO_PACKAGE_MANAGER: conda
ROBERTO_TESTENV_USE: conda
ROBERTO_DEPLOY_NOARCH: 1
TWINE_USERNAME: theochem
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v2
with:
path: |
~/miniconda3
!~/miniconda3/conda-bld
!~/miniconda3/locks
!~/miniconda3/pkgs
!~/miniconda3/var
!~/miniconda3/envs/*/conda-bld
!~/miniconda3/envs/*/locks
!~/miniconda3/envs/*/pkgs
!~/miniconda3/envs/*/var
key: ${{ runner.os }}-conda-3
- name: Install Roberto
run: |
python -m pip install roberto>=2.0.0
- name: Test and deploy with Roberto
run: |
python -m roberto robot
35 changes: 35 additions & 0 deletions .github/workflows/ci_tox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI Tox
on:
workflow_dispatch: # Needed to manually run github actions
push:
pull_request:
branches: [ master ]

jobs:
test:
name: test ${{ matrix.py }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false # If anything in the matrix fails, then everything queued and in-progress will canceled
matrix:
# Which environment and python versions to be runned on.
os: [ubuntu macos windows]
py: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
- name: Install tox-gh
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Setup test suite
run: tox r -vv --notest # r means run environments, -vv verbose --notest skip invoking test commands.
- name: Run test suite
# --skip-pkg-install skips installing the package
run: tox r --skip-pkg-install
env:
PYTEST_ADDOPTS: "-vv --durations=10"
72 changes: 71 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,40 @@
*.gz
*.png

# Prerequisites
*.d

# Compiled object files
*.slo
*.lo
*.o
*.obj

# Precompiled headers
*.gch
*.pch

# Compiled dynamic libraries
*.so
*.so.[0-9]*
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Ignore autogenerated version.py
grid/version.py

Expand All @@ -22,7 +56,6 @@ doc/tech_dev_git.rst

# Ignore (in-place) build results
cext.cpp
*.so
*.pyc
build
dist
Expand Down Expand Up @@ -57,3 +90,40 @@ qaworkdir

# Ignore tox
.tox


# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
.installed.cfg
*.egg-info/
*.egg
*.manifest
*.spec
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.pytest_cache/
20 changes: 20 additions & 0 deletions .roberto.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
absolute: true # Force absolute comparison for cardboardlint
project:
name: grid
# requirements: [[numpydoc, numpydoc], [sphinx-autoapi, sphinx-autoapi], [sphinxcontrib-bibtex, sphinxcontrib-bibtex]]
packages:
- dist_name: qc-grid
tools:
- write-py-version
# - cardboardlint-static
- build-py-inplace
- pytest
# - upload-codecov
# - cardboardlint-dynamic
# - build-sphinx-doc
# - upload-docs-gh
- build-py-source
- build-conda
- deploy-pypi
- deploy-conda
# - deploy-github
78 changes: 25 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,42 @@
# GRID
[![Build Status](https://travis-ci.org/theochem/grid.svg?branch=master)](https://travis-ci.org/theochem/grid)
[![Build Status](https://dev.azure.com/yxt1991/Grid/_apis/build/status/theochem.grid?branchName=master)](https://dev.azure.com/yxt1991/Grid/_build/latest?definitionId=2&branchName=master)
[![codecov](https://codecov.io/gh/theochem/grid/branch/master/graph/badge.svg)](https://codecov.io/gh/theochem/grid)<br/>
# Grid

[![Python Version](https://img.shields.io/badge/python-3.6%2B-blue.svg)](https://docs.python.org/3/whatsnew/3.6.html)
[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://github.com/theochem/grid/blob/master/LICENSE)
[![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)](https://opensource.org/licenses/)
[![GitHub Actions CI Tox Status](https://github.com/theochem/grid/actions/workflows/ci_tox.yml/badge.svg?branch=master)](https://github.com/theochem/grid/actions/workflows/ci_tox.yml)
[![codecov](https://codecov.io/gh/theochem/grid/branch/master/graph/badge.svg)](https://codecov.io/gh/theochem/grid)
[![GitHub contributors](https://img.shields.io/github/contributors/theochem/grid.svg)](https://github.com/theochem/grid/graphs/contributors)
[![Code Style](https://img.shields.io/badge/code%20style-black-black.svg)](https://black.readthedocs.io/en/stable/)

## About
GRID is a pythonic numerical integral package. It derived from legacy HORTON 2 numerical integration module.
Grid is a simple, free, and open-source Python library for numerical integration, interpolation and differentiation.
Primarly intended for the quantum chemistry community to assist in density-functional (DFT) theory calculations,
including support for periodic boundary conditions.

Please visit [**Grid Documentation**](https://grid.qcdevs.org/) for more information with
examples about the software.

## Platform
GRID is a pure python package supporting `Windows`, `Linux` and `MacOS`.
To report any issues or ask questions, either [open an issue](
https://github.com/theochem/grid/issues/new) or email [[email protected]]().

## Functionality
* 1d integral
* 1d transformation
* Spherical integral
* Becke-Lebedev grid & Molecular integral
* Interpolation & differentiation
* General ODE solver and Poisson solver

## License
GRID is distributed under [GPL License version 3](https://github.com/theochem/grid/blob/master/LICENSE) (GPL v3).
## Citation
Please use the following citation in any publication using BFit library:

## Dependence
* Installation requirements: `numpy`, `scipy`, `importlib_resources`
* Testing requirement: `pytest`
* QA requirement: `tox`
> **"Grid: A Python Library for Molecular Integration, Interpolation, and More"**,
> X.D. Yang, A. Tehrani, L. Pujal, R. Hernández-Esparza,
> M. Chan, E. Vöhringer-Martinez, T. Verstraelen, F. Heidar-Zadeh, P. W. Ayers
> `REFERENCE <https://doi.org/TODO>`__.
## Installation
To install GRID to system:
```bash
pip install .
```
To run tests:
```bash
pytest --pyargs grid
```

## Local build and Testing
To install editable GRID locally:
```bash
pip install -e .
```
To run tests:
Installation via pip can be done by the following command:
```bash
pytest tests
pip install qc-grid
```

## Quality Assurance
To run QA locally:
Local installation can be done as:
```bash
tox
git clone https://github.com/theochem/grid.git
cd grid
pip install .
```

## Funding Acknowledgement
This software was developed using funding from a variety of international
sources including, but not limited to:
* Canarie
* the Canada Research Chairs
* Compute Canada
* the European Union's Horizon 2020 Marie Sklodowska-Curie Actions (Individual Fellowship No 800130)
* the Foundation of Scientific Research--Flanders (FWO)
* McMaster University
* the National Fund for Scientific and Technological Development of Chile (FONDECYT)
* the Natural Sciences and Engineering Research Council of Canada (NSERC)
* the Research Board of Ghent University (BOF)
* Sharcnet
Loading

0 comments on commit 435577e

Please sign in to comment.