-
Notifications
You must be signed in to change notification settings - Fork 11
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
35 changed files
with
704 additions
and
407 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
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
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,70 @@ | ||
[build-system] | ||
requires = ["setuptools>=65.5.1"] # PEP 518 specifications | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "wfcommons" | ||
authors = [{name = "WfCommons team", email = "[email protected]"}] | ||
description = "A Framework for Enabling Scientific Workflow Research and Education" | ||
readme = "README.md" | ||
requires-python = ">=3.9" | ||
classifiers = [ | ||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Education", | ||
"Intended Audience :: Science/Research", | ||
"Natural Language :: English", | ||
"Topic :: Documentation :: Sphinx", | ||
"Topic :: System :: Distributed Computing" | ||
] | ||
license = {text = "GNU General Public License v3 (GPLv3)"} | ||
dependencies = [ | ||
"jsonschema", | ||
"matplotlib", | ||
"networkx", | ||
"numpy", | ||
"pandas", | ||
"python-dateutil", | ||
"requests", | ||
"scipy", | ||
"pyyaml", | ||
"pandas", | ||
"stringcase" | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Homepage = "https://wfcommons.org" | ||
Source = "https://github.com/wfcommons/wfcommons" | ||
Documentation = "https://docs.wfcommons.org" | ||
Tracker = "https://github.com/wfcommons/WfCommons/issues" | ||
|
||
[project.optional-dependencies] | ||
test = ["pytest", "pytest-cov"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "wfcommons.version.__version__"} | ||
|
||
[tool.pytest.ini_options] | ||
addopts=""" | ||
--cov-context test \ | ||
--cov-config pyproject.toml \ | ||
--cov-report xml:coverage.xml \ | ||
--cov-report term-missing \ | ||
--cov ./wfcommons \ | ||
--ignore wfcommons/wfbench/translator/templates \ | ||
--no-cov-on-fail \ | ||
-ra \ | ||
-W ignore""" | ||
testpaths = [ | ||
"tests" | ||
] | ||
markers = [ | ||
"unit: Mark a test as a unit test" | ||
] |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -25,59 +25,13 @@ def run(self): | |
sys.exit(-1) | ||
super().run() | ||
|
||
|
||
with open('README.md', 'r') as fh: | ||
long_description = fh.read() | ||
|
||
# Fetch the version | ||
exec(open('wfcommons/version.py').read()) | ||
|
||
setup( | ||
name='wfcommons', | ||
version=str(__version__), | ||
license='LGPLv3', | ||
author='WfCommons team', | ||
author_email='[email protected]', | ||
description='A Framework for Enabling Scientific Workflow Research and Education', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
url='https://github.com/wfcommons/wfcommons', | ||
packages=find_packages(), | ||
include_package_data=True, | ||
has_ext_modules=lambda: True, | ||
cmdclass={ | ||
'build_ext': Build, | ||
}, | ||
install_requires=[ | ||
'jsonschema', | ||
'matplotlib', | ||
'networkx', | ||
'numpy', | ||
'python-dateutil', | ||
'requests', | ||
'scipy', | ||
'setuptools', | ||
'pyyaml', | ||
'pandas', | ||
'stringcase' | ||
], | ||
classifiers=[ | ||
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: 3.11', | ||
'Programming Language :: Python :: 3.12', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: Education', | ||
'Intended Audience :: Science/Research', | ||
'Natural Language :: English', | ||
'Topic :: Documentation :: Sphinx', | ||
'Topic :: System :: Distributed Computing' | ||
], | ||
python_requires='>=3.8', | ||
data_files=[ | ||
('bin', ['bin/cpu-benchmark', 'bin/wfbench']) | ||
], | ||
|
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,60 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (c) 2024 The WfCommons Team. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
|
||
import pytest | ||
|
||
from wfcommons.common import Task, TaskType, File, FileLink, Machine, MachineSystem | ||
|
||
|
||
task_name = "Task Test" | ||
task_id = "task_test_1" | ||
input_files = [File(file_id="file_in_1", size=10, link=FileLink.INPUT), File(file_id="file_in_2", size=20, link=FileLink.INPUT)] | ||
output_files = [File(file_id="file_out_1", size=30, link=FileLink.OUTPUT), File(file_id="file_out_2", size=40, link=FileLink.OUTPUT)] | ||
|
||
|
||
class TestTask: | ||
|
||
@pytest.fixture | ||
def task(self) -> Task: | ||
return Task( | ||
name=task_name, | ||
task_id=task_id, | ||
runtime=123.45, | ||
input_files=input_files, | ||
output_files=output_files, | ||
category="task_test", | ||
machines=[Machine(name="machine_1", cpu = {"coreCount": 48, "speedInMHz": 1200, "vendor": "Vendor Name"})], | ||
program="program", | ||
args=["arg_1", "arg_2"], | ||
avg_cpu=0.5, | ||
bytes_read=12345, | ||
bytes_written=54321, | ||
memory=10, | ||
energy=100, | ||
avg_power=1.0, | ||
priority=100, | ||
executedAt="2024-09-15T08:59:33.699321-04:00", | ||
task_type=TaskType.COMPUTE, | ||
launch_dir="/tmp", | ||
) | ||
|
||
@pytest.mark.unit | ||
def test_task_specification(self, task: Task) -> None: | ||
|
||
task_specification = { | ||
"name": task_name, | ||
"id": task_id, | ||
"parents": [], | ||
"children": [], | ||
"inputFiles": [str(f) for f in input_files], | ||
"outputFiles": [str(f) for f in output_files] | ||
} | ||
|
||
assert(task_specification == task.specification_as_dict()) |
Oops, something went wrong.