Skip to content

Commit

Permalink
build: clean up project configuration (#41)
Browse files Browse the repository at this point in the history
* move coverage.py and mypy config to pyproject.toml

* remove travis config

* move project metadata from setup.py to pyproject.toml

* add  missing newline

* fix version reading in api docs

* move flake8 config to pyproject and move version to pyproject.toml

* fix version dependency

* fix formatting

* fix dependency error

* fix toml dependency
  • Loading branch information
alohamora authored Nov 9, 2023
1 parent dc32e2a commit b742271
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 118 deletions.
56 changes: 0 additions & 56 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ COPY ./ /app

## Install app
RUN cd /app \
&& python setup.py develop \
&& pip install -r requirements.txt \
&& pip install -e . \
&& cd / \
&& chmod g+w /app/cloud_registry/api/ \
&& pip install yq
Expand Down
3 changes: 0 additions & 3 deletions cloud_registry/version.py

This file was deleted.

5 changes: 4 additions & 1 deletion docs/api/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@
#
from pathlib import Path
import sys
import toml

from sphinx.ext import apidoc

root_dir = Path.cwd().resolve().parents[1]

sys.path.insert(0, root_dir)

exec(open(root_dir / "cloud_registry" / "version.py").read())
with open(root_dir / "pyproject.toml", "r") as f:
config = toml.load(f)
__version__ = config["project"]["version"]


# -- Project information -----------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion docs/api/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Sphinx==7.2.6
readthedocs-sphinx-ext==2.2.3
sphinx-rtd-theme==1.3.0
sphinx-rtd-theme==1.3.0
toml==0.10.0
52 changes: 52 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,55 @@ max-line-length = 88
target-version = ["py310"]
workers = 1

[tool.mypy]
ignore_missing_imports = true

[tool.coverage.run]
source = ["cloud_registry"]
omit = ["cloud_registry/app.py"]

[tool.flake8]
exclude = [".git", ".eggs", "build", "venv", "env"]
max-line-length = 88
extend-ignore = "E203"

[project]
name ="cloud-registry"
version="0.2.0"
authors = [{name = "ELIXIR Cloud & AAI"}, {email = "[email protected]"}]
keywords = [
"ga4gh", "service", "registry", "elixir", "cloud", "rest", "restful",
"api", "app", "server", "openapi", "swagger", "mongodb", "python", "flask"
]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Natural Language :: English",
"Programming Language :: Python :: 3.8",
]
description = "GA4GH Service Registry API implementation for the ELIXIR Cloud"
dynamic = ["dependencies"]

[project.license]
text = "Apache License 2.0"

[project.readme]
file = "README.md"
content-type = "text/markdown"

[project.urls]
homepage = "https://github.com/elixir-cloud-aai/cloud-registry.git"

[tool.setuptools.dynamic.version]
file = ["cloud_registry/version"]

[tool.setuptools.packages.find]
exclude = ["deployment", "docs"]

[tool.setuptools.dynamic.dependencies]
file = ["requirements.txt"]

[tool.setuptools.dynamic.optional-dependencies]
dev = { file = ["requirements_dev.txt"] }
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
connexion>=2.11.2,<3.0.0
foca==0.12.1
3 changes: 2 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
coverage==6.3.2
flake8==4.0.1
Flake8-pyproject==1.2.3
flake8==6.1.0
mongomock==4.0.0
mypy==0.971
pytest==7.1.1
Expand Down
13 changes: 0 additions & 13 deletions setup.cfg

This file was deleted.

38 changes: 0 additions & 38 deletions setup.py

This file was deleted.

3 changes: 0 additions & 3 deletions tests/test_version.py

This file was deleted.

0 comments on commit b742271

Please sign in to comment.