Skip to content

Commit

Permalink
#3 change dir structure
Browse files Browse the repository at this point in the history
  • Loading branch information
jschalk committed Aug 18, 2023
1 parent 18fdf2e commit 8b25eac
Show file tree
Hide file tree
Showing 160 changed files with 354 additions and 280 deletions.
8 changes: 4 additions & 4 deletions Edit5Issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
from ui.World5IssueUI import Ui_Form
from PyQt5 import QtWidgets as qtw
from PyQt5 import QtCore as qtc
from lib.pyqt5_tools.pyqt_func import lw_diplay
from lib.agent.agent import AgentUnit
from lib.agent.brand import brandunit_shop
from lib.agent.ally import allylink_shop
from src.pyqt5_tools.pyqt_func import lw_diplay
from src.agent.agent import AgentUnit
from src.agent.brand import brandunit_shop
from src.agent.ally import allylink_shop


class Edit5Issue(qtw.QTableWidget, Ui_Form):
Expand Down
4 changes: 2 additions & 2 deletions EditAgenda.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from PyQt5.QtCore import pyqtSignal as qsig
from PyQt5.QtWidgets import QWidget as qw
from PyQt5.QtWidgets import QTableWidgetItem as qti
from lib.pyqt5_tools.pyqt_func import num2str, lw_diplay
from lib.agent.hreg_time import (
from src.pyqt5_tools.pyqt_func import num2str, lw_diplay
from src.agent.hreg_time import (
SuffFactUnitHregTime,
_get_time_hreg_weekday_idea,
convert1440toHHMM,
Expand Down
8 changes: 4 additions & 4 deletions EditAlly.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
from PyQt5 import QtWidgets as qtw
from PyQt5 import QtCore as qtc
from EditAlly2bd import EditAlly2bd
from lib.pyqt5_tools.pyqt_func import lw_diplay
from lib.agent.agent import AgentUnit
from lib.agent.brand import brandunit_shop
from lib.agent.ally import allylink_shop
from src.pyqt5_tools.pyqt_func import lw_diplay
from src.agent.agent import AgentUnit
from src.agent.brand import brandunit_shop
from src.agent.ally import allylink_shop


class EditAlly(qtw.QTableWidget, Ui_Form):
Expand Down
12 changes: 6 additions & 6 deletions EditIdeaUnit.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# command to for converting ui form to python file: pyuic5 ui\EditIdeaUnitUI.ui -o ui\EditIdeaUnitUI.py
import sys
from lib.agent.idea import IdeaKid, IdeaAttrHolder
from src.agent.idea import IdeaKid, IdeaAttrHolder
from ui.EditIdeaUnitUI import Ui_Form
from PyQt5 import QtWidgets as qtw, QtCore
from PyQt5.QtWidgets import QTableWidgetItem as qtw1, QTableWidget as qtw0
from lib.agent.hreg_time import SuffFactUnitHregTime
from lib.agent.brand import BrandLink, BrandName
from lib.agent.required import Road
from lib.agent.hreg_time import get_24hr, get_60min
from lib.pyqt5_tools.pyqt_func import (
from src.agent.hreg_time import SuffFactUnitHregTime
from src.agent.brand import BrandLink, BrandName
from src.agent.required import Road
from src.agent.hreg_time import get_24hr, get_60min
from src.pyqt5_tools.pyqt_func import (
num2str,
bool_val,
str2float,
Expand Down
2 changes: 1 addition & 1 deletion EditMain.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from PyQt5.QtWidgets import QTableWidgetItem as qtw1
from EditIdeaUnit import EditIdeaUnit
from EditAlly import EditAlly
from lib.pyqt5_tools.pyqt_func import (
from src.pyqt5_tools.pyqt_func import (
lw_diplay,
get_pyqttree,
str2float as pyqt_func_str2float,
Expand Down
8 changes: 4 additions & 4 deletions EditProblem.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
from PyQt5.QtWidgets import QTableWidgetItem as qti
from EditIdeaUnit import EditIdeaUnit
from EditAlly import EditAlly
from lib.pyqt5_tools.pyqt_func import lw_diplay, get_pyqttree, num2str
from lib.agent.brand import brandunit_shop, brandlink_shop
from lib.agent.idea import IdeaKid
from lib.agent.road import Road, get_walk_from_road, get_terminus_node_from_road
from src.pyqt5_tools.pyqt_func import lw_diplay, get_pyqttree, num2str
from src.agent.brand import brandunit_shop, brandlink_shop
from src.agent.idea import IdeaKid
from src.agent.road import Road, get_walk_from_road, get_terminus_node_from_road
from sys import exit as sys_exit

# self.problem_name_text
Expand Down
2 changes: 0 additions & 2 deletions lib/agent/examples/get_agent_examples_dir.py

This file was deleted.

10 changes: 5 additions & 5 deletions main_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
from EditAcptFactTime import EditAcptFactTime
from EditAgenda import EditAgenda
from EditProblem import EditProblem
from lib.agent.agent import AgentUnit, get_from_json
from lib.agent.examples.get_agent_examples_dir import get_agent_examples_dir
from lib.agent.hreg_time import convert1440toHHMM
from lib.pyqt5_tools.pyqt_func import (
from src.agent.agent import AgentUnit, get_from_json
from src.agent.examples.get_agent_examples_dir import get_agent_examples_dir
from src.agent.hreg_time import convert1440toHHMM
from src.pyqt5_tools.pyqt_func import (
lw_diplay as pyqt_func_lw_diplay,
str2float as pyqt_func_str2float,
num2str as pyqt_func_num2str,
)
from lib.agent.x_func import save_file as x_func_save_file
from src.agent.x_func import save_file as x_func_save_file
from sys import exit as sys_exit

# """Simple test application for dealing with multiple windows"""
Expand Down
12 changes: 6 additions & 6 deletions main_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
from Edit5Issue import Edit5Issue
from EditMain import EditMainView
from PyQt5 import QtCore as qtc
from lib.agent.agent import AgentUnit
from src.agent.agent import AgentUnit
from sys import argv as sys_argv, exit as sys_exit
from PyQt5.QtWidgets import (
QTableWidgetItem as qtw1,
QApplication,
QMainWindow,
)
from lib.world.world import WorldUnit
from lib.world.examples.env_tools import (
from src.world.world import WorldUnit
from src.world.examples.env_tools import (
create_test_worlds_list,
setup_test_example_environment,
create_test_world,
delete_dir_test_world,
rename_test_world,
get_test_worlds_dir,
)
from lib.world.agentlink import get_agentlink_types, agentlink_shop
from lib.agent.x_func import (
from src.world.agentlink import get_agentlink_types, agentlink_shop
from src.agent.x_func import (
open_file as x_func_open_file,
dir_files as x_func_dir_files,
)
from lib.pyqt5_tools.pyqt_func import lw_diplay
from src.pyqt5_tools.pyqt_func import lw_diplay


class MainApp(QApplication):
Expand Down
20 changes: 10 additions & 10 deletions lib/agent/agent.py → src/agent/agent.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import dataclasses
import json
from datetime import datetime
from lib.agent.ally import (
from src.agent.ally import (
AllyName,
AllyUnit,
AllyLink,
Expand All @@ -10,7 +10,7 @@
allylink_shop,
AllyUnitExternalMetrics,
)
from lib.agent.brand import (
from src.agent.brand import (
BrandLink,
BrandName,
BrandUnit,
Expand All @@ -19,7 +19,7 @@
brandunit_shop,
brandlink_shop,
)
from lib.agent.required import (
from src.agent.required import (
AcptFactCore,
AcptFactUnit,
AcptFactUnit,
Expand All @@ -32,18 +32,18 @@
requireds_get_from_dict,
sufffactunit_shop,
)
from lib.agent.tree_metrics import TreeMetrics
from lib.agent.x_func import x_get_json
from lib.agent.idea import IdeaCore, IdeaKid, IdeaRoot, IdeaAttrHolder
from lib.agent.hreg_time import (
from src.agent.tree_metrics import TreeMetrics
from src.agent.x_func import x_get_json
from src.agent.idea import IdeaCore, IdeaKid, IdeaRoot, IdeaAttrHolder
from src.agent.hreg_time import (
_get_time_hreg_src_idea,
get_time_min_from_dt as hreg_get_time_min_from_dt,
convert1440toReadableTime,
get_number_with_postfix,
get_jajatime_readable_from_dt,
)
from lib.agent.lemma import Lemmas
from lib.agent.road import (
from src.agent.lemma import Lemmas
from src.agent.road import (
get_walk_from_road,
is_sub_road_in_src_road,
road_validate,
Expand All @@ -53,7 +53,7 @@
get_ancestor_roads,
)
from copy import deepcopy as copy_deepcopy
from lib.agent.x_func import (
from src.agent.x_func import (
save_file as x_func_save_file,
dir_files as x_func_dir_files,
open_file as x_func_open_file,
Expand Down
2 changes: 1 addition & 1 deletion lib/agent/ally.py → src/agent/ally.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from dataclasses import dataclass
from lib.agent.x_func import x_get_dict, return1ifnone as x_func_return1ifnone
from src.agent.x_func import x_get_dict, return1ifnone as x_func_return1ifnone


class InvalidAllyException(Exception):
Expand Down
6 changes: 3 additions & 3 deletions lib/agent/brand.py → src/agent/brand.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import dataclasses
from lib.agent.ally import AllyName, AllyUnit, AllyLink, allylinks_get_from_dict
from lib.agent.x_func import (
from src.agent.ally import AllyName, AllyUnit, AllyLink, allylinks_get_from_dict
from src.agent.x_func import (
x_get_dict,
get_meld_weight,
return1ifnone as x_func_return1ifnone,
)
from lib.agent.road import Road
from src.agent.road import Road


class InvalidBrandException(Exception):
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from lib.agent.idea import IdeaKid
from lib.agent.required import (
from src.agent.idea import IdeaKid
from src.agent.required import (
acptfactunit_shop,
sufffactunit_shop,
RequiredUnit,
acptfactunit_shop,
)
from lib.agent.agent import AgentUnit, get_from_json
from lib.agent.x_func import open_file as x_func_open_file
from lib.agent.examples.get_agent_examples_dir import get_agent_examples_dir
from src.agent.agent import AgentUnit, get_from_json
from src.agent.x_func import open_file as x_func_open_file
from src.agent.examples.get_agent_examples_dir import get_agent_examples_dir


def agent_v001() -> AgentUnit:
Expand Down
2 changes: 2 additions & 0 deletions src/agent/examples/get_agent_examples_dir.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def get_agent_examples_dir():
return "src/agent/examples"
4 changes: 2 additions & 2 deletions lib/agent/hreg_time.py → src/agent/hreg_time.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from lib.agent.required import Road, SuffFactUnit
from lib.agent.idea import IdeaBare as YB
from src.agent.required import Road, SuffFactUnit
from src.agent.idea import IdeaBare as YB
from dataclasses import dataclass
from datetime import datetime

Expand Down
8 changes: 4 additions & 4 deletions lib/agent/idea.py → src/agent/idea.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import dataclasses
from lib.agent.required import (
from src.agent.required import (
AcptFactCore,
AcptFactHeir,
acptfactheir_shop,
Expand All @@ -15,15 +15,15 @@
change_road,
find_replace_road_key_dict,
)
from lib.agent.road import is_sub_road_in_src_road
from lib.agent.brand import (
from src.agent.road import is_sub_road_in_src_road
from src.agent.brand import (
BrandHeir,
BrandLink,
BrandName,
Brandline,
brandheir_shop,
)
from lib.agent.x_func import (
from src.agent.x_func import (
get_on_meld_weight_actions,
get_meld_weight,
return1ifnone as x_func_return1ifnone,
Expand Down
4 changes: 2 additions & 2 deletions lib/agent/lemma.py → src/agent/lemma.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dataclasses import dataclass
from lib.agent.required import AcptFactUnit, Road, acptfactunit_shop
from lib.agent.idea import IdeaKid
from src.agent.required import AcptFactUnit, Road, acptfactunit_shop
from src.agent.idea import IdeaKid


class InvalidLemmaException(Exception):
Expand Down
2 changes: 1 addition & 1 deletion lib/agent/required.py → src/agent/required.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import dataclasses
from lib.agent.road import Road, change_road, find_replace_road_key_dict
from src.agent.road import Road, change_road, find_replace_road_key_dict


class InvalidRequiredException(Exception):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from lib.agent.required import (
from src.agent.required import (
AcptFactUnit,
acptfactunit_shop,
acptfactheir_shop,
Expand Down
4 changes: 2 additions & 2 deletions lib/agent/test_/test_ally.py → src/agent/test_/test_ally.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from lib.agent.ally import (
from src.agent.ally import (
AllyUnit,
AllyName,
allylink_shop,
Expand All @@ -8,7 +8,7 @@
allyrings_get_from_json,
AllyRing,
)
from lib.agent.x_func import x_is_json, x_get_json
from src.agent.x_func import x_is_json, x_get_json
from pytest import raises as pytest_raises


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from lib.agent.ally import AllyName, allylink_shop
from lib.agent.brand import (
from src.agent.ally import AllyName, allylink_shop
from src.agent.brand import (
Brandline,
brandunit_shop,
BrandName,
Expand All @@ -8,7 +8,7 @@
brandheir_shop,
get_from_json as brandunits_get_from_json,
)
from lib.agent.x_func import x_is_json, x_get_json
from src.agent.x_func import x_is_json, x_get_json
from pytest import raises as pytest_raises


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from lib.agent.required import acptfactunit_shop
from lib.agent.lemma import Lemma, Lemmas
from lib.agent.idea import IdeaKid
from src.agent.required import acptfactunit_shop
from src.agent.lemma import Lemma, Lemmas
from src.agent.idea import IdeaKid


def test_lemma_attributes_exist():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from lib.agent.required import (
from src.agent.required import (
RequiredCore,
RequiredHeir,
RequiredUnit,
Expand Down
6 changes: 3 additions & 3 deletions lib/agent/test_/test_road.py → src/agent/test_/test_road.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from lib.agent.road import (
from src.agent.road import (
Road,
change_road,
is_sub_road_in_src_road,
Expand All @@ -10,8 +10,8 @@
road_validate,
get_ancestor_roads,
)
from lib.agent.required import sufffactunit_shop
from lib.agent.idea import IdeaCore
from src.agent.required import sufffactunit_shop
from src.agent.idea import IdeaCore
from pytest import raises as pytest_raises


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from lib.agent.required import SuffFactStatusFinder
from src.agent.required import SuffFactStatusFinder
from pytest import raises as pytest_raises


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from lib.agent.required import (
from src.agent.required import (
sufffactunit_shop,
acptfactheir_shop,
Road,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from lib.agent.required import SuffFactUnit
from lib.agent.hreg_time import SuffFactUnitHregTime
from src.agent.required import SuffFactUnit
from src.agent.hreg_time import SuffFactUnitHregTime
from pytest import raises as pytest_raises


Expand Down
Loading

0 comments on commit 8b25eac

Please sign in to comment.