Skip to content

Commit

Permalink
Set python requirements to 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanzwicknagl committed Sep 16, 2024
1 parent ec521d0 commit 356dd78
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .github/conda/viasp-backend/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ build:

requirements:
host:
- python >=3.7
- python >=3.8
- setuptools >=42
- wheel
- pip
run:
- python >=3.7
- python >=3.8
- networkx >=2.4
- flask ==2.2.0
- werkzeug ==2.2.2
Expand Down
4 changes: 2 additions & 2 deletions .github/conda/viasp/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ build:

requirements:
host:
- python >=3.7
- python >=3.8
- setuptools >=42
- wheel
- pip
run:
- python >=3.7
- python >=3.8
- viasp-backend
- viasp-dash
- jupyter-server-proxy
Expand Down
4 changes: 2 additions & 2 deletions backend/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = viasp-backend
version = 2.1.0
version = 2.1.1
author = Luis Glaser
author_email = Luis.Glaser@uni-potsdam.de
description = The backend for the viasp package.
Expand All @@ -16,7 +16,7 @@ classifiers =
package_dir =
= src
packages = find:
python_requires = >=3.7
python_requires = >=3.8
install_requires =
networkx>=2.4
flask>=2.2.0
Expand Down
14 changes: 2 additions & 12 deletions backend/src/viasp/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,6 @@ def error(self, message):
raise argparse.ArgumentError(None, "In context <viasp>: " + message)


class NegatedBooleanOptionalAction(argparse.BooleanOptionalAction):

def __init__(self, *args, **kwargs):
super(NegatedBooleanOptionalAction, self).__init__(*args, **kwargs)
self.option_strings = [opt for opt in self.option_strings if not opt.startswith('--no-no')]


def __call__(self, parser, namespace, values, option_string=None):
if option_string != None and option_string in self.option_strings:
setattr(namespace, self.dest, not option_string.startswith('--no-no'))

#
# class ViaspArgumentParser
#
Expand Down Expand Up @@ -305,7 +294,8 @@ def run(self, args):
default="unsat")
relaxer_group.add_argument(
'--no-collect-variables',
action=NegatedBooleanOptionalAction,
action='store_true',
default=False,
help=
': Do not collect variables from body as a tuple in the head literal')
relaxer_group.add_argument(
Expand Down
3 changes: 1 addition & 2 deletions backend/src/viasp/server/blueprints/dag_api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from itertools import pairwise
import os
from collections import defaultdict
from typing import Union, Collection, Dict, List, Iterable
Expand All @@ -13,7 +12,7 @@
from ...asp.justify import build_graph
from ...shared.defaults import STATIC_PATH
from ...shared.model import Transformation, Node, Signature
from ...shared.util import get_start_node_from_graph, is_recursive, hash_from_sorted_transformations
from ...shared.util import get_start_node_from_graph, is_recursive, hash_from_sorted_transformations, pairwise
from ...asp.utils import register_adjacent_sorts
from ...shared.io import StableModel
from ..database import load_recursive_transformations_hashes, save_graph, get_graph, clear_graph, set_current_graph, get_current_graph_hash, get_current_sort, load_program, load_transformer, load_models, load_clingraph_names, save_sort, load_dependency_graph
Expand Down
2 changes: 1 addition & 1 deletion backend/src/viasp/shared/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Node:
atoms: FrozenSet[SymbolIdentifier] = field(default_factory=frozenset, hash=True)
reason: Union[
Dict[str, List[Symbol]],
MappingProxyType[str, List[SymbolIdentifier]]] \
MappingProxyType] \
= field(default_factory=DefaultMappingProxyType, hash=True)
recursive: List = field(default_factory=list, hash=False)
space_multiplier: float = field(default=1.0, hash=False)
Expand Down
2 changes: 1 addition & 1 deletion backend/src/viasp/shared/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def pairwise(iterable: Iterable[T]) -> Iterable[Tuple[T, T]]:
next(b, None)
return zip(a, b)

def DefaultMappingProxyType() -> MappingProxyType[str, List]:
def DefaultMappingProxyType() -> MappingProxyType:
return MappingProxyType(defaultdict())

def is_recursive(node, graph):
Expand Down
4 changes: 2 additions & 2 deletions docs/viasp/commandline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ The relaxation mode transforms all integrity constraints of the input program in
.. code-block:: bash
$ viasp unsat-example.lp
viasp version 2.1.0
viasp version 2.1.1
Reading from unsat-example.lp
Starting backend at http://localhost:5050
Expand Down Expand Up @@ -200,7 +200,7 @@ When solving the relaxed program, the atom ``unsat(r1, (X,))`` will be derived,
.. code-block:: bash
$ viasp unsat-example.lp --relax
viasp version 2.1.0
viasp version 2.1.1
Reading from unsat-example.lp
UNSAT
[INFO] Set models.
Expand Down
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "viasp_dash",
"version": "2.1.0",
"version": "2.1.1",
"description": "The dash frontend for the viasp package.",
"main": "build/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion frontend/viasp_dash/package-info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "viasp_dash",
"version": "2.1.0",
"version": "2.1.1",
"description": "The dash frontend for the viasp package.",
"main": "build/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion frontend/viasp_dash/viasp_dash.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/viasp_dash/viasp_dash.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = viasp
version = 2.1.0
version = 2.1.1
author = Luis Glaser
author_email = Luis.Glaser@uni-potsdam.de
description = a visualization tool for clingo.
Expand All @@ -13,7 +13,7 @@ classifiers =
Operating System :: OS Independent

[options]
python_requires = >=3.7
python_requires = >=3.8
install_requires =
viasp-backend>=2.0.0
viasp-dash>=2.0.0
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def run(self):
URL = 'https://github.com/potassco/viasp'
EMAIL = 'Luis.Glaser@uni-potsdam.de'
AUTHOR = 'Luis Glaser'
REQUIRES_PYTHON = '>=3.7.0'
VERSION = '2.1.0'
REQUIRES_PYTHON = '>=3.8.0'
VERSION = '2.1.1'

# What packages are required for this module to be executed?
REQUIRED = [
Expand Down

0 comments on commit 356dd78

Please sign in to comment.