Skip to content

Commit d64eb17

Browse files
committed
update objects
1 parent 16d8422 commit d64eb17

File tree

7 files changed

+51
-129
lines changed

7 files changed

+51
-129
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,48 @@ jobs:
88
runs-on: ${{ matrix.os }}
99
strategy:
1010
matrix:
11-
os: [ubuntu-20.04, windows-2019, macos-10.15]
11+
os: [ubuntu-20.04, windows-2019, macos-11]
1212

1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515

16-
- uses: actions/setup-python@v2
17-
18-
- name: Install cibuildwheel
19-
run: python -m pip install cibuildwheel
16+
- uses: actions/setup-python@v4
17+
with:
18+
python-version: "3.10"
2019

2120
- name: Build wheels
22-
run: python -m cibuildwheel --output-dir wheelhouse
21+
uses: pypa/cibuildwheel@v2.11.4
2322
env:
24-
CIBW_SKIP: cp27-* pp27-*
23+
CIBW_SKIP: pp*
2524
CIBW_BUILD_VERBOSITY: 0
26-
#CIBW_BUILD_VERBOSITY: 3 for debug
25+
CIBW_ARCHS_LINUX: auto aarch64
26+
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
2727

2828
- name: Display wheel
2929
run: ls -l wheelhouse
3030

31-
- uses: actions/upload-artifact@v2
31+
- uses: actions/upload-artifact@v3
3232
with:
3333
path: ./wheelhouse/*.whl
3434

3535
build_sdist:
3636
name: Build source distribution
3737
runs-on: ubuntu-latest
3838
steps:
39-
- uses: actions/checkout@v2
39+
- uses: actions/checkout@v3
4040

41-
- uses: actions/setup-python@v2
41+
- uses: actions/setup-python@v4
4242
name: Install Python
4343
with:
44-
python-version: '3.8'
44+
python-version: '3.10'
4545

4646
- name: Build sdist
4747
run: python setup.py sdist
4848

4949
- name: Display dist
5050
run: ls -l dist
5151

52-
- uses: actions/upload-artifact@v2
52+
- uses: actions/upload-artifact@v3
5353
with:
5454
path: dist/*.tar.gz
5555

@@ -58,12 +58,12 @@ jobs:
5858
runs-on: ubuntu-latest
5959
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
6060
steps:
61-
- uses: actions/download-artifact@v2
61+
- uses: actions/download-artifact@v3
6262
with:
6363
name: artifact
6464
path: dist
6565

66-
- uses: pypa/gh-action-pypi-publish@master
66+
- uses: pypa/gh-action-pypi-publish@release/v1
6767
with:
6868
user: __token__
6969
password: ${{ secrets.PYPI_API_TOKEN }}

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
include LICENSE
2-
include src/*.h
2+
include src/*
33
include tests/*.py
44
graf tests/data
55
graf docs

src/etr.c

Lines changed: 10 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -84,41 +84,14 @@ static PyMemberDef stria_etr_members[] = {
8484

8585
PyTypeObject stria_ETRType = {
8686
PyVarObject_HEAD_INIT(NULL, 0)
87-
"ETR", /* tp_name */
88-
sizeof(stria_ETR), /* tp_basicsize */
89-
0, /* tp_itemsize */
90-
(destructor)stria_etr_dealloc, /* tp_dealloc */
91-
0, /* tp_print */
92-
0, /* tp_getattr */
93-
0, /* tp_setattr */
94-
0, /* tp_reserved */
95-
(reprfunc)stria_etr_repr, /* tp_repr */
96-
0, /* tp_as_number */
97-
0, /* tp_as_sequence */
98-
0, /* tp_as_mapping */
99-
0, /* tp_hash */
100-
0, /* tp_call */
101-
0, /* tp_str */
102-
0, /* tp_getattro */
103-
0, /* tp_setattro */
104-
0, /* tp_as_buffer */
105-
Py_TPFLAGS_DEFAULT, /* tp_flags */
106-
"tandem repeat element", /* tp_doc */
107-
0, /* tp_traverse */
108-
0, /* tp_clear */
109-
0, /* tp_richcompare */
110-
0, /* tp_weaklistoffset */
111-
0, /* tp_iter */
112-
0, /* tp_iternext */
113-
stria_etr_methods, /* tp_methods */
114-
stria_etr_members, /* tp_members */
115-
stria_etr_getsets, /* tp_getset */
116-
0, /* tp_base */
117-
0, /* tp_dict */
118-
0, /* tp_descr_get */
119-
0, /* tp_descr_set */
120-
0, /* tp_dictoffset */
121-
0, /* tp_init */
122-
0, /* tp_alloc */
123-
PyType_GenericNew, /* tp_new */
87+
.tp_name = "ETR",
88+
.tp_basicsize = sizeof(stria_ETR),
89+
.tp_dealloc = (destructor)stria_etr_dealloc,
90+
.tp_repr = (reprfunc)stria_etr_repr,
91+
.tp_flags = Py_TPFLAGS_DEFAULT,
92+
.tp_doc = "tandem repeat element",
93+
.tp_methods = stria_etr_methods,
94+
.tp_members = stria_etr_members,
95+
.tp_getset = stria_etr_getsets,
96+
.tp_new = PyType_GenericNew,
12497
};

src/itr.c

Lines changed: 10 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -778,41 +778,14 @@ static PyMemberDef stria_itr_members[] = {
778778

779779
PyTypeObject stria_ITRType = {
780780
PyVarObject_HEAD_INIT(NULL, 0)
781-
"IRE", /* tp_name */
782-
sizeof(stria_ITR), /* tp_basicsize */
783-
0, /* tp_itemsize */
784-
(destructor)stria_itr_dealloc, /* tp_dealloc */
785-
0, /* tp_print */
786-
0, /* tp_getattr */
787-
0, /* tp_setattr */
788-
0, /* tp_reserved */
789-
(reprfunc)stria_itr_repr, /* tp_repr */
790-
0, /* tp_as_number */
791-
0, /* tp_as_sequence */
792-
0, /* tp_as_mapping */
793-
0, /* tp_hash */
794-
0, /* tp_call */
795-
0, /* tp_str */
796-
0, /* tp_getattro */
797-
0, /* tp_setattro */
798-
0, /* tp_as_buffer */
799-
Py_TPFLAGS_DEFAULT, /* tp_flags */
800-
"tandem repeat element", /* tp_doc */
801-
0, /* tp_traverse */
802-
0, /* tp_clear */
803-
0, /* tp_richcompare */
804-
0, /* tp_weaklistoffset */
805-
0, /* tp_iter */
806-
0, /* tp_iternext */
807-
stria_itr_methods, /* tp_methods */
808-
stria_itr_members, /* tp_members */
809-
stria_itr_getsets, /* tp_getset */
810-
0, /* tp_base */
811-
0, /* tp_dict */
812-
0, /* tp_descr_get */
813-
0, /* tp_descr_set */
814-
0, /* tp_dictoffset */
815-
0, /* tp_init */
816-
0, /* tp_alloc */
817-
PyType_GenericNew, /* tp_new */
781+
.tp_name = "IRE",
782+
.tp_basicsize = sizeof(stria_ITR),
783+
.tp_dealloc = (destructor)stria_itr_dealloc,
784+
.tp_repr = (reprfunc)stria_itr_repr,
785+
.tp_flags = Py_TPFLAGS_DEFAULT,
786+
.tp_doc = "tandem repeat element",
787+
.tp_methods = stria_itr_methods,
788+
.tp_members = stria_itr_members,
789+
.tp_getset = stria_itr_getsets,
790+
.tp_new = PyType_GenericNew,
818791
};

src/stria.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ static PyObject *stria_module_init(void) {
281281
return NULL;
282282
}
283283

284+
//version
285+
PyModule_AddStringConstant(module, "__version__", STRIA_VERSION);
286+
284287
//TRE
285288
if (PyType_Ready(&stria_ETRType) < 0) {
286289
return NULL;

src/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#define STRIA_VERSION "0.1.3"
1+
#define STRIA_VERSION "0.1.4"

src/vntr.c

Lines changed: 10 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -192,41 +192,14 @@ static PyMethodDef stria_vntrminer_methods[] = {
192192

193193
PyTypeObject stria_VNTRMinerType = {
194194
PyVarObject_HEAD_INIT(NULL, 0)
195-
"VNTRMiner", /* tp_name */
196-
sizeof(stria_VNTRMiner), /* tp_basicsize */
197-
0, /* tp_itemsize */
198-
(destructor)stria_vntrminer_dealloc, /* tp_dealloc */
199-
0, /* tp_print */
200-
0, /* tp_getattr */
201-
0, /* tp_setattr */
202-
0, /* tp_reserved */
203-
(reprfunc)stria_vntrminer_repr, /* tp_repr */
204-
0, /* tp_as_number */
205-
0, /* tp_as_sequence */
206-
0, /* tp_as_mapping */
207-
0, /* tp_hash */
208-
0, /* tp_call */
209-
0, /* tp_str */
210-
0, /* tp_getattro */
211-
0, /* tp_setattro */
212-
0, /* tp_as_buffer */
213-
Py_TPFLAGS_DEFAULT, /* tp_flags */
214-
"find minisatellites from DNA sequence", /* tp_doc */
215-
0, /* tp_traverse */
216-
0, /* tp_clear */
217-
0, /* tp_richcompare */
218-
0, /* tp_weaklistoffset */
219-
(getiterfunc)stria_vntrminer_iter, /* tp_iter */
220-
(iternextfunc)stria_vntrminer_next, /* tp_iternext */
221-
stria_vntrminer_methods, /* tp_methods */
222-
0, /* tp_members */
223-
0, /* tp_getset */
224-
0, /* tp_base */
225-
0, /* tp_dict */
226-
0, /* tp_descr_get */
227-
0, /* tp_descr_set */
228-
0, /* tp_dictoffset */
229-
0, /* tp_init */
230-
0, /* tp_alloc */
231-
stria_vntrminer_new, /* tp_new */
195+
.tp_name = "VNTRMiner",
196+
.tp_basicsize = sizeof(stria_VNTRMiner),
197+
.tp_dealloc = (destructor)stria_vntrminer_dealloc,
198+
.tp_repr = (reprfunc)stria_vntrminer_repr,
199+
.tp_flags = Py_TPFLAGS_DEFAULT,
200+
.tp_doc = "find minisatellites from DNA sequence",
201+
.tp_iter = (getiterfunc)stria_vntrminer_iter,
202+
.tp_iternext = (iternextfunc)stria_vntrminer_next,
203+
.tp_methods = stria_vntrminer_methods,
204+
.tp_new = stria_vntrminer_new,
232205
};

0 commit comments

Comments
 (0)