-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from factryflow/feature/setup-poetry
switched to Poetry and big refactor
- Loading branch information
Showing
34 changed files
with
3,012 additions
and
3,726 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,6 +1,6 @@ | ||
name: CI | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
on: [pull_request] | ||
|
||
jobs: | ||
test: | ||
|
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,6 +1,6 @@ | ||
name: Build distribution | ||
|
||
on: [push, pull_request] | ||
on: [pull_request] | ||
|
||
jobs: | ||
test: | ||
|
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,2 @@ | ||
test: | ||
poetry run pytest |
File renamed without changes.
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# ⚙️ factryengine | ||
|
||
`factryengine` is a high-speed Python package for effortless and efficient task scheduling, specifically tailored for production scheduling. Built with `numpy`, it ensures tasks are executed in the correct order while considering their priorities, resources, and dependencies. | ||
|
||
## 🛠 Installation | ||
|
||
Install `factryengine` with a simple pip command: | ||
|
||
```bash | ||
pip install factryengine | ||
``` | ||
|
||
## 🌟 Features | ||
|
||
- **Fast Performance**: Built with `numpy` for high-speed task scheduling. | ||
- **Production Scheduling**: Specifically designed for seamless production scheduling. | ||
- **Simple Task Creation**: Easily define tasks with attributes like duration, priority, and resources. | ||
- **Resource Management**: Assign resources with availability windows to tasks. | ||
- **Task Dependencies**: Ensure tasks that depend on others are scheduled in the correct order. | ||
- **Efficient Scheduling**: Automatically schedule tasks while considering their priorities and dependencies. | ||
|
||
## 🚀 Quick Start | ||
|
||
Get started with `factryengine` with this basic example: | ||
|
||
```python | ||
from factryengine import Task, Resource, Scheduler | ||
|
||
# Creating a Resource object | ||
resource = Resource(id=1, available_windows=[(0,10)]) | ||
|
||
# Creating Task objects | ||
task1 = Task(id=1, duration=3, priority=2, resources=[[resource]]) | ||
task2 = Task(id=2, duration=5, priority=1, resources=[[resource]], predecessors=[task1]) | ||
|
||
# Creating a Scheduler object and scheduling the tasks | ||
scheduler = Scheduler(tasks=[task1, task2]) | ||
scheduler_result = scheduler.schedule() | ||
``` | ||
|
||
In this example, `task1` is scheduled before `task2` as `task2` depends on `task1`, despite its lower priority. | ||
|
||
## 📖 Documentation | ||
|
||
For more detailed information, check out the [documentation](https://yacobolo.github.io/factryengine/). | ||
|
||
## 🤝 Contributing | ||
|
||
Contributions, issues, and feature requests are welcome! | ||
|
||
## 📝 License | ||
|
||
This project is [MIT](link_to_license) licensed. |
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
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[tool.poetry] | ||
name = "factryengine" | ||
version = "0.0.0" | ||
description = "production / job shop / resource scheduler for Python" | ||
authors = ["Jacob Østergaard Nielsen <jacob.oestergaard.nielsen@gmail.com>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.11" | ||
pandas = "^2.1.4" | ||
seaborn = "^0.13.1" | ||
networkx = "^3.2.1" | ||
pydantic = "^2.5.3" | ||
|
||
|
||
[tool.poetry.group.dev.dependencies] | ||
pytest = "^7.4.4" | ||
ipykernel = "^6.28.0" | ||
|
||
|
||
[tool.poetry-dynamic-versioning] | ||
enable = true | ||
[build-system] | ||
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"] | ||
build-backend = "poetry_dynamic_versioning.backend" | ||
|
||
[tool.ruff] | ||
ignore-init-module-imports = true |
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
from .models.resource import Resource # noqa: F401 | ||
from .models.task import Task # noqa: F401 | ||
from .scheduler.core import Scheduler # noqa: F401 | ||
import warnings | ||
|
||
from . import _version | ||
__version__ = _version.get_versions()['version'] | ||
import numpy as np | ||
|
||
from .models import Assignment, Resource, ResourceGroup, Task | ||
from .scheduler.core import Scheduler | ||
|
||
# Ignore numpy's UserWarning | ||
warnings.filterwarnings("ignore", category=UserWarning, module="numpy.*") |
Oops, something went wrong.