Skip to content

Commit

Permalink
Move tests to root, instruments to under src (#344)
Browse files Browse the repository at this point in the history
* Move tests to root, instruments to under src

* Update coverage files

* Update .gitignore
  • Loading branch information
scasagrande committed Mar 30, 2022
1 parent 722781a commit 3e12bda
Show file tree
Hide file tree
Showing 231 changed files with 83 additions and 74 deletions.
9 changes: 9 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[paths]
source =
src
*/site-packages

[report]
omit =
*/python?.?/*
Expand All @@ -11,4 +16,8 @@ exclude_lines =
raise AssertionError

[run]
branch = false
parallel = true
source =
instruments
relative_files = True
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ coverage.xml
.hypothesis/

# version file generated by setuptools_scm
instruments/_version.py
src/instruments/_version.py
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "instruments/_version.py"
write_to = "src/instruments/_version.py"
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ classifiers =

[options]
include_package_data = True
package_dir =
= src
packages = find:
install_requires =
pint>=0.16.1
Expand All @@ -51,8 +53,7 @@ dev =
six

[options.packages.find]
exclude =
instruments.tests
where = src

[bdist_wheel]
universal = 1
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.
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.
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pytest

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol


# TESTS ######################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from instruments.units import ureg as u

import instruments as ik
from instruments.tests import expected_protocol, unit_eq
from tests import expected_protocol, unit_eq


# TESTS ######################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pytest

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol


# TESTS ######################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pytest

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol


# TESTS ######################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pytest

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol


# TESTS ######################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pytest

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol


# TESTS ######################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pytest

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol


# TESTS ######################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pytest

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol


# TESTS ######################################################################
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from instruments.units import ureg as u

import instruments as ik
from instruments.tests import expected_protocol, make_name_test
from tests import expected_protocol, make_name_test

# TESTS ######################################################################

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import instruments as ik
from instruments.optional_dep_finder import numpy
from instruments.tests import expected_protocol, iterable_eq, make_name_test, unit_eq
from tests import expected_protocol, iterable_eq, make_name_test, unit_eq
from instruments.units import ureg as u

# TESTS ######################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import instruments as ik
from instruments.optional_dep_finder import numpy
from instruments.tests import expected_protocol
from tests import expected_protocol

# pylint: disable=unused-import
from instruments.abstract_instruments.comm import (
Expand All @@ -29,11 +29,10 @@
AbstractCommunicator,
USBTMCCommunicator,
VXI11Communicator,
serial_manager,
SerialCommunicator,
)
from instruments.errors import AcknowledgementError, PromptError
from instruments.tests import iterable_eq
from tests import iterable_eq

from . import mock

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from instruments.units import ureg as u

from instruments.abstract_instruments.comm import GPIBCommunicator, SerialCommunicator
from instruments.tests import unit_eq
from tests import unit_eq
from .. import mock

# TEST CASES #################################################################
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from instruments.units import ureg as u

from instruments.abstract_instruments.comm import SerialCommunicator
from instruments.tests import unit_eq
from tests import unit_eq
from .. import mock

# TEST CASES #################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from instruments.units import ureg as u

from instruments.abstract_instruments.comm import SocketCommunicator
from instruments.tests import unit_eq
from tests import unit_eq
from .. import mock

# TEST CASES #################################################################
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pytest

from instruments.abstract_instruments.comm import USBTMCCommunicator
from instruments.tests import unit_eq
from tests import unit_eq
from instruments.units import ureg as u
from .. import mock

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from instruments.units import ureg as u

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol

# TESTS ######################################################################

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from instruments.units import ureg as u

import instruments as ik
from instruments.tests import expected_protocol, make_name_test
from tests import expected_protocol, make_name_test

# TESTS ######################################################################

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from instruments.units import ureg as u

import instruments as ik
from instruments.tests import expected_protocol, make_name_test, unit_eq
from tests import expected_protocol, make_name_test, unit_eq

# TESTS ######################################################################

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from instruments.units import ureg as u

import instruments as ik
from instruments.tests import expected_protocol, make_name_test, unit_eq
from tests import expected_protocol, make_name_test, unit_eq

# TESTS ######################################################################

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pytest

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol
from instruments.units import ureg as u

# TESTS ######################################################################
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import pytest

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol
from instruments.units import ureg as u


Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from instruments.units import ureg as u

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol
from .. import mock

# TEST CLASSES ################################################################
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import pytest

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol
from instruments.units import ureg as u

# TESTS #######################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import pytest

import instruments as ik
from instruments.tests import (
from tests import (
expected_protocol,
iterable_eq,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from instruments.units import ureg as u

import instruments as ik
from instruments.tests import expected_protocol, make_name_test, unit_eq
from tests import expected_protocol, make_name_test, unit_eq

# TESTS #######################################################################

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import pytest

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol

# TESTS #######################################################################

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from instruments.units import ureg as u

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol


# TESTS #######################################################################
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import pytest

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol
from instruments.units import ureg as u

# TESTS ######################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import instruments as ik
from instruments.optional_dep_finder import numpy
from instruments.tests import (
from tests import (
expected_protocol,
iterable_eq,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from instruments.units import ureg as u

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol


# TESTS ######################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import pytest

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol
from instruments.units import ureg as u


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from instruments.units import ureg as u

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol

# TESTS #######################################################################

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pytest

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol
from instruments.units import ureg as u

# TESTS #######################################################################
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import instruments as ik
from instruments.units import ureg as u
from instruments.tests import expected_protocol
from tests import expected_protocol

# TESTS ######################################################################

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import instruments as ik
from instruments.units import ureg as u
from instruments.tests import expected_protocol
from tests import expected_protocol

# TESTS ######################################################################

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import instruments as ik
from instruments.units import ureg as u
from instruments.tests import expected_protocol
from tests import expected_protocol

# TESTS ######################################################################

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from instruments.units import ureg as u

import instruments as ik
from instruments.tests import expected_protocol
from tests import expected_protocol


# TESTS ######################################################################
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 3e12bda

Please sign in to comment.