Package: omsutils
OMS Utility LibraryCommon tools that are used across OMS.DescriptionA collection of fileio, gridding, ...Getting StartedDependenciespytest, wheel, setuptoolsInstallingomsutils is not yet available on PyPI, so the suggested method to install is as follows:$ git clone git@github.com:OrbitalMicro/omsutils.git
$ cd omsutilsIt is recommended to install the package in a virtual environment
to avoid conflicts with system packages.# create your virtual environment
$ python3.8 -m venv py38

# activate your virtual environment
$ source py38/bin/activateIf you install outside of the virtual environment you will get the message:Defaulting to user installation because normal site-packages is not writeableWe can install the package only, package in editable mode, and package with tests.# Package Only
$ pip install .# Package Only in editable mode
$ pip install -e .# Packages and testing
$ python setup.py installCreating a PackageThe generic package structure isomsutils
├── LICENSE                    ┐
├── setup.cfg                  │
├── setup.py                   │
├── docs                       │ Package documentation
│   └── ...                    │
├── LICENSE                    │
├── README.md                  ┘
├── pyproject.toml             ┐
├── src                        │
│   └── omsutils               │ Package source code, metadata,
│       ├── __init__.py        │ and build instructions
│       ├── moduleA.py         │
│       ├── moduleB.py         │
│       └── submodule          │
│           ├── __init__.py    │
│           ├── moduleA.py     │
│           └── moduleB.py     ┘
└── tests                      ┐
    └── ...                    ┘ Package testsTo add a new moduleAdd module file to omsutils that contains function definitions
for example gridding.py.To call the packagefrom omsutils import griddingTestingInstall pytestpip install -U pytestTests go in the tests folder# content of test_sample.py
def func(x):
    return x + 1


def test_answer():
    assert func(3) == 5Run TestsTo execute the test function:$ pytest
=========================== test session starts ============================
platform linux -- Python 3.x.y, pytest-6.x.y, py-1.x.y, pluggy-1.x.y
cachedir: $PYTHON_PREFIX/.pytest_cache
rootdir: $REGENDOC_TMPDIR
collected 1 item

test_sample.py F                                                     [100%]

================================= FAILURES =================================
_______________________________ test_answer ________________________________

    def test_answer():
>       assert func(3) == 5
E       assert 4 == 5
E        +  where 4 = func(3)

test_sample.py:6: AssertionError
========================= short test summary info ==========================
FAILED test_sample.py::test_answer - assert 4 == 5
============================ 1 failed in 0.12s =============================this will run all files of the form test_*.py or *_test.py in the current directory and its subdirectoruiesGroup multiple tests in a class# content of test_class.py
class TestClass:
    def test_one(self):
        x = "this"
        assert "h" in x

    def test_two(self):
        x = "hello"
        assert hasattr(x, "check")HelpAny advise for common problems or issues.command to run if program contains helper infoAuthorsContributors names and contact infoex. Dominique Pizzie
ex.@DomPizzieVersion History0.2Various bug fixes and optimizationsSeecommit changeor Seerelease history0.1Initial ReleaseLicenseThis project is licensed under the [NAME HERE] License - see the LICENSE.md file for detailsAcknowledgmentsInspiration, code snippets, etc.awesome-readmePurpleBoothdbaderzenorochafvcproductions