diff options
Diffstat (limited to 'python-graph-scheduler.spec')
| -rw-r--r-- | python-graph-scheduler.spec | 254 |
1 files changed, 254 insertions, 0 deletions
diff --git a/python-graph-scheduler.spec b/python-graph-scheduler.spec new file mode 100644 index 0000000..908cfce --- /dev/null +++ b/python-graph-scheduler.spec @@ -0,0 +1,254 @@ +%global _empty_manifest_terminate_build 0 +Name: python-graph-scheduler +Version: 1.1.1 +Release: 1 +Summary: A graph-based scheduler of nodes based on structure and conditions +License: Apache Software License +URL: https://github.com/kmantel/graph-scheduler +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/fe/01/b77a50156e5cfbee9c115752dbf2b5e304908ca02c8cd41dbab168e47d53/graph-scheduler-1.1.1.tar.gz +BuildArch: noarch + +Requires: python3-numpy +Requires: python3-pint +Requires: python3-toposort +Requires: python3-networkx +Requires: python3-psyneulink +Requires: python3-pytest +Requires: python3-pytest-benchmark +Requires: python3-pytest-cov +Requires: python3-pytest-helpers-namespace +Requires: python3-pytest-pycodestyle +Requires: python3-pytest-pydocstyle +Requires: python3-pytest-xdist +Requires: python3-coveragepy-lcov +Requires: python3-m2r2 +Requires: python3-sphinx +Requires: python3-sphinx-autodoc-typehints +Requires: python3-sphinx-rtd-theme + +%description +# Graph Scheduler + +[](https://github.com/kmantel/graph-scheduler/actions/workflows/ci.yml) +[](https://coveralls.io/github/kmantel/graph-scheduler) + +A graph scheduler generates the order in which the nodes of a directed +acyclic graph (DAG) are executed using the structure of the graph and +expressive +[conditions](https://kmantel.github.io/graph-scheduler/Condition.html). +Specifically, a scheduler uses a topological ordering of the nodes as a +base sequence of execution and further restricts execution based on +predefined or custom conditions provided by the user. Patterns of +execution are linked to abstract units of time and may optionally be +mapped to real time units using [pint](https://pint.readthedocs.io/). + +Documentation is available on github-pages [for the current +release](https://kmantel.github.io/graph-scheduler/) and [for the +current main +branch](https://kmantel.github.io/graph-scheduler/branch/main). For +prior releases, go to +``https://kmantel.github.io/graph-scheduler/tag/<tag_name>``. + +## Installation + +Install from pypi: + +```sh +pip install graph-scheduler +``` + +## Example + +The graph is specified here in dependency dictionary format, but +[networkx](https://github.com/networkx/networkx) Digraphs are also +supported. + +```python +>>> import graph_scheduler + +>>> graph = { + 'A': set(), + 'B': {'A'}, + 'C': {'A'}, + 'D': {'B', 'C'}, +} + +>>> sched = graph_scheduler.Scheduler(graph=graph) +>>> sched.add_condition('C', graph_scheduler.EveryNCalls('A', 2)) +>>> sched.add_condition('D', graph_scheduler.EveryNCalls('C', 2)) + +>>> print(list(sched.run())) +[{'A'}, {'B'}, {'A'}, {'C', 'B'}, {'A'}, {'B'}, {'A'}, {'C', 'B'}, {'D'}] +``` + + + + +%package -n python3-graph-scheduler +Summary: A graph-based scheduler of nodes based on structure and conditions +Provides: python-graph-scheduler +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-graph-scheduler +# Graph Scheduler + +[](https://github.com/kmantel/graph-scheduler/actions/workflows/ci.yml) +[](https://coveralls.io/github/kmantel/graph-scheduler) + +A graph scheduler generates the order in which the nodes of a directed +acyclic graph (DAG) are executed using the structure of the graph and +expressive +[conditions](https://kmantel.github.io/graph-scheduler/Condition.html). +Specifically, a scheduler uses a topological ordering of the nodes as a +base sequence of execution and further restricts execution based on +predefined or custom conditions provided by the user. Patterns of +execution are linked to abstract units of time and may optionally be +mapped to real time units using [pint](https://pint.readthedocs.io/). + +Documentation is available on github-pages [for the current +release](https://kmantel.github.io/graph-scheduler/) and [for the +current main +branch](https://kmantel.github.io/graph-scheduler/branch/main). For +prior releases, go to +``https://kmantel.github.io/graph-scheduler/tag/<tag_name>``. + +## Installation + +Install from pypi: + +```sh +pip install graph-scheduler +``` + +## Example + +The graph is specified here in dependency dictionary format, but +[networkx](https://github.com/networkx/networkx) Digraphs are also +supported. + +```python +>>> import graph_scheduler + +>>> graph = { + 'A': set(), + 'B': {'A'}, + 'C': {'A'}, + 'D': {'B', 'C'}, +} + +>>> sched = graph_scheduler.Scheduler(graph=graph) +>>> sched.add_condition('C', graph_scheduler.EveryNCalls('A', 2)) +>>> sched.add_condition('D', graph_scheduler.EveryNCalls('C', 2)) + +>>> print(list(sched.run())) +[{'A'}, {'B'}, {'A'}, {'C', 'B'}, {'A'}, {'B'}, {'A'}, {'C', 'B'}, {'D'}] +``` + + + + +%package help +Summary: Development documents and examples for graph-scheduler +Provides: python3-graph-scheduler-doc +%description help +# Graph Scheduler + +[](https://github.com/kmantel/graph-scheduler/actions/workflows/ci.yml) +[](https://coveralls.io/github/kmantel/graph-scheduler) + +A graph scheduler generates the order in which the nodes of a directed +acyclic graph (DAG) are executed using the structure of the graph and +expressive +[conditions](https://kmantel.github.io/graph-scheduler/Condition.html). +Specifically, a scheduler uses a topological ordering of the nodes as a +base sequence of execution and further restricts execution based on +predefined or custom conditions provided by the user. Patterns of +execution are linked to abstract units of time and may optionally be +mapped to real time units using [pint](https://pint.readthedocs.io/). + +Documentation is available on github-pages [for the current +release](https://kmantel.github.io/graph-scheduler/) and [for the +current main +branch](https://kmantel.github.io/graph-scheduler/branch/main). For +prior releases, go to +``https://kmantel.github.io/graph-scheduler/tag/<tag_name>``. + +## Installation + +Install from pypi: + +```sh +pip install graph-scheduler +``` + +## Example + +The graph is specified here in dependency dictionary format, but +[networkx](https://github.com/networkx/networkx) Digraphs are also +supported. + +```python +>>> import graph_scheduler + +>>> graph = { + 'A': set(), + 'B': {'A'}, + 'C': {'A'}, + 'D': {'B', 'C'}, +} + +>>> sched = graph_scheduler.Scheduler(graph=graph) +>>> sched.add_condition('C', graph_scheduler.EveryNCalls('A', 2)) +>>> sched.add_condition('D', graph_scheduler.EveryNCalls('C', 2)) + +>>> print(list(sched.run())) +[{'A'}, {'B'}, {'A'}, {'C', 'B'}, {'A'}, {'B'}, {'A'}, {'C', 'B'}, {'D'}] +``` + + + + +%prep +%autosetup -n graph-scheduler-1.1.1 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-graph-scheduler -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 1.1.1-1 +- Package Spec generated |
