Skip to content

Commit

Permalink
Patch 0.16.0 (#32)
Browse files Browse the repository at this point in the history
* Adding type hinting and some safety features

* Abandoning Python 3.6 for lack of type hinting in np routines

* Tuning test

* Adding element and refactoring molecule object

* Fixing safety guard

* Adding custom basis set interface

* Expanding unit test
  • Loading branch information
ifilot authored Jan 15, 2024
1 parent 0f4b87a commit bb63fae
Show file tree
Hide file tree
Showing 19 changed files with 2,889 additions and 199 deletions.
89 changes: 8 additions & 81 deletions COMPILATION.md
Original file line number Diff line number Diff line change
@@ -1,78 +1,23 @@
# Compilation details

## Compiling the Anaconda package on Windows
## Building

Install Microsoft Visual Studio Community Edition and modify the version
numbers and directory paths as provided in `setup.py`.
To create a wheel (`whl`), run

Create a clean environment using
```
conda create --name conda_build python=3.9 numpy conda-build
pipx run cibuildwheel --only cp310-manylinux_x86_64
```

and activate the environment with
```
conda activate conda_build
```

Start the compilation with
```
conda build .
```

## Compiling the Anaconda package on MacOS

The clang compiler of Apple does not support OpenMP, hence the easiest way to
get pyqint compiled is by using GCC as provided via HomeBrew. Below, a short
set of instructions is given.

Install [homebrew](https://brew.sh/)

Install gcc and boost

```bash
brew install gcc boost eigen
```

Compile the package via Anaconda build

```bash
conda build .
```

## Compilation for Linux/Anaconda on Windows using Docker

For the Windows terminal, I use Git Bash as readily available in
Git for Windows. Furthermore, make sure that Docker is installed.
Construct the build environment by building the Docker image
```
docker build . -t pyqint-anaconda -f Dockerfile-linux-anaconda
```

Modify the `build_docker_linux_anaconda.sh` file and set the `ROOT` variable to the root
folder of this repository. Next, run the `docker_setup.sh` script
To install the `whl` file

```
./build_docker_linux_anaconda.sh
pip3 install wheelhouse/pyqint-<VERSION>-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
```

After compilation, you will automatically be prompted whether to upload
the freshly generated packages.

## Compiling for Linux/PyPi on Windows using Docker
and to locally test

For the Windows terminal, I use Git Bash as readily available in
Git for Windows. Furthermore, make sure that Docker is installed.
Construct the build environment by building the Docker image
```
docker build . -t pyqint-pypi -f Dockerfile-linux-pypi
```

Modify the `build_docker_linux_pypi.sh` file and set the `ROOT` variable to the root
folder of this repository. Next, run the `docker_setup.sh` script

```
./build_docker_linux_pypi.sh
pytest-3 tests/*.py
```

### Uploading to PyPi
Expand All @@ -88,22 +33,4 @@ To upload, run

```
python -m twine upload wheelhouse/*
```

## Compilation and testing under Linux Debian

Compile locally
```
python3 setup.py build
```

and install it locally
```
pip3 install -e .
```

and finally test it

```
pytest-3 tests/*
```
```
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# PyQInt

[![build](https://github.com/ifilot/pyqint/actions/workflows/build.yml/badge.svg)](https://github.com/ifilot/pyqint/actions/workflows/build.yml)
[![build](https://github.com/ifilot/pyqint/actions/workflows/build_conda.yml/badge.svg)](https://github.com/ifilot/pyqint/actions/workflows/build_conda.yml)
[![build](https://github.com/ifilot/pyqint/actions/workflows/build_wheels.yml/badge.svg)](https://github.com/ifilot/pyqint/actions/workflows/build_wheels.yml)
[![docs](https://github.com/ifilot/pyqint/actions/workflows/docs.yml/badge.svg)](https://github.com/ifilot/pyqint/actions/workflows/docs.yml)
[![Anaconda-Server Badge](https://anaconda.org/ifilot/pyqint/badges/version.svg)](https://anaconda.org/ifilot/pyqint)
[![PyPI](https://img.shields.io/pypi/v/pyqint?style=flat-square)](https://pypi.org/project/pyqint/)
Expand Down
2 changes: 1 addition & 1 deletion meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: "pyqint"
version: "0.15.0"
version: "0.16.0"

source:
path: .
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ test-requires = "pytest"
test-command = "pytest {project}/tests"

# skip PyPy wheels and 32 bit builds
skip = ["pp*", "*-win32", "*-manylinux_i686", "cp*-musllinux_*"]
skip = ["pp*", "*-win32", "*-manylinux_i686", "cp*-musllinux_*", "cp36-*"]
2 changes: 1 addition & 1 deletion pyqint/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "0.15.0"
__version__ = "0.16.0"

Loading

0 comments on commit bb63fae

Please sign in to comment.