Skip to content

Commit

Permalink
Merge pull request #125 from cgat-developers/AC-removered
Browse files Browse the repository at this point in the history
Ac removered
  • Loading branch information
Acribbs authored Apr 4, 2024
2 parents c0aef8b + fb2e2a5 commit cd90e0f
Show file tree
Hide file tree
Showing 18 changed files with 209 additions and 11,925 deletions.
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

0 comments on commit cd90e0f

Please sign in to comment.