Skip to content

Commit

Permalink
Move types to models
Browse files Browse the repository at this point in the history
It creates a problem with Python 3.8 on docker as "types" package name
clashes with python "types"
  • Loading branch information
tbarbette committed Nov 15, 2024
1 parent 1a28c9f commit 7497339
Show file tree
Hide file tree
Showing 19 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion integration/test_unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from npf.test import Test
from npf.build import Build
from npf.variable import RangeVariable, SimpleVariable, dtype, numeric_dict
from npf.types.dataset import Run
from npf.models.dataset import Run

import numpy as np
import logging
Expand Down
2 changes: 1 addition & 1 deletion npf/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pathlib import Path
import re
from npf import variable, npf
from npf.types.dataset import Run, Dataset
from npf.models.dataset import Run, Dataset
import copy

renametable = {
Expand Down
2 changes: 1 addition & 1 deletion npf/expdesign/zltexp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import numpy as np
from npf.expdesign.fullexp import FullVariableExpander
from npf.types.dataset import Run
from npf.models.dataset import Run
from npf.variable import Variable

class OptVariableExpander(FullVariableExpander):
Expand Down
2 changes: 1 addition & 1 deletion npf/graph.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from npf.types.dataset import convert_to_xyeb
from npf.models.dataset import convert_to_xyeb
from npf.variable import is_numeric, get_numeric
import numpy as np

Expand Down
10 changes: 5 additions & 5 deletions npf/grapher.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import traceback
import sys

from npf.types.notebook.notebook import prepare_notebook_export
from npf.models.notebook.notebook import prepare_notebook_export

from npf.types.web.web import prepare_web_export
from npf.models.web.web import prepare_web_export
if sys.version_info < (3, 7):
from orderedset import OrderedSet
else:
Expand All @@ -23,9 +23,9 @@
from pygtrie import Trie
from math import log,pow

from npf.types import dataset
from npf.types.series import Series
from npf.types.dataset import Run, XYEB, AllXYEB, group_val, var_divider, mask_from_filter
from npf.models import dataset
from npf.models.series import Series
from npf.models.dataset import Run, XYEB, AllXYEB, group_val, var_divider, mask_from_filter
from npf.variable import is_log, is_numeric, get_numeric, numericable, get_bool, is_bool
from npf.section import SectionVariable
from npf.build import Build
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion npf/types/dataset.py → npf/models/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from npf import npf
from npf.variable import is_numeric, get_numeric, numeric_dict

from npf.types.web.web import prepare_web_export
from npf.models.web.web import prepare_web_export

class Run:
def __init__(self, variables):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion npf/pipeline/pypost.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from typing import List

from npf.types.series import Series
from npf.models.series import Series


def execute_pypost(series: List[Series]):
Expand Down
2 changes: 1 addition & 1 deletion npf/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from npf.grapher import *
from npf.repository import *
from npf.test import Test, SectionScript, ScriptInitException
from npf.types.dataset import Dataset
from npf.models.dataset import Dataset


"""Handles regression tests. That is, given an history of versions, execute tests for all previous versions
Expand Down
2 changes: 1 addition & 1 deletion npf/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from npf.build import Build
from npf.test import Test
from npf.types.dataset import Dataset
from npf.models.dataset import Dataset
from npf import npf

class Statistics:
Expand Down
2 changes: 1 addition & 1 deletion npf/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from npf.section import *
from npf.npf import get_valid_filename
from npf.sections import Section, SectionNull
from npf.types.dataset import Run, Dataset
from npf.models.dataset import Run, Dataset
from npf.eventbus import EventBus
from .variable import get_bool
from decimal import *
Expand Down
4 changes: 2 additions & 2 deletions npf/test_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from npf.repository import Repository
from npf.statistics import Statistics
from npf.test import Test
from npf.types.dataset import Dataset, Run
from npf.types.series import Series
from npf.models.dataset import Dataset, Run
from npf.models.series import Series


"""Runs all tests for a given list of tests (or a folder to expand), and a series of repositories.
Expand Down
2 changes: 1 addition & 1 deletion npf_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from npf import npf

from npf.types.series import Series
from npf.models.series import Series

from npf.test_driver import group_series

Expand Down

0 comments on commit 7497339

Please sign in to comment.