Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not call python setup.py #212

Merged
merged 5 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
python-version:
- 3.8
- 3.9
cfg:
- os: ubuntu-latest
conda-env: basic
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:

- name: Install Package
run: |
python setup.py develop --no-deps
python -m pip install .

- name: Conda Environment Information
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:

- name: Run isort
run: |
isort --recursive --check-only openff
isort --check-only openff

- name: Run black
run: |
black openff --check
black --check openff
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,7 @@ ENV/
.mypy_cache/

# PyCharm
.idea
.idea

# macOS
.DS_Store
4 changes: 0 additions & 4 deletions openff/qcsubmit/common_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@ def to_string(self) -> str:


class QCSpec(ResultsConfig):

method: constr(strip_whitespace=True) = Field(
"B3LYP-D3BJ",
description="The name of the computational model used to execute the calculation. This could be the QC method or the forcefield name.",
Expand Down Expand Up @@ -450,7 +449,6 @@ def __init__(
gaff_forcefields = GAFFTemplateGenerator.INSTALLED_FORCEFIELDS

except ModuleNotFoundError:

gaff_forcefields = [
"gaff-1.4",
"gaff-1.8",
Expand Down Expand Up @@ -536,7 +534,6 @@ def dict(
exclude_defaults: bool = False,
exclude_none: bool = False,
) -> "DictStrAny":

data = super().dict(
include=include,
exclude=exclude,
Expand Down Expand Up @@ -788,7 +785,6 @@ def validate_metadata(self, raise_errors: bool = False) -> Optional[List[str]]:

empty_fields = []
for field in self.__fields__:

if field == "long_description_url":
# The 'long_description_url' is made optional to more easily facilitate
# local or private dataset submissions.
Expand Down
9 changes: 0 additions & 9 deletions openff/qcsubmit/datasets/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
from openff.qcsubmit.utils.visualize import molecules_to_pdf

if TYPE_CHECKING:

from openff.toolkit.typing.engines.smirnoff import ForceField
from qcportal import FractalClient
from qcportal.collections.collection import Collection
Expand Down Expand Up @@ -353,7 +352,6 @@ def submit(
from multiprocessing.pool import Pool

with Pool(processes=processes) as pool:

# add compute specs to the collection
for spec_name, spec in self.qc_specifications.items():
spec_tasks = 0
Expand Down Expand Up @@ -590,7 +588,6 @@ def filter_molecules(
]
self.filtered_molecules[component].molecules.extend(filter_mols)
else:

filter_data = FilterEntry(
off_molecules=molecules,
component=component,
Expand Down Expand Up @@ -853,7 +850,6 @@ def visualize(
molecules = []

for data in self.dataset.values():

off_mol = data.get_off_molecule(include_conformers=False)
off_mol.name = None

Expand Down Expand Up @@ -1055,9 +1051,7 @@ def _add_entries(self, dataset: ptl.collections.Dataset) -> Tuple[List[str], int
indices = []

for i, (index, data) in enumerate(self.dataset.items()):

if len(data.initial_molecules) > 1:

# check if the index has a number tag
# if so, start from this tag
index, tag = self._clean_index(index=index)
Expand Down Expand Up @@ -1365,9 +1359,7 @@ def _add_entries(
indices = []

for i, (index, data) in enumerate(self.dataset.items()):

if len(data.initial_molecules) > 1:

# check if the index has a number tag
# if so, start from this tag
index, tag = self._clean_index(index=index)
Expand Down Expand Up @@ -1579,7 +1571,6 @@ def _add_entries(
indices = []

for i, (index, data) in enumerate(self.dataset.items()):

new_entries += int(
self._add_entry(
data.initial_molecules, dataset=dataset, name=data.index, data=data
Expand Down
1 change: 0 additions & 1 deletion openff/qcsubmit/datasets/entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ def formatted_keywords(self) -> Dict[str, Any]:
return self.keywords.additional_keywords

def __init__(self, off_molecule: Optional[off.Molecule] = None, **kwargs):

super().__init__(off_molecule, **kwargs)
# now validate the torsions check proper first
off_molecule = self.get_off_molecule(include_conformers=False)
Expand Down
2 changes: 0 additions & 2 deletions openff/qcsubmit/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class QCSubmitException(Exception):
header = "QCSubmit Base Error"

def __init__(self, message: str):

super().__init__(message)

self.raw_message = message
Expand Down Expand Up @@ -130,7 +129,6 @@ class MolecularComplexError(QCSubmitException):


class ConstraintError(QCSubmitException):

error_type = "constraint_error"
header = "Constraint Error"

Expand Down
1 change: 0 additions & 1 deletion openff/qcsubmit/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,6 @@ def _dataset_type(cls) -> Type[BasicDataset]:
def _process_molecule(
self, dataset: T, molecule: off.Molecule, toolkit_registry: ToolkitRegistry
) -> None:

# always put the cmiles in the extras from what we have just calculated to ensure correct order
extras = molecule.properties.get("extras", {})

Expand Down
9 changes: 0 additions & 9 deletions openff/qcsubmit/results/caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,9 @@ def cached_fractal_client(address: str) -> FractalClient:
"""Returns a cached copy of a fractal client."""

try:

return FractalClient(address)

except ConnectionRefusedError as e:

# Try to handle the case when connecting to a local snowflake.
try:
return FractalClient(address, verify=False)
Expand Down Expand Up @@ -121,11 +119,9 @@ def _cached_client_query(
logger.debug(f"query split into {len(batch_query_ids)} batches")

for i, batch_ids in enumerate(batch_query_ids):

logger.debug(f"starting batch query {i}")

for query in getattr(client, query_name)(batch_ids):

found_queries.append(query)

if cache_predicate is not None and not cache_predicate(query):
Expand Down Expand Up @@ -226,7 +222,6 @@ def _cached_query_single_structure_results(
return_values = []

for result in results:

qc_record = qc_records[result.record_id]
qc_molecule = qc_molecules[qc_record_to_molecule_id[result.record_id]]

Expand Down Expand Up @@ -286,7 +281,6 @@ def cached_query_optimization_results(
def _cached_torsion_drive_molecule_ids(
client_address: str, qc_records: List[TorsionDriveRecord]
) -> Dict[Tuple[str, Tuple[int, ...]], str]:

client_address = client_address.rstrip("/")

optimization_ids = {
Expand Down Expand Up @@ -315,7 +309,6 @@ def _cached_torsion_drive_molecule_ids(
qc_optimizations = {}

for i, batch_ids in enumerate(batched_missing_ids):

logger.debug(f"starting batch query {i}")

qc_optimizations.update(
Expand All @@ -333,7 +326,6 @@ def _cached_torsion_drive_molecule_ids(
}

for grid_tuple, optimization_id in missing_optimization_ids.items():

qc_optimization = qc_optimizations[optimization_id]
found_molecule_ids[grid_tuple] = qc_optimization.final_molecule

Expand Down Expand Up @@ -392,7 +384,6 @@ def cached_query_torsion_drive_results(
return_values = []

for result in results:

qc_record = qc_records[result.record_id]

grid_ids = [*qc_record.minimum_positions]
Expand Down
Loading