Skip to content

Commit

Permalink
Fix install requires (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Mar 30, 2023
1 parent 9abbef4 commit 8440ac0
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/system_tests/profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ email: aiida@localhost
first_name: Giuseppe
last_name: Verdi
institution: Khedivial
db_backend: psql_dos
db_backend: core.psql_dos
db_engine: postgresql_psycopg2
db_host: localhost
db_port: 5432
Expand All @@ -18,4 +18,4 @@ broker_host: 127.0.0.1
broker_port: 5672
broker_virtual_host: ''
repository: /tmp/test_repository_test_aiida/
test_profile: true
test_profile: true
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
repos:

- repo: https://github.com/psf/black
rev: 22.3.0
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/PyCQA/pylint
rev: v2.14.4
rev: v2.17.1
hooks:
- id: pylint
language: system
Expand Down
4 changes: 2 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=too-few-public-methods,too-many-public-methods,bad-continuation,wrong-import-position,line-too-long,wildcard-import,too-many-instance-attributes,fixme,len-as-condition,useless-object-inheritance,wrong-import-order,duplicate-code
disable=too-few-public-methods,too-many-public-methods,wrong-import-position,line-too-long,wildcard-import,too-many-instance-attributes,fixme,len-as-condition,useless-object-inheritance,wrong-import-order,duplicate-code,use-dict-literal

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down Expand Up @@ -386,4 +386,4 @@ valid-metaclass-classmethod-first-arg=mcs

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
overgeneral-exceptions=builtins.Exception
2 changes: 1 addition & 1 deletion aiida_optimize/_optimization_workchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def launch_evaluations(self):
self.indices_to_retrieve.append(idx)
return self.to_context(**evals)

def get_results(self):
def get_results(self): # pylint: disable=inconsistent-return-statements
"""
Retrieve results of the current iteration step's evaluations.
"""
Expand Down
2 changes: 1 addition & 1 deletion aiida_optimize/process_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ def load_object(cls_name):
return ObjectLoader().load_object(cls_name_str)
except ValueError as err:
if cls_name_str.startswith(_YAML_IDENTIFIER):
return yaml.load(cls_name_str[len(_YAML_IDENTIFIER) :])
return yaml.load(cls_name_str[len(_YAML_IDENTIFIER) :], Loader=yaml.UnsafeLoader)
raise ValueError(f"Could not load class name '{cls_name_str}'.") from err
4 changes: 2 additions & 2 deletions setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
],
"include_package_data": true,
"install_requires": [
"aiida-core>=2.0.0<3.0.0",
"aiida-core>=2.0.0,<3.0.0",
"numpy",
"scipy",
"decorator",
Expand All @@ -46,7 +46,7 @@
"dev": [
"yapf==0.32.0",
"pre-commit==2.19",
"pylint==2.14.4",
"pylint==2.17.1",
"mypy==0.961",
"types-PyYAML==6.0.9",
"types-decorator==5.1.7"
Expand Down
3 changes: 0 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def run_optimization(): # pylint: disable=unused-argument
def inner(
engine, func_workchain, engine_kwargs, evaluate=None
): # pylint: disable=missing-docstring,useless-suppression

inputs = dict(
engine=engine,
engine_kwargs=orm.Dict(dict=dict(engine_kwargs)),
Expand Down Expand Up @@ -72,7 +71,6 @@ def inner( # pylint: disable=too-many-arguments,missing-docstring,useless-suppr
input_getter=operator.attrgetter("x"),
output_port_names=None,
):

func_workchain = getattr(sample_processes, func_workchain_name)

result_node = run_optimization(
Expand Down Expand Up @@ -132,7 +130,6 @@ def inner( # pylint: disable=too-many-arguments,missing-docstring,useless-suppr
evaluate=None,
output_port_names=None,
):

func_workchain = getattr(sample_processes, func_workchain_name)

result_node = run_optimization(
Expand Down

0 comments on commit 8440ac0

Please sign in to comment.