Skip to content

Commit

Permalink
refactor: remove versioneer, update release-please (#519)
Browse files Browse the repository at this point in the history
  • Loading branch information
tedil authored Jun 28, 2024
1 parent b3305c5 commit be0ac09
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 3,082 deletions.
32 changes: 6 additions & 26 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,19 @@ on:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:

- uses: GoogleCloudPlatform/release-please-action@v2
id: release
- uses: googleapis/release-please-action@v4
with:
release-type: python
package-name: clinvar-this

- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}
with:
fetch-depth: 0
token: ${{ secrets.SNAPPY_RELEASE_PLEASE_TOKEN }}

- name: Set up Python
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Build package
if: ${{ steps.release.outputs.release_created }}
run: |
python -m pip install --upgrade pip
python setup.py sdist
- name: Publish to PyPI
if: ${{ steps.release.outputs.release_created }}
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ recursive-include snappy_pipeline *.py Snakefile *.rules *.sh *.tpl *.xml
recursive-include snappy_wrappers *.py *.sh *.txt *.R *.yaml

recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
include versioneer.py
include snappy_pipeline/_version.py

include requirements.txt requirements/*.txt
Expand Down
11 changes: 0 additions & 11 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ universal = 1
[wheel]
universal = 1

# Package Versioning with Versioneer ----------------------------------------

[versioneer]
VCS = git
style = pep440
versionfile_source = snappy_pipeline/_version.py
versionfile_build = snappy_pipeline/_version.py
tag_prefix = v
parentdir_prefix = snappy_pipeline-

# Style Checking and Linting ------------------------------------------------
[isort]
profile = "black"
Expand All @@ -36,7 +26,6 @@ exclude =
splitMNPsAndComplex.py
wrapper.py
snappy_pipeline/__init__.py
versioneer.py
max-complexity = 18
select = B,C,E,F,W,T4,B9
ignore = E203, E266, E501, W503
Expand Down
12 changes: 8 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

from setuptools import find_packages, setup

import versioneer

__author__ = "Manuel Holtgrewe <manuel.holtgrewe@bih-charite.de>"


Expand Down Expand Up @@ -85,10 +83,16 @@ def bash_scripts(names):
return (os.path.join("scripts", name) for name in names)


package_root = os.path.abspath(os.path.dirname(__file__))

version = {}
with open(os.path.join(package_root, "snappy_pipeline/_version.py")) as fp:
exec(fp.read(), version)
version = version["__version__"]

setup(
name="snappy-pipeline",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
version=version,
description="SNAPPY Nucleic Acid Processing in Python (by CUBI)",
long_description=readme + "\n\n" + history,
long_description_content_type="text/markdown",
Expand Down
8 changes: 2 additions & 6 deletions snappy_pipeline/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@

from .base import expand_ref, merge_dicts, print_config, print_sample_sheets

# from ._version import get_versions

__author__ = """Manuel Holtgrewe"""
__email__ = "manuel.holtgrewe@bih-charite.de"
__version__ = "master"
# del get_versions

from . import _version
from snappy_pipeline._version import __version__

__version__ = _version.get_versions()["version"]
__all__ = ["__version__", "expand_ref", "merge_dicts", "print_config", "print_sample_sheets"]
Loading

0 comments on commit be0ac09

Please sign in to comment.