Skip to content

Commit 461cb1f

Browse files
committed
#44: setting up wfcommons testing infrastructure
1 parent 022fcec commit 461cb1f

4 files changed

Lines changed: 95 additions & 99 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ venv
4444
# Workflow Schema
4545
workflow-schema.json
4646

47+
# Binaries
48+
bin/cpu-benchmark
49+
bin/cpu-benchmark.o
50+
4751
# wfc-1.3_to_dask specifics
4852
/wfcommons/wfc-1.3_to_dask/__pycache__/
4953
/wfcommons/wfc-1.3_to_dask/.coverage

pyproject.toml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
[build-system]
2+
requires = ["setuptools>=65.5.1"] # PEP 518 specifications
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "wfcommons"
7+
authors = [{name = "WfCommons team", email = "support@wfcommons.org"}]
8+
description = "A Framework for Enabling Scientific Workflow Research and Education"
9+
readme = "README.md"
10+
requires-python = ">=3.8"
11+
classifiers = [
12+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
13+
"Operating System :: OS Independent",
14+
"Programming Language :: Python :: 3",
15+
"Programming Language :: Python :: 3.8",
16+
"Programming Language :: Python :: 3.9",
17+
"Programming Language :: Python :: 3.10",
18+
"Programming Language :: Python :: 3.11",
19+
"Programming Language :: Python :: 3.12",
20+
"Intended Audience :: Developers",
21+
"Intended Audience :: Education",
22+
"Intended Audience :: Science/Research",
23+
"Natural Language :: English",
24+
"Topic :: Documentation :: Sphinx",
25+
"Topic :: System :: Distributed Computing"
26+
]
27+
license = {text = "GNU General Public License v3 (GPLv3)"}
28+
dependencies = [
29+
"jsonschema",
30+
"matplotlib",
31+
"networkx",
32+
"numpy",
33+
"python-dateutil",
34+
"requests",
35+
"scipy",
36+
"pyyaml",
37+
"pandas",
38+
"stringcase"
39+
]
40+
dynamic = ["version"]
41+
42+
[project.urls]
43+
Homepage = "https://wfcommons.org"
44+
Source = "https://github.com/wfcommons/wfcommons"
45+
Documentation = "https://docs.wfcommons.org"
46+
Tracker = "https://github.com/wfcommons/WfCommons/issues"
47+
48+
[project.optional-dependencies]
49+
test = ["pytest", "pytest-cov"]
50+
51+
[tool.setuptools.dynamic]
52+
version = {attr = "wfcommons.version.__version__"}
53+
54+
[tool.pytest.ini_options]
55+
addopts="""
56+
--cov-context test \
57+
--cov-config pyproject.toml \
58+
--cov-report xml:coverage.xml \
59+
--cov-report term-missing \
60+
--cov wfcommons \
61+
--cov tests \
62+
--ignore wfcommons/wfbench/translator/templates \
63+
--no-cov-on-fail \
64+
-ra \
65+
-W ignore"""
66+
testpaths = [
67+
"tests"
68+
]

setup.py

Lines changed: 0 additions & 99 deletions
This file was deleted.

tests/test_workflow.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
#
4+
# Copyright (c) 2024 The WfCommons Team.
5+
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
11+
import pytest
12+
13+
from wfcommons.common import Workflow
14+
15+
16+
class TestWorkflow:
17+
@pytest.mark.unit
18+
def test_workflow_creation(self):
19+
workflow = Workflow(
20+
name="Workflow Test",
21+
makespan=100.0
22+
)
23+
assert(workflow.name == "Workflow Test")

0 commit comments

Comments
 (0)