# Build system backend to create package to upload on pypi
[build-system]
build-backend = "setuptools.build_meta"
requires = [
    "setuptools>=68.2.0",
    "setuptools_scm[toml]>=8.0.0",
    "build>=1.0.0"
]

# configuration of setuptools_scm to use tag version autoincrementation
#[tool.setuptools_scm]
#write_to = "ikiss/_version.py"
#version_scheme = "release-branch-semver"
#tag_regex = "^(\\d.\\d.\\d)-*\\w*\\d*$"
#local_scheme = "no-local-version"


[tool.setuptools_scm]
write_to = "ikiss/_version.py"

# define Project settings
[project]
name = "ikiss"
version = "2.0.0"
#dynamic = ["version"]
description = "iKISS is a pipeline to detect kmers under selection."
authors = [
    { name = "Julie Orjuela (DIADE-IRD)", email = "julie.orjuela@ird.fr" },
]

dependencies = ["pandas",
                "matplotlib",
                "tabulate",
                "ipython",
                "biopython",
                "pysam",
                "numpy",
                "snakecdysis==2.0.1",
                "setuptools>=68.2.0",
                "snakemake",
                "nbformat",
                "PyYAML",
                "pandas",
                "matplotlib",
                "tabulate",
                "ipython",
                "biopython",
                "numpy",
                "argparse",
                "tqdm"
                ]

requires-python = ">=3.11"
readme = "README.rst"
license = "GPL-3.0-or-later"

keywords = ["snakemake", "kmers", "selection","diversity", "structure", "association" ]
classifiers = [
    'Development Status :: 5 - Production/Stable',
    'Intended Audience :: Developers',
    'Intended Audience :: End Users/Desktop',
    'Operating System :: POSIX :: Linux',
    'Programming Language :: Python :: 3.12',
    'Programming Language :: Python :: 3.12',
    'Programming Language :: R',
    'Natural Language :: English',
    'Topic :: Scientific/Engineering',
    'Topic :: Scientific/Engineering :: Bio-Informatics'
]

[project.urls]
Homepage = "https://forge.ird.fr/diade/iKISS.git"
Documentation = "https://ikiss.readthedocs.io/en/latest/"
repository = "https://forge.ird.fr/diade/iKISS.git"
Downloads = "https://forge.ird.fr/diade/iKISS/-/releases/"
"Bug Tracker" = "https://forge.ird.fr/diade/iKISS/-/issues"
"Source Code" = "https://forge.ird.fr/diade/iKISS.git"


[project.optional-dependencies]
docs = [
    "sphinx",
    "sphinx_click",
    "sphinx_copybutton",
    "sphinx_rtd_theme",
    "sphinx_automodapi",
    "sphinx_design",
    "myst_parser",
    "tox",
    "click_extra",
    "pygments_ansi_color",
    "sphinx_rtd_theme"
]

#sphinx sphinx_automodapi sphinx_copybutton sphinx_design myst_parser click_extr

dev = [
    "setuptools>=68.2.0"
]
# setup scripts links
[project.scripts]
ikiss = "ikiss.main:main"

[project.entry-points.ikiss]
ikiss = "__init__"

# Try to link sphinx to file
[tool.sphinx]
source-dir = "docs/source"
build-dir = "docs/build"
config-dir = "docs/source"


[tool.semantic_release]
logging_use_named_masks = true
tag_format = "{version}"
commit_parser = "angular"
commit_message = "{version}\n\nAutomatically generated by python-semantic-release"
build_command = """
    python -m pip install build~=0.10.0
    python -m build .
"""

major_on_zero = true
assets = []
version_variables = ["ikiss/__init__.py:__version__"]
version_toml = ["pyproject.toml:project.version"]


[tool.semantic_release.branches.main]
match = "(main|master)"
prerelease_token = "rc"
prerelease = false


[tool.semantic_release.changelog]
template_dir = "templates"
changelog_file = "CHANGELOG.md"
exclude_commit_patterns = []


[tool.semantic_release.changelog.environment]
block_start_string = "{%"
block_end_string = "%}"
variable_start_string = "{{"
variable_end_string = "}}"
comment_start_string = "{#"
comment_end_string = "#}"
trim_blocks = true
lstrip_blocks = true
newline_sequence = "\n"
keep_trailing_newline = true
extensions = []
autoescape = true

[tool.semantic_release.commit_author]
env = "GIT_COMMIT_AUTHOR"
default = "semantic-release <semantic-release>"


[tool.semantic_release.commit_parser_options]
allowed_tags = ["build", "chore", "ci", "docs", "doc", "feat", "fix", "perf", "style", "refactor", "test",
    "BUILD", "CHORE", "CI", "DOCS", "DOC", "FEAT", "FIX", "PERF", "STYLE", "REFACTOR", "TEST"]
minor_tags = ["feat", "FEAT"]
patch_tags = ["fix", "perf", "FIX", "PERF"]



[tool.semantic_release.remote]
name = "origin"
type = "gitlab"
ignore_token_for_push = false
token = { env = "GH_TOKEN" }
domain = "forge.ird.fr"
api_domain = "forge.ird.fr"
[tool.semantic_release.publish]
dist_glob_patterns = ["dist/*"]
upload_to_vcs_release = true

