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

Fix env #652

Merged
merged 5 commits into from
May 14, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion arc/settings/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@

paths = list()
paths.append(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(sys.executable))),
'arc_env', 'bin', 'xtb'))
'xtb_env', 'bin', 'xtb'))
paths.append(os.path.join(home, 'anaconda3', 'envs', 'arc_env', 'bin', 'xtb'))
kfir4444 marked this conversation as resolved.
Show resolved Hide resolved
paths.append(os.path.join(home, 'anaconda3', 'envs', 'xtb_env', 'bin', 'xtb'))
paths.append(os.path.join(home, 'miniconda3', 'envs', 'arc_env', 'bin', 'xtb'))
Expand Down
24 changes: 5 additions & 19 deletions arc/utils/wip.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
#!/usr/bin/env python
# encoding: utf-8
#
# Decorator to mark a unit test as a "work_in_progress"
# From http://www.natpryce.com/articles/000788.html
# Copyright 2011 Nat Pryce. Posted 2011-05-30
import unittest
from functools import wraps

from nose.plugins.attrib import attr
from nose.plugins.skip import SkipTest


def fail(message):
raise AssertionError(message)


def work_in_progress(f):
@wraps(f)
def run_test(*args, **kwargs):
def wrapper(*args, **kwargs):
try:
f(*args, **kwargs)
except Exception as e:
raise SkipTest("WIP test failed: " + str(e))
fail("test passed but marked as work in progress")

return attr('work_in_progress')(run_test)
raise unittest.SkipTest("WIP test failed: " + str(e))
raise AssertionError("test passed but marked as work in progress")
return wrapper
8 changes: 6 additions & 2 deletions devtools/install_xtb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ else
conda activate xtb_env
fi

$COMMAND_PKG install -c conda-forge xtb -y
# Install xtb
$COMMAND_PKG install -n xtb_env -c conda-forge xtb=6.3.3 -y

# Install pyyaml
$COMMAND_PKG install -c anaconda pyyaml -y
$COMMAND_PKG activate base

$COMMAND_PKG deactivate
8 changes: 4 additions & 4 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ channels:
- defaults
- rmg
- conda-forge
- cantera
- anaconda
dependencies:
- cairo
- cairocffi
- rmg::cantera >=2.3.0
- cantera::cantera=2.6
Copy link
Member

Choose a reason for hiding this comment

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

maybe >=?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That operator is not generally considered good practice, at his worst this scrambles your dependencies without the developer's knowing, at this best it gives you exactly what you want.

- conda-forge::cclib >=1.7.0
- rmg::chemprop
- coolprop
Expand All @@ -25,9 +27,8 @@ dependencies:
- mpmath
- rmg::muq2
- networkx
- nose
- rmg::numdifftools
- numpy >=1.10.0
- numpy==1.20.1
- conda-forge::openbabel >= 3
- pandas
- psutil
Expand Down Expand Up @@ -57,5 +58,4 @@ dependencies:
- mako
- pytables
- anaconda::pytest
- conda-forge::xtb
- conda-forge::pytest-cov