Changeset - afabea7d0e61
[Not reviewed]
default
7 3 7
Laman - 3 years ago 2022-03-05 22:19:35

renamed sgfparser, game_record, prop_values
10 files changed with 11 insertions and 11 deletions:
0 comments (0 inline, 0 general)
src/diana/diana.py
Show inline comments
 
import os
 
import re
 

	
 
from . import config as cfg
 
from . import go
 
from .go import BLACK, WHITE, EMPTY
 
from .sgfParser import ParserError
 
from .sgfParser.collection import Collection
 
from .sgfparser import ParserError
 
from .sgfparser.collection import Collection
 
from .drawer.svg import Svg
 
from .drawer.tikz import Tikz
 

	
 

	
 
def collect_moves(root):
 
	node = root
src/diana/drawer/base.py
Show inline comments
 
@@ -12,13 +12,13 @@ class DiagramPoint:
 
		self.label = label
 

	
 
	def __repr__(self):
 
		return 'DiagramPoint({0},{1},"{2}","{3}")'.format(self.x, self.y, self.color, self.label)
 

	
 

	
 
class Base:
 
class Drawer:
 
	high_numbers = True
 

	
 
	def __init__(self, start=0):
 
		self.overlays = []
 
		self._letter = "a"
 

	
src/diana/drawer/svg.py
Show inline comments
 
from .base import Base
 
from .base import Drawer
 

	
 

	
 
def adjust_font(base, text):
 
	text = str(text)
 
	if len(text) < 2:
 
		return round(0.7*base)
 
	elif len(text) < 3:
 
		return round(0.55*base)
 
	else:
 
		return round(0.4*base)
 

	
 

	
 
class Svg(Base):
 
class Svg(Drawer):
 
	extension = "svg"
 

	
 
	padding = 15
 
	high_numbers = True
 
	
 
	def __init__(self, start=0):
src/diana/sgfparser/__init__.py
Show inline comments
 
file renamed from src/diana/sgfParser/__init__.py to src/diana/sgfparser/__init__.py
src/diana/sgfparser/collection.py
Show inline comments
 
file renamed from src/diana/sgfParser/collection.py to src/diana/sgfparser/collection.py
 
from .node import Node
 
from . import skip_whitespace, ParserError
 
from .gameRecord import GameRecord
 
from .game_record import GameRecord
 

	
 

	
 
class Collection:
 
	def __init__(self, s):
 
		self.game_trees = []
 
		i = skip_whitespace(s, 0)
src/diana/sgfparser/game_record.py
Show inline comments
 
file renamed from src/diana/sgfParser/gameRecord.py to src/diana/sgfparser/game_record.py
src/diana/sgfparser/node.py
Show inline comments
 
file renamed from src/diana/sgfParser/node.py to src/diana/sgfparser/node.py
src/diana/sgfparser/prop_values.py
Show inline comments
 
file renamed from src/diana/sgfParser/propValues.py to src/diana/sgfparser/prop_values.py
src/diana/sgfparser/property.py
Show inline comments
 
file renamed from src/diana/sgfParser/property.py to src/diana/sgfparser/property.py
 
import re
 
from datetime import date
 
import logging as log
 

	
 
from .propValues import choose, singleton, list_of, compose, number, real, double, color, text, empty, anything, point, move, stone
 
from .prop_values import choose, singleton, list_of, compose, number, real, double, color, text, empty, anything, point, move, stone
 
from . import skip_whitespace, ParserError
 

	
 
GAME_INFO = 1
 
UNKNOWN = 99
 

	
 

	
src/diana/tests/test_sgf_parser.py
Show inline comments
 
file renamed from src/diana/tests/testSgfParser.py to src/diana/tests/test_sgf_parser.py
 
from itertools import chain
 
from datetime import date
 
import unittest
 
from unittest import TestCase
 
import os
 

	
 
from ..sgfParser import str_row_col
 
from ..sgfParser.collection import Collection
 
from ..sgfParser.property import Property, DateProperty, DateException
 
from ..sgfParser.propValues import text, compose
 
from ..sgfparser import str_row_col
 
from ..sgfparser.collection import Collection
 
from ..sgfparser.property import Property, DateProperty, DateException
 
from ..sgfparser.prop_values import text, compose
 

	
 

	
 
dataDir = os.path.join(os.path.dirname(__file__), "data")
 

	
 

	
 
class TestUtils(TestCase):
0 comments (0 inline, 0 general)