Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ac removered #125

Merged
merged 13 commits into from
Apr 4, 2024
1 change: 1 addition & 0 deletions .github/workflows/cgatapps_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ jobs:
pip install nose
nosetests -v tests/test_style.py
nosetests -v tests/test_scripts.py
nosetests -v tests/test_import.py
73 changes: 73 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Publish cgat-apps wheels to PyPI and TestPyPI

on:
push:
branches:
- v[0-9]+.[0-9]+.x
tags:
- v*
release:
types:
- published

jobs:

build_sdist:

runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, macos]
python-version: [3.10]

steps:
- name: Checkout cgat-apps
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install prerequisite Python libraries
run: |
python -m pip install --upgrade pip
pip install wheel

- name: Create source distribution
run: python setup.py sdist bdist_wheel

- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz

- uses: actions/upload-artifact@v2
with:
path: dist/*.whl

upload_pypi:

needs: [build_sdist]
runs-on: ubuntu-latest

steps:
- name: Get Artifacts
uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- name: Publish distribution to Test PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish distribution to PyPI
if: github.event_name == 'release' && github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}

25 changes: 0 additions & 25 deletions COPYING

This file was deleted.

22 changes: 0 additions & 22 deletions PKG-INFO

This file was deleted.

16 changes: 16 additions & 0 deletions cgat/AGP.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,22 @@

"""

import functools


def deprecated_class(cls):
orig_init = cls.__init__

@functools.wraps(orig_init)
def new_init(self, *args, **kwargs):
warnings.warn(f"{cls.__name__} is deprecated and will be removed in the next release.", DeprecationWarning)
orig_init(self, *args, **kwargs)

cls.__init__ = new_init
return cls


@deprecated_class
class ObjectPosition(object):

def map(self, start, end):
Expand All @@ -19,6 +34,7 @@ def map(self, start, end):
return end + self.start, start + self.start


@deprecated_class
class AGP(object):
"""Parser for AGP formatted files."""

Expand Down
Loading
Loading