Skip to content

Commit

Permalink
Merge pull request #13 from ImogenBits/util_commands
Browse files Browse the repository at this point in the history
Update to algobattle-base 4.0.0rc3
  • Loading branch information
Benezivas authored Sep 28, 2023
2 parents 74309dd + 400abe1 commit 7ead771
Show file tree
Hide file tree
Showing 14 changed files with 100 additions and 14 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
push:
tags:
- v*.*.*

jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v3
- uses: pdm-project/setup-pdm@v3
- name: Publish package distributions to PyPI
run: pdm publish

release:
name: Create Github release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
5 changes: 5 additions & 0 deletions algobattle_problems/biclique/algobattle.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[match]
problem = "Bipartite Clique"

[problems."Bipartite Clique"]
location = "problem.py"
5 changes: 5 additions & 0 deletions algobattle_problems/c4subgraphiso/algobattle.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[match]
problem = "Square Subgraph Isomorphism"

[problems."Square Subgraph Isomorphism"]
location = "problem.py"
5 changes: 5 additions & 0 deletions algobattle_problems/clusterediting/algobattle.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[match]
problem = "Cluster Editing"

[problems."Cluster Editing"]
location = "problem.py"
5 changes: 5 additions & 0 deletions algobattle_problems/domset/algobattle.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[match]
problem = "Dominating Set"

[problems."Dominating Set"]
location = "problem.py"
5 changes: 5 additions & 0 deletions algobattle_problems/hikers/algobattle.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[match]
problem = "Hikers"

[problems.Hikers]
location = "problem.py"
8 changes: 8 additions & 0 deletions algobattle_problems/longestpathboundedfvs/algobattle.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[match]
problem = "Longest Path with Bounded Feedback Vertex Set"

[problems."Longest Path with Bounded Feedback Vertex Set"]
location = "problem.py"
dependencies = [
"networkx",
]
2 changes: 1 addition & 1 deletion algobattle_problems/longestpathboundedfvs/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def validate_solution(self, instance: Instance, role: Role) -> None:
if not self._no_revisited_nodes():
raise ValidationError("The given path contains repeated nodes.")

def _nodes_are_walk(self, instance) -> bool:
def _nodes_are_walk(self, instance: Instance) -> bool:
edge_set = set(instance.edges)
g = Graph()
for edge in edge_set:
Expand Down
5 changes: 5 additions & 0 deletions algobattle_problems/oscm3/algobattle.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[match]
problem = "One-Sided Crossing Minimization-3"

[problems."One-Sided Crossing Minimization-3"]
location = "problem.py"
5 changes: 5 additions & 0 deletions algobattle_problems/pairsum/algobattle.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[match]
problem = "Pairsum"

[problems.Pairsum]
location = "problem.py"
5 changes: 5 additions & 0 deletions algobattle_problems/pathpacking/algobattle.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[match]
problem = "P_3 Path Packing"

[problems."P_3 Path Packing"]
location = "problem.py"
5 changes: 5 additions & 0 deletions algobattle_problems/scheduling/algobattle.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[match]
problem = "Job Shop Scheduling"

[problems."Job Shop Scheduling"]
location = "problem.py"
5 changes: 5 additions & 0 deletions algobattle_problems/tsptimewindows/algobattle.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[match]
problem = "Traveling Salesman with Time Windows"

[problems."Traveling Salesman with Time Windows"]
location = "problem.py"
23 changes: 10 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,22 @@ requires-python = ">=3.11"
license = {text = "MIT"}
authors = [{name = "Imogen Hergeth"}, {name = "Jan Dreier"}, {name = "Henri Lotze"}]
dependencies = [
"algobattle",
"algobattle-base~=4.0.0rc3",
"networkx",
]

[project.entry-points."algobattle.problem"]
Biclique = "algobattle_problems.biclique.problem:Biclique"
C4subgraphiso = "algobattle_problems.c4subgraphiso.problem:C4subgraphiso"
Clusterediting = "algobattle_problems.clusterediting.problem:Clusterediting"
Domset = "algobattle_problems.domset.problem:Domset"
"Bipartite Clique" = "algobattle_problems.biclique.problem:Biclique"
"Square Subgraph Isomorphism" = "algobattle_problems.c4subgraphiso.problem:C4subgraphiso"
"Cluster Editing" = "algobattle_problems.clusterediting.problem:Clusterediting"
"Dominating Set" = "algobattle_problems.domset.problem:Domset"
Hikers = "algobattle_problems.hikers.problem:Hikers"
LPBFVS = "algobattle_problems.longestpathboundedfvs.problem:Longestpathboundedfvs"
OSCM3 = "algobattle_problems.oscm3.problem:OSCM3"
"Longest Path with Bounded Feedback Vertex Set" = "algobattle_problems.longestpathboundedfvs.problem:Longestpathboundedfvs"
"One-Sided Crossing Minimization-3" = "algobattle_problems.oscm3.problem:OSCM3"
Pairsum = "algobattle_problems.pairsum.problem:Pairsum"
Pathpacking = "algobattle_problems.pathpacking.problem:Pathpacking"
Scheduling = "algobattle_problems.scheduling.problem:Scheduling"
Tsptimewindows = "algobattle_problems.tsptimewindows.problem:Tsptimewindows"

[tool.setuptools.package-data]
algobattle_problems = ["*/generator/**/*", "*/solver/**/*"]
"P_3 Path Packing" = "algobattle_problems.pathpacking.problem:Pathpacking"
"Job Shop Scheduling" = "algobattle_problems.scheduling.problem:Scheduling"
"Traveling Salesman with Time Windows" = "algobattle_problems.tsptimewindows.problem:Tsptimewindows"

[tool.pyright]
diagnosticMode = "workspace"
Expand Down

0 comments on commit 7ead771

Please sign in to comment.