Skip to content
Merged
18 changes: 10 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@
import io
import os

from setuptools import setup, find_packages

from setuptools import find_packages, setup

# This reads the __version__ variable from openfermion/_version.py
__version__ = ''
exec(open('src/openfermion/_version.py').read())

# Readme file as long_description:
long_description = ('===========\n' +
'OpenFermion\n' +
'===========\n')
long_description = '===========\n' + 'OpenFermion\n' + '===========\n'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this probably doesn't need the +'s anymore

stream = io.open('README.rst', encoding='utf-8')
stream.readline()
long_description += stream.read()
Expand All @@ -31,15 +28,19 @@
requirements = open('dev_tools/requirements/deps/runtime.txt').readlines()
requirements = [r.strip() for r in requirements]
requirements = [r for r in requirements if not r.startswith('#')]
# Resource estimates requirements.
resource_requirements = open('dev_tools/requirements/deps/resource_estimates.txt').readlines()
resource_requirements = [r.strip() for r in resource_requirements]
resource_requirements = [r for r in resource_requirements if not r.startswith('#')]

docs_files_gen = os.walk('docs')
docs_data_files_tuples = []
for cwd, subdirs, files in list(docs_files_gen)[1:]:
if 'ipynb_checkpoints' in cwd:
continue
docs_data_files_tuples.append(
(os.path.join('openfermion',
cwd), [os.path.join(cwd, file) for file in files]))
(os.path.join('openfermion', cwd), [os.path.join(cwd, file) for file in files])
)

setup(
name='openfermion',
Expand All @@ -58,7 +59,8 @@
'': [
os.path.join('src', 'openfermion', 'testing', '*.npy'),
os.path.join('src', 'openfermion', 'testing', '*.hdf5'),
],
]
},
extras_require={'resources': resource_requirements},
data_files=docs_data_files_tuples,
)
7 changes: 2 additions & 5 deletions src/openfermion/resource_estimates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

Code is system tested on Debian GNU/Linux with Python 3.8.5. All the code comes with tests (use `pytest`), but not unit tested with GitHub worflows.

Since the FT costing is closely tied to manipulation of molecular integrals (localization, active space selection, benchmarking against CCSD(T), ...) the code depends on [PySCF](https://pyscf.org/). Since we do not want to burden all OpenFermion users with this dependency, testing is disabled in the GitHub workflow. Moreover, the `resource_estimates` functionality requires the dependencies
Since the FT costing is closely tied to manipulation of molecular integrals (localization, active space selection, benchmarking against CCSD(T), ...) the code depends on [PySCF](https://pyscf.org/) and is not installed by default. To install it do:

```
pyscf
h5py~=3.3.0
jax
jaxlib
pip install openfermion[resources]
```

For THC factorization, it also requires [BTAS](https://github.com/ValeevGroup/BTAS) and the [PyBTAS](https://github.com/ncrubin/pybtas) wrapper, which require their own installation + depends.
Expand Down
11 changes: 5 additions & 6 deletions src/openfermion/resource_estimates/pbc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,10 @@ Further details are provided in a [tutorial](./notebooks/resource_estimates.ipyn

Similar to the case of molecular resource estimation, we do not wish to burden all OpenFermion users with these dependencies, and testing with GitHub workflows is disabled. Currently we only check if pyscf is available. If it is then pytest will pick up the pbc module and run the tests. Note the tests can be quite slow due to the cost associated with building the integrals.

## Requirements
Requirements can be found in [resource_estimates.txt](../../../../dev_tools/requirements/deps/resource_estimates.txt)
## Installation

The additional requirements required can be installed with openfermion by doing

```
pyscf
jax
jaxlib
ase
pip install openfermion[resources]
```