Skip to content

Commit

Permalink
updated to use poetry to manage pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicaw9910 committed Feb 20, 2024
1 parent 9655cc2 commit 9e917d0
Show file tree
Hide file tree
Showing 9 changed files with 828 additions and 82 deletions.
File renamed without changes.
783 changes: 783 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

127 changes: 45 additions & 82 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,91 +1,54 @@
[build-system]
requires = ["setuptools>=61.0", "versioningit~=2.0"]
build-backend = "setuptools.build_meta"

# Self-descriptive entries which should always be present
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
[project]
name = "missense_kinase_toolkit"
[tool.poetry]
name = "missense-kinase-toolkit"
# https://github.com/mtkennerly/poetry-dynamic-versioning/issues/14
version = "0.0.0"
description = "An ETL pipeline package to facilitate structure-based ML for human kinase property prediction"
dynamic = ["version"]
authors = ["Jess White <[email protected]>"]
license = "MIT"
readme = "README.md"
authors = [
{ name = "Jess White", email = "[email protected]" }
]
license = { text = "MIT" }
# See https://pypi.org/classifiers/
repository = "https://github.com/choderalab/missense_kinase_toolkit/"
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
]
requires-python = ">=3.9"
# Declare any run-time dependencies that should be installed with the package.
dependencies = [
"importlib-resources;python_version<='3.11'",
"setuptools",
"pydantic>=1.10,<2",
"tqdm>=4.64.0",
"pandas>=2,<3",
"requests-cache>=0.9.7,<1",
"requests>=2.28.1,<3",
]

# Update the urls once the hosting is set up.
[project.urls]
"Source" = "https://github.com/choderalab/missense_kinase_toolkit/"
#"Documentation" = "https://missense_kinase_toolkit.readthedocs.io/"

[project.optional-dependencies]
test = [
"pytest>=6.1.2",
"pytest-runner"
packages = [
{include = "missense_kinase_toolkit", from="src"},
]

[tool.setuptools]
# This subkey is a beta stage development and keys may change in the future, see https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html for more details
#
# As of version 0.971, mypy does not support type checking of installed zipped
# packages (because it does not actually import the Python packages).
# We declare the package not-zip-safe so that our type hints are also available
# when checking client code that uses our (installed) package.
# Ref:
# https://mypy.readthedocs.io/en/stable/installed_packages.html?highlight=zip#using-installed-packages-with-mypy-pep-561
zip-safe = false
# Let setuptools discover the package in the current directory,
# but be explicit about non-Python files.
# See also:
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#setuptools-specific-configuration
# Note that behavior is currently evolving with respect to how to interpret the
# "data" and "tests" subdirectories. As of setuptools 63, both are automatically
# included if namespaces is true (default), even if the package is named explicitly
# (instead of using 'find'). With 'find', the 'tests' subpackage is discovered
# recursively because of its __init__.py file, but the data subdirectory is excluded
# with include-package-data = false and namespaces = false.
include-package-data = false
[tool.setuptools.packages.find]
namespaces = false
where = ["."]

# Ref https://setuptools.pypa.io/en/latest/userguide/datafiles.html#package-data
[tool.setuptools.package-data]
missense_kinase_toolkit = [
"py.typed"
[tool.poetry.dependencies]
python = "^3.9"
setuptools = "^69.1.0"
pydantic = ">=1.10,<2"
tqdm = "4.64.0"
pandas = ">=2,<3"
requests = ">=2.28.1,<3"
requests-cache = ">=0.9.7,<1"



[tool.poetry.group.dev.dependencies]
black = "^24.2.0"
flake8 = "^7.0.0"


[tool.poetry.group.test.dependencies]
pytest = "^8.0.1"
pytest-runner = "^6.0.1"

[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
pattern = "^(?P<base>\\d+\\.\\d+\\.\\d+)(-?((?P<stage>[a-zA-Z]+)\\.?(?P<revision>\\d+)?))?"
format-jinja = """
{%- if distance == 0 -%}
{{- base -}}
{%- else -%}
{{- base }}.dev{{ distance }}+g{{commit}}.d{{ datetime.now().strftime('%Y%m%d%H%M%S') -}}
{%- endif -%}
"""
format-jinja-imports = [
{ module = "datetime", item = "datetime" }
]

[tool.versioningit]
default-version = "1+unknown"

[tool.versioningit.format]
distance = "{base_version}+{distance}.{vcs}{rev}"
dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"
distance-dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"

[tool.versioningit.vcs]
# The method key:
method = "git" # <- The method name
# Parameters to pass to the method:
match = ["*"]
default-tag = "1.0.0"

[tool.versioningit.write]
file = "missense_kinase_toolkit/_version.py"
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9e917d0

Please sign in to comment.