Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/full_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.10", "3.11"]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
rev: v2.6.0
hooks:
- id: reorder-python-imports
files: ^src/|test/
files: ^ait/|tests/

- repo: local
hooks:
Expand All @@ -27,7 +27,7 @@ repos:
- id: black
name: black
entry: black
files: ^src/|test/
files: ^ait/|tests/
language: system
types: [python]

Expand Down
6 changes: 2 additions & 4 deletions .python-version
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
3.7.15
3.8.15
3.9.15
3.10.8
3.10.20
3.11
4 changes: 2 additions & 2 deletions ait/core/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"""

import os
import pkg_resources
from importlib.resources import files
import struct
import yaml
from io import IOBase
Expand Down Expand Up @@ -513,7 +513,7 @@ def getDefaultDictFilename(): # noqa


def getDefaultSchema(): # noqa
return pkg_resources.resource_filename("ait.core", "data/cmd_schema.json")
return str(files("ait.core").joinpath("data/cmd_schema.json"))


def getMaxCmdSize(): # noqa
Expand Down
4 changes: 2 additions & 2 deletions ait/core/evr.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"""

import os
import pkg_resources
from importlib.resources import files
import re
import yaml

Expand Down Expand Up @@ -73,7 +73,7 @@ def toJSON(self): # noqa


def getDefaultSchema(): # noqa
return pkg_resources.resource_filename("ait.core", "data/evr_schema.json")
return str(files("ait.core").joinpath("data/evr_schema.json"))


def getDefaultDict(reload=False): # noqa
Expand Down
7 changes: 4 additions & 3 deletions ait/core/limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@
"""

import os
import pkg_resources
import yaml
from importlib.resources import files
from io import IOBase

import yaml

import ait
from ait.core import json, util

Expand Down Expand Up @@ -218,7 +219,7 @@ def getDefaultDict(reload=False): # noqa


def getDefaultSchema(): # noqa
return pkg_resources.resource_filename("ait.core", "data/limits_schema.json")
return str(files("ait.core").joinpath("data/limits_schema.json"))


def getDefaultDictFilename(): # noqa
Expand Down
9 changes: 5 additions & 4 deletions ait/core/tlm.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@
"""

import collections.abc
import csv
import os
import pkg_resources
import struct
import yaml
import csv
from importlib.resources import files
from io import IOBase

import yaml

import ait
from ait.core import dtype, json, log, util

Expand Down Expand Up @@ -1094,7 +1095,7 @@ def getDefaultDict(reload=False): # noqa


def getDefaultSchema(): # noqa
return pkg_resources.resource_filename("ait.core", "data/tlm_schema.json")
return str(files("ait.core").joinpath("data/tlm_schema.json"))


def getDefaultDictFilename(): # noqa
Expand Down
2,855 changes: 1,529 additions & 1,326 deletions poetry.lock

Large diffs are not rendered by default.

35 changes: 17 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,25 @@ repository = 'https://github.com/NASA-AMMOS/AIT-Core'
documentation = 'https://ait-core.readthedocs.io/en/latest'
authors = ['AMMOS Instrument Toolkit Development Team <ait-pmc@googlegroups.com>']

packages = [
{include = "ait"}
]
packages = [{ include = "ait" }]

include = [
"ait/core/data/*.json"
]
include = ["ait/core/data/*.json"]

[tool.poetry.dependencies]
python = '>= 3.7 < 3.11'
bottle = '0.12.23'
jsonschema = '3.0.2'
pyyaml = '5.3.1' # Temporarily pinning this to 5.3.1 because pyyaml and Cython 3 don't get along
requests = '>= 2.22.0'
greenlet = '1.1.3'
gevent = '*'
gevent-websocket = '0.10.1'
pyzmq = '24.0.0'
gipc = "^1.1.0"
setproctitle = "^1.2.3"
python = ">= 3.10 < 3.12"
bottle = "0.12.23"
jsonschema = "4.25.1"
pyyaml = "6.0.1"
requests = ">= 2.22.0"
greenlet = "^3.1.1"
gevent = "25.9.1"
gevent-websocket = "0.10.1"
pyzmq = "24.0.0"
gipc = "^1.1.0"
setproctitle = "^1.2.3"
msgpack = "1.0.5"
importlib_metadata = "4.3.0"
importlib_resources = "6.5.2"

[tool.poetry.dev-dependencies]
black = '*'
Expand All @@ -51,7 +50,7 @@ pytest-cov = '*'
pytest-watch = '*'
pytest-xdist = '*'
pre-commit = '*'
sphinx = '>= 4.2'
sphinx = "4.4"
sphinx-rtd-theme = '*'
sphinxcontrib-httpdomain = '*'
tox = '>= 3.8 < 4.0'
Expand Down
8 changes: 4 additions & 4 deletions tests/ait/core/test_val.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
gevent.monkey.patch_all()

import os
import pkg_resources
from importlib.resources import files
import jsonschema

import pytest
Expand Down Expand Up @@ -441,7 +441,7 @@ def testTlmDictValidation():
def testEvrValidation():
# Validation test of current telemetry dictionary
yml = ait.config.evrdict.filename
schema = os.path.join(os.path.dirname(yml), evr.getDefaultSchema())
schema = str(os.path.join(os.path.dirname(yml), evr.getDefaultSchema()))
msgs, v = validate_schema([yml, schema])
dispmsgs(msgs)
assert v
Expand All @@ -451,7 +451,7 @@ def testEvrValidation():
def testTableValidation():
# Validation test of current table configuration
yml = ait.config.table.filename
schema = pkg_resources.resource_filename("ait.core", "data/table_schema.json")
schema = str(files("ait.core").joinpath("data/table_schema.json"))
msgs, v = validate_schema([yml, schema])
dispmsgs(msgs)
assert v
Expand All @@ -461,7 +461,7 @@ def testTableValidation():
def testLimitsValidation():
# Validation test of current table configuration
yml = ait.config.limits.filename
schema = pkg_resources.resource_filename("ait.core", "data/limits_schema.json")
schema = str(files("ait.core").joinpath("data/limits_schema.json"))
msgs, v = validate_schema([yml, schema])
dispmsgs(msgs)
assert v
Expand Down
Binary file modified tests/ait/core/testdata/dmc/leapseconds.dat
Binary file not shown.
10 changes: 2 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
[tox]
envlist =
py37
py38
py39
py310
py311
docs
lint

isolated_build = True

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310, docs, lint, distcheck
3.11: py311, docs, lint, distcheck

[testenv]
setenv = AIT_CONFIG = {toxinidir}/config/config.yaml
Expand All @@ -31,15 +27,13 @@ commands_pre =
poetry install
commands =
poetry run sphinx-build doc/source doc/build
basepython = python3.10

[testenv:lint]
setenv = AIT_CONFIG = {toxinidir}/config/config.yaml
commands_pre =
poetry install
commands=
python -m pre_commit run --color=always {posargs:--all}
basepython = python3.10

[testenv:distcheck]
skip_install = true
Expand Down