forked from bede/primaschema
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
76 changed files
with
6,550 additions
and
1,507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.2.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.4.4 | ||
hooks: | ||
- id: ruff | ||
args: [ --fix ] | ||
- id: ruff-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools >= 64", | ||
"wheel >= 0.37.1", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["flit_core >=3.2,<4"] | ||
build-backend = "flit_core.buildapi" | ||
|
||
[project] | ||
name = "primaschema" | ||
description = "A toolkit for primer scheme defintions" | ||
authors = [ | ||
{name = "Bede Constantinides", email="[email protected]"}, | ||
{name = "Peter van Heusden", email="[email protected]"} | ||
] | ||
dynamic = ["version", "description"] | ||
readme = "README.md" | ||
requires-python = ">=3.10" | ||
requires-python = ">=3.8" | ||
keywords = ["genomics"] | ||
license = {text = "MIT License"} | ||
classifiers = [ | ||
"Framework :: Django", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.12", | ||
"Environment :: Console", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: MIT License", | ||
|
@@ -23,21 +24,33 @@ classifiers = [ | |
"Operating System :: MacOS", | ||
] | ||
dependencies = [ | ||
"biopython == 1.80", | ||
"defopt == 6.4.0", | ||
"pandas >= 1.5.3", | ||
"pre-commit", | ||
"pytest", | ||
"altair>=5.3.0", | ||
"biopython>=1.80", | ||
"defopt==6.4.0", | ||
"httpx>=0.27.0", | ||
"jsonschema", | ||
"pyyaml", | ||
"linkml==1.5.2", | ||
"linkml", | ||
"natsort>=8.4.0", | ||
"pandas>=1.5.3", | ||
"platformdirs>=4.2.2", | ||
"pydantic>=2.0.0", | ||
"pyyaml>=6.0.2", | ||
"vl-convert-python>=1.6.0" | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.scripts] | ||
primaschema = "primaschema.cli:main" | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "primaschema.__version__"} | ||
[project.urls] | ||
Home = "https://github.com/pha4ge/primaschema" | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"pytest", | ||
"pre-commit", | ||
"flit" | ||
] | ||
|
||
[tool.flit.external-data] | ||
directory = "test" | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,64 @@ | ||
"""Infrastructure for tiled amplicon PCR primer scheme definitions""" | ||
|
||
import logging | ||
import logging.config | ||
import os | ||
|
||
from pathlib import Path | ||
|
||
__version__ = "0.2.0" | ||
from platformdirs import user_data_dir | ||
|
||
|
||
__version__ = "1.0.0a0" | ||
|
||
|
||
SCHEMES_ARCHIVE_URL = os.environ.get( | ||
"PRIMASCHEMA_SCHEMES_ARCHIVE_URL", | ||
"https://github.com/pha4ge/primer-schemes/archive/refs/heads/main.tar.gz", | ||
) | ||
CACHE_DIR = Path( | ||
os.environ.get("PRIMASCHEMA_CACHE_DIR") or user_data_dir("primaschema", "PHA4GE") | ||
) | ||
|
||
PKG_DIR = Path( | ||
os.environ.get( | ||
"PRIMASCHEMA_ROOT_PATH", Path(__file__).absolute().parent.parent.parent | ||
) | ||
) | ||
SCHEMA_DIR = PKG_DIR / "src" / "primaschema" / "schema" | ||
MANIFEST_SCHEMA_PATH = SCHEMA_DIR / "manifest.json" | ||
MANIFEST_HEADER_PATH = SCHEMA_DIR / "manifest-header.yml" | ||
|
||
logging_config = { | ||
"version": 1, | ||
"disable_existing_loggers": False, | ||
"formatters": { | ||
"default": { | ||
"format": "%(name)s %(levelname)s: %(message)s", | ||
}, | ||
}, | ||
"handlers": { | ||
"console": { | ||
"class": "logging.StreamHandler", | ||
"formatter": "default", | ||
"level": "INFO", | ||
"stream": "ext://sys.stderr", | ||
}, | ||
}, | ||
"root": { | ||
"handlers": ["console"], | ||
"level": "INFO", | ||
}, | ||
"loggers": { | ||
"primaschema": { | ||
"handlers": ["console"], | ||
"level": "INFO", | ||
"propagate": False, | ||
}, | ||
}, | ||
} | ||
|
||
logging.config.dictConfig(logging_config) | ||
logger = logging.getLogger("primaschema") | ||
|
||
# pkg_dir = Path(__file__) | ||
# data_dir = pkg_dir.parent / "data" | ||
logger.debug(f"{PKG_DIR=} {SCHEMA_DIR=}") |
Oops, something went wrong.