Skip to content

Commit 44be3c0

Browse files
committed
move to 'src' structure & migrate to pyproject.toml
1 parent 64e086d commit 44be3c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+8
-28
lines changed

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ['setuptools>=61.0']
3+
build-backend = 'setuptools.build_meta'

run_tests.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import unittest
22

33
if __name__ == '__main__':
4-
unittest.main('flowkit.tests')
4+
unittest.main('tests')

setup.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from setuptools import setup, find_packages
55

66
# read in version string
7-
VERSION_FILE = 'flowkit/_version.py'
7+
VERSION_FILE = 'src/flowkit/_version.py'
88
__version__ = None # to avoid inspection warning and check if __version__ was loaded
99
exec(open(VERSION_FILE).read())
1010

@@ -31,7 +31,8 @@
3131
setup(
3232
name='FlowKit',
3333
version=__version__, # noqa PyTypeChecker
34-
packages=find_packages(exclude=["flowkit/tests/"]),
34+
packages=['flowkit'],
35+
package_dir={'': 'src'},
3536
package_data={'': ['_resources/*.xsd']},
3637
include_package_data=True,
3738
description='Flow Cytometry Toolkit',
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

flowkit/tests/export_gml_tests.py tests/export_gml_tests.py

-4
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,12 @@
22
Tests for exporting to GatingML
33
"""
44
import unittest
5-
import sys
6-
import os
75
import glob
86
import re
97
from io import BytesIO
108
import numpy as np
119
import pandas as pd
1210

13-
sys.path.append(os.path.abspath('../..'))
14-
1511
from flowkit import Sample, Session
1612

1713
data1_fcs_path = 'data/gate_ref/data1.fcs'
File renamed without changes.
File renamed without changes.

flowkit/tests/gating_strategy_custom_gates_tests.py tests/gating_strategy_custom_gates_tests.py

-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
Tests for custom gates in the GatingStrategy Class
33
"""
44
import copy
5-
import os
6-
import sys
75
import unittest
86
import flowkit as fk
97

10-
sys.path.append(os.path.abspath('../..'))
11-
128

139
class GatingStrategyCustomGatesTestCase(unittest.TestCase):
1410
def setUp(self):

flowkit/tests/gating_strategy_prog_gate_tests.py tests/gating_strategy_prog_gate_tests.py

-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
"""
44
import copy
55
import unittest
6-
import sys
7-
import os
86
import numpy as np
97
import pandas as pd
108

11-
sys.path.append(os.path.abspath('../..'))
12-
139
import flowkit as fk
1410

1511
data1_fcs_path = 'data/gate_ref/data1.fcs'
File renamed without changes.

flowkit/tests/gatingml_tests.py tests/gatingml_tests.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
import unittest
2-
import sys
3-
import os
42
import glob
53
import re
64
import numpy as np
75
import pandas as pd
86

9-
sys.path.append(os.path.abspath('../..'))
10-
11-
from flowkit import Sample, GatingStrategy, Session, gates, parse_gating_xml
7+
from flowkit import Sample, GatingStrategy, Session, parse_gating_xml
128

139
data1_fcs_path = 'data/gate_ref/data1.fcs'
1410
data1_sample = Sample(data1_fcs_path)
File renamed without changes.
File renamed without changes.
File renamed without changes.

flowkit/tests/sample_tests.py tests/sample_tests.py

-4
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@
33
"""
44
import copy
55
import unittest
6-
import sys
7-
import os
86
from pathlib import Path
97
import numpy as np
108
import pandas as pd
119
import flowio
1210
import warnings
1311

14-
sys.path.append(os.path.abspath('../..'))
15-
1612
from flowkit import Sample, transforms, read_multi_dataset_fcs
1713
from flowkit.exceptions import DataOffsetDiscrepancyError
1814

File renamed without changes.

flowkit/tests/session_tests.py tests/session_tests.py

-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
"""
44
import copy
55
import unittest
6-
import sys
7-
import os
86
import numpy as np
97
import pandas as pd
108

11-
sys.path.append(os.path.abspath('../..'))
12-
139
from flowkit import Session, Sample, Matrix, Dimension, gates, transforms, load_samples
1410
from .gating_strategy_prog_gate_tests import data1_sample, poly1_gate, poly1_vertices, comp_matrix_01, asinh_xform1
1511

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)