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

First Implemetation of export cache functionality #29

Merged
merged 49 commits into from
Apr 3, 2020
Merged
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
60013fb
Improve installation instructions.
Feb 27, 2020
f110204
Merge branch 'develop' into improve_docs
greschd Feb 27, 2020
4535a2c
Add documentation build to CI
Feb 27, 2020
aa4fa60
Merge pull request #24 from greschd/add_doc_to_ci
greschd Feb 27, 2020
4aa540d
Merge branch 'develop' into improve_docs
greschd Feb 27, 2020
5541e9e
Merge pull request #23 from greschd/improve_docs
greschd Feb 27, 2020
5ea2d75
allowed for expressions in ingnore file lists, implements issue #25, …
broeder-j Feb 27, 2020
6d6f594
changed implemenation
broeder-j Feb 27, 2020
ecbaa7e
Merge pull request #26 from broeder-j/implement_feature_issue_25
greschd Feb 27, 2020
cbe5168
uncomplete work and started to implement export_cache
broeder-j Feb 28, 2020
698635b
first pseudo code version of a fixture to run with cashing, I commit …
broeder-j Feb 28, 2020
b7c003c
bug fixes of run_with_cache fixture and registration on module level
broeder-j Feb 28, 2020
1349769
further bug fixes of run_with_cache fixture implemented a hash creati…
broeder-j Feb 28, 2020
8f5e9a8
Automatically store inputs before hashing
PhilippRue Mar 3, 2020
853bfed
Merge branch 'develop' of https://github.com/aiidateam/aiida-testing …
broeder-j Mar 5, 2020
a47c0de
moved generate diff input fixture to conftest, for usage in other tests
broeder-j Mar 6, 2020
066195f
splitted fixture with_cache into several, rekursion for nested inputs…
broeder-j Mar 11, 2020
5eeb804
removed rekursion out of hash_process, we now unnest the dictionary b…
broeder-j Mar 11, 2020
38f0763
added basic tests for export_cache, run with fixture is not working, …
broeder-j Mar 11, 2020
8451cbb
small bugfixes in export_cache fixtures and import all feature
broeder-j Mar 11, 2020
ead6e33
update readme
ltalirz Mar 11, 2020
3dbc01e
Merge pull request #27 from ltalirz/fix-readme
greschd Mar 11, 2020
d66d3b7
added two fixtures one for a with environment with caching and one to…
broeder-j Mar 11, 2020
af3ff67
start documenting mock_code
ltalirz Mar 11, 2020
c85b796
Merge branch 'develop' into document-mock-code
ltalirz Mar 11, 2020
891fd11
added cache files, added further comments to the code
broeder-j Mar 12, 2020
35ebe9d
Merge pull request #28 from ltalirz/document-mock-code
greschd Mar 12, 2020
699d02f
pre commit changes, prettify code
broeder-j Mar 12, 2020
4752de8
revertet addition of session aiida fixtures, should not be part of th…
broeder-j Mar 12, 2020
346cb46
Merge branch 'develop' of https://github.com/aiidateam/aiida-testing …
broeder-j Mar 12, 2020
25efcaf
further code prettification
broeder-j Mar 12, 2020
97cc9c6
type def and ignore for mypy, reverted previous change, excluded aiid…
broeder-j Mar 13, 2020
e0f078b
code changes for linter
broeder-j Mar 13, 2020
6140216
figthing the linter for now, excluded Codes again from rehash
broeder-j Mar 13, 2020
42510e1
monkeypatched more aiidatype get_objects_to_hash since they included …
broeder-j Mar 13, 2020
299eedf
switch to MIT license
ltalirz Mar 15, 2020
9d88c9e
Merge pull request #31 from ltalirz/fix-license
greschd Mar 15, 2020
0c953de
Merge branch 'develop' into implement_caching_wc
greschd Mar 16, 2020
58537f2
faster entry point loading for console script
ltalirz Mar 31, 2020
9247c3d
Merge pull request #34 from ltalirz/fast-entrypoints
greschd Mar 31, 2020
35e823d
added processbuildernamespace as allowed type for input of certain f…
broeder-j Apr 1, 2020
e7bc252
removed os path operations, now with pathlib. included overwrite func…
broeder-j Apr 1, 2020
f8c623a
Merge branch 'implement_caching_wc' of github.com:broeder-j/aiida-tes…
broeder-j Apr 1, 2020
6c4e03b
Merge branch 'develop' into implement_caching_wc
broeder-j Apr 1, 2020
1c7866e
Merge branch 'implement_caching_wc' of github.com:broeder-j/aiida-tes…
broeder-j Apr 1, 2020
2249eb5
Fix abspath requirement in run_with_cache fixture
PhilippRue Apr 1, 2020
d8d72d9
Fix double spacing
PhilippRue Apr 1, 2020
bea61f0
add cli options for config file management (#33)
ltalirz Apr 1, 2020
fa44c3b
Merge branch 'develop' into implement_caching_wc
greschd Apr 2, 2020
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: 2 additions & 0 deletions aiida_testing/export_cache/_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ def _run_with_cache( # type: ignore

# check existence
full_import_path = pathlib.Path(data_dir) / (name + '.tar.gz')
# make sure the path is absolute (this is needed by export_cache)
full_import_path = full_import_path.absolute()
Copy link
Contributor

Choose a reason for hiding this comment

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

if this is not an absolute path export_cache fails because there this is checked

Copy link
Member

Choose a reason for hiding this comment

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

I think we should check that it is an absolute path instead of just making it absolute. Otherwise the test will depend on which directory they are run from.

As much as possible, e.g. running pytest from the root directory should do the same as e.g. cd tests; pytest.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh yes, that slipped my mind. so how about we make this a check only and get rid of the default value. Then the users would be required to set the paths to executables, output directory etc. themselves and we wouldn't be hiding this in the fixture.
I guess this would be cleaner.

print(full_import_path)
if full_import_path.exists():
cache_exists = True
Expand Down