-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
788 additions
and
700 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
../../npf_compare.py \ | ||
../../npf.py \ | ||
local \ | ||
--force-retest \ | ||
--test main.npf \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
index,build,test_index,y_D,run_index | ||
0,Local,0,4.0,0 | ||
1,Local,0,4.0,1 | ||
2,Local,0,4.0,2 | ||
0,Click 2022,0,4.0,0 | ||
1,Click 2022,0,4.0,1 | ||
2,Click 2022,0,4.0,2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import os | ||
import regex | ||
from npf.cluster.node import Node | ||
from npf.globals import experiment_path, roles | ||
|
||
|
||
def nodes_for_role(role, self_role=None, self_node=None, default_role_map={}): | ||
if role is None or role == '': | ||
role = 'default' | ||
if role == 'self': | ||
if self_role: | ||
role = self_role | ||
if self_node: | ||
return [self_node] | ||
else: | ||
raise Exception("Using self without a role context. Usually, this happens when self is used in a %file") | ||
if role not in roles: | ||
if role in default_role_map: | ||
role = default_role_map[role] | ||
return roles.get(role, roles['default']) | ||
|
||
|
||
nodePattern = regex.compile( | ||
"(?P<role>[a-zA-Z0-9]+)=(:?(?P<user>[a-zA-Z0-9]+)@)?(?P<addr>[a-zA-Z0-9.-]+)(:?[:](?P<path>[a-zA-Z0-9_./~-]+))?") | ||
|
||
|
||
def executor(role, default_role_map): | ||
""" | ||
Return the executor for a given role as associated by the cluster configuration | ||
:param role: A role name | ||
:return: The executor | ||
""" | ||
return nodes_for_role(role, default_role_map)[0].executor | ||
|
||
|
||
def create_local(): | ||
# Create the test file | ||
os.close(os.open(experiment_path() + ".access_test" , os.O_CREAT)) | ||
local = Node.makeLocal() | ||
#Delete the test file | ||
os.unlink(experiment_path() + ".access_test") | ||
roles['default'] = [local] | ||
return local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0
npf/types/__init__.py → npf/models/__init__.py
100755 → 100644
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.