Skip to content

Commit

Permalink
build: modernize build configs (#533)
Browse files Browse the repository at this point in the history
* Use the "src" layout instead of a "flat" layout
* Move build settings into pyproject.toml
  • Loading branch information
korikuzma authored Feb 13, 2024
1 parent 415b735 commit c73d476
Show file tree
Hide file tree
Showing 128 changed files with 74 additions and 78 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ dist/

.mypy_cache/

variation/data/seqrepo/
variation/data/uta_20180821
variation/data/notebooks
variation/data/*.txt
src/variation/data

Pipfile.lock

Expand Down
79 changes: 72 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,77 @@
[project]
name = "variation-normalizer"
authors = [
{name = "Alex Wagner"},
{name = "Kori Kuzma"},
{name = "James Stevenson"}
]
readme = "README.md"
classifiers = [
"Development Status :: 3 - Alpha",
"Framework :: FastAPI",
"Framework :: Pydantic",
"Framework :: Pydantic :: 2",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
requires-python = ">=3.8"
description = "VICC normalization routine for variations"
license = {file = "LICENSE"}
dependencies = [
"biocommons.seqrepo",
"fastapi",
"uvicorn",
"pydantic ==2.*",
"ga4gh.vrs[extras] ~= 2.0.0a2",
"gene-normalizer ~=0.3.0.dev1",
"boto3",
"cool-seq-tool ~=0.4.0.dev1",
"bioutils"
]
dynamic = ["version"]

[project.optional-dependencies]
test = ["pytest>=6.0", "pytest-cov", "pytest-asyncio"]
dev = ["pre-commit", "ruff==0.2.0", "psycopg2-binary", "jupyter", "ipykernel"]

[project.urls]
Homepage = "https://github.com/cancervariants/variation-normalization"
Documentation = "https://github.com/cancervariants/variation-normalization"
Changelog = "https://github.com/cancervariants/variation-normalization/releases"
Source = "https://github.com/cancervariants/variation-normalization"
"Bug Tracker" = "https://github.com/cancervariants/variation-normalization/issues"

[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta:__legacy__"
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools.dynamic]
version = {attr = "variation.version.__version__"}

# Scanning for namespace packages in the ``src`` directory is true by
# default in pyproject.toml, so you do NOT need to include the
# `tool.setuptools.packages.find` if it looks like the following:
# [tool.setuptools.packages.find]
# namespaces = true
# where = ["src"]

[tool.pytest.ini_options]
addopts = "--cov=src --cov-report term-missing"
testpaths = ["tests"]

[tool.coverage.run]
branch = true

[tool.ruff]
src = ["src"]

lint.select = [
"F", # https://docs.astral.sh/ruff/rules/#pyflakes-f
"E", "W", # https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
Expand Down Expand Up @@ -72,10 +141,6 @@ lint.ignore = [
"S321",
]

exclude = [
"setup.py"
]

[tool.ruff.lint.per-file-ignores]
# ANN001 - missing-type-function-argument
# ANN2 - missing-return-type
Expand All @@ -86,7 +151,7 @@ exclude = [
# B011 - assert-false
# RUF001 - ambiguous-unicode-character-string
"tests/*" = ["ANN001", "ANN102", "ANN2", "S101", "B011"]
"variation/schemas/*" = ["ANN001", "ANN201", "N805", "S101"]
"src/variation/schemas/*" = ["ANN001", "ANN201", "N805", "S101"]
"codebuild/*" = ["T201"]

[tool.ruff.lint.flake8-bugbear]
Expand Down
60 changes: 0 additions & 60 deletions setup.cfg

This file was deleted.

5 changes: 0 additions & 5 deletions setup.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion tests/to_copy_number_variation/test_hgvs_to_copy_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import pytest
from ga4gh.vrs import models

from tests.conftest import cnv_assertion_checks


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import pytest
from ga4gh.vrs import models
from pydantic import ValidationError

from tests.conftest import cnv_assertion_checks

from variation.schemas.copy_number_schema import (
ClinVarAssembly,
Comparator,
Expand Down

0 comments on commit c73d476

Please sign in to comment.