diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b4883a1..1ac11ee 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -87,7 +87,7 @@ jobs: - name: Run pytest with coverage if: ${{ ( runner.os == 'Linux' ) && ( matrix.python-version == '3.9' ) }} - run: poetry run pytest -q --cov=psseio --cov-report=xml tests + run: poetry run pytest -q --cov=rawxio --cov-report=xml tests - name: Upload coverage if: ${{ ( runner.os == 'Linux' ) && ( matrix.python-version == '3.9' ) }} diff --git a/README.md b/README.md index 4fc2692..ec0d83a 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,13 @@ ## Installation ``` -pip install psseio +pip install rawxio ``` You can also install the in-development version with:: ``` -pip install psseio +pip install rawxio ``` ## Documentation @@ -17,7 +17,7 @@ pip install psseio To use the project: ```python -import psseio +import rawxio ``` ## Development diff --git a/poetry.lock b/poetry.lock index e842112..31196eb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -85,7 +85,7 @@ python-versions = "*" [[package]] name = "exceptiongroup" -version = "1.0.0rc9" +version = "1.0.0" description = "Backport of PEP 654 (exception groups)" category = "dev" optional = false @@ -121,7 +121,7 @@ pyflakes = ">=2.5.0,<2.6.0" [[package]] name = "flake8-bugbear" -version = "22.10.25" +version = "22.10.27" description = "A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle." category = "dev" optional = false @@ -136,7 +136,7 @@ dev = ["tox", "coverage", "hypothesis", "hypothesmith (>=0.2)", "pre-commit"] [[package]] name = "identify" -version = "2.5.7" +version = "2.5.8" description = "File identification library for Python" category = "dev" optional = false @@ -421,19 +421,19 @@ python-versions = ">=3.7" [[package]] name = "virtualenv" -version = "20.16.5" +version = "20.16.6" description = "Virtual Python Environment builder" category = "dev" optional = false python-versions = ">=3.6" [package.dependencies] -distlib = ">=0.3.5,<1" +distlib = ">=0.3.6,<1" filelock = ">=3.4.1,<4" platformdirs = ">=2.4,<3" [package.extras] -docs = ["proselint (>=0.13)", "sphinx (>=5.1.1)", "sphinx-argparse (>=0.3.1)", "sphinx-rtd-theme (>=1)", "towncrier (>=21.9)"] +docs = ["proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-argparse (>=0.3.2)", "sphinx-rtd-theme (>=1)", "towncrier (>=22.8)"] testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=21.3)", "pytest (>=7.0.1)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.6.1)", "pytest-randomly (>=3.10.3)", "pytest-timeout (>=2.1)"] [metadata] diff --git a/pyproject.toml b/pyproject.toml index dc7ac04..bb042cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ [tool.poetry] -name = "psseio" +name = "rawxio" version = "0.0.0" description = "Import/Export rawx" authors = ["Statnett Datascience "] -repository = "https://github.com/statnett/psseio.git" +repository = "https://github.com/statnett/rawxio.git" [tool.poetry.dependencies] python = "^3.9" @@ -65,7 +65,7 @@ precision = 2 [tool.coverage.run] branch = true -source = ["psseio"] +source = ["rawxio"] [tool.pytest.ini_options] log_file = "pytest.log" diff --git a/psseio/__init__.py b/rawxio/__init__.py similarity index 100% rename from psseio/__init__.py rename to rawxio/__init__.py diff --git a/psseio/data_model.py b/rawxio/data_model.py similarity index 100% rename from psseio/data_model.py rename to rawxio/data_model.py diff --git a/psseio/psse.py b/rawxio/rawx.py similarity index 96% rename from psseio/psse.py rename to rawxio/rawx.py index a466ef2..8c0e093 100644 --- a/psseio/psse.py +++ b/rawxio/rawx.py @@ -4,14 +4,13 @@ import hashlib import json import logging -import sys from pathlib import Path from typing import Any, Dict, List, Union from uuid import UUID import pandas as pd -from psseio.data_model import ( +from rawxio.data_model import ( PARAMETER_SETS, DataSetType, get_pk_fields, @@ -21,8 +20,6 @@ logger = logging.getLogger(__name__) -HASH_SHIFT = sys.maxsize + 1 # Amount hash values must be shifted to avoid negative numbers - def get_rawx_record_type(data: Union[List[Any], List[List[Any]]]) -> DataSetType: return DataSetType.DATA_SET if isinstance(data[0], list) else DataSetType.PARAMETER_SET diff --git a/psseio/utils.py b/rawxio/utils.py similarity index 100% rename from psseio/utils.py rename to rawxio/utils.py diff --git a/tests/test_io.py b/tests/test_io.py index 64b41e2..90238af 100644 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -4,8 +4,8 @@ import pandas as pd import pytest -from psseio.psse import raise_on_missing_required_field, read_rawx, write_rawx -from psseio.utils import one2zero_indexed, zero2one_indexed +from rawxio.rawx import raise_on_missing_required_field, read_rawx, write_rawx +from rawxio.utils import one2zero_indexed, zero2one_indexed def minimal_rawx() -> Path: