Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add py39 tests #9

Merged
merged 10 commits into from
Nov 27, 2023
Merged
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/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.11" ]
python-version: [ "3.11", "3.9" ]
pydantic: [ "pydantic1", "pydantic2" ]
steps:
- uses: actions/checkout@v2
Expand Down
10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "semra"
dynamic = ["version"]
description = 'Semantic Mapping Reasoning Assembler'
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.9"
license = "MIT"
keywords = []
authors = [
Expand All @@ -16,6 +16,7 @@ authors = [
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
Expand All @@ -31,6 +32,7 @@ dependencies = [
"bioregistry",
"bioontologies",
"pyobo",
"typing_extensions",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -74,7 +76,7 @@ cov = [
]

[[tool.hatch.envs.all.matrix]]
python = ["3.10", "3.11"]
python = ["3.9", "3.11"]

[tool.hatch.envs.lint]
detached = true
Expand All @@ -100,11 +102,11 @@ all = [
]

[tool.black]
target-version = ["py311"]
target-version = ["py39"]
line-length = 120

[tool.ruff]
target-version = "py311"
target-version = "py39"
line-length = 120
select = [
"A",
Expand Down
7 changes: 4 additions & 3 deletions src/semra/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
import os
import typing as t
from collections import Counter
from typing import Any, TypeAlias
from typing import Any

import bioregistry
import neo4j
import neo4j.graph
import networkx as nx
import pydantic
from neo4j import Transaction, unit_of_work
from typing_extensions import TypeAlias

import semra
from semra import Evidence, MappingSet, Reference
Expand All @@ -25,9 +26,9 @@

Node: TypeAlias = t.Mapping[str, Any]

TxResult: TypeAlias = list[list[Any]] | None
TxResult: TypeAlias = t.Optional[list[list[Any]]]

ReferenceHint: TypeAlias = str | Reference
ReferenceHint: TypeAlias = t.Union[str, Reference]


class Neo4jClient:
Expand Down
Loading