Package list ctdconverter / df2cfae
2.0-1 Michael R. Crusoe 3 years ago
15 changed file(s) with 391 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 [NAME]
1 CTDConverter - Convert CTD files into Galaxy tool and CWL CommandLineTool files
2
0 ctdconverter (2.0-1) UNRELEASED; urgency=medium
1
2 * Initial release. (Closes: #890755)
3
4 -- Michael R. Crusoe <michael.crusoe@gmail.com> Sun, 18 Feb 2018 02:17:55 -0800
0 Source: ctdconverter
1 Section: science
2 Priority: optional
3 Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
4 Uploaders: Michael R. Crusoe <michael.crusoe@gmail.com>
5 Build-Depends: debhelper (>= 11),
6 dh-python,
7 python3,
8 python3-setuptools,
9 python3-lxml,
10 python3-ruamel.yaml,
11 python3-ctdopts,
12 help2man
13 Standards-Version: 4.1.3
14 Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/ctdconverter.git
15 Vcs-Git: https://anonscm.debian.org/git/debian-med/ctdconverter.git
16 Homepage: https://github.com/WorkflowConversion/CTDConverter
17 X-Python-Version: >= 2.6
18 X-Python3-Version: >= 3.2
19
20 Package: ctdconverter
21 Architecture: all
22 Depends: ${python3:Depends}, ${misc:Depends}
23 Suggests: cwl-runner
24 Description: Convert CTD files into Galaxy tool and CWL CommandLineTool files
25 Common Tool Descriptors (CTDs) are XML documents that represent the inputs,
26 outputs, parameters of command line tools in a platform-independent way.
27 .
28 CTDConverter, given one or more Common Tool Descriptors (CTD) XML files,
29 generates Galaxy tool wrappers and Common Workflow Language (CWL) Command
30 Line Tool v1.0 standard descriptions from CTD files.
0 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
1 Upstream-Name: CTDConverter
2 Source: https://github.com/WorkflowConversion/CTDConverter/
3
4 Files: *
5 Copyright: © WorkflowConversion
6 License: GPL-3+
7
8 Files: convert.py
9 Copyright: © WorkflowConversion
10 License: Apache-2.0
11
12 Files: debian/*
13 Copyright: © 2018 Michael R. Crusoe <michael.crusoe@gmail.com>
14 License: GPL-3+
15
16 License: GPL-3+
17 This package is free software; you can redistribute it and/or modify
18 it under the terms of the GNU General Public License as published by
19 the Free Software Foundation; either version 3 of the License, or
20 (at your option) any later version.
21 .
22 This package is distributed in the hope that it will be useful,
23 but WITHOUT ANY WARRANTY; without even the implied warranty of
24 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 GNU General Public License for more details.
26 .
27 On Debian systems, the complete text of the GNU General
28 Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
29
30 License: Apache-2.0
31 Licensed under the Apache License, Version 2.0 (the "License");
32 you may not use this file except in compliance with the License.
33 You may obtain a copy of the License at
34 .
35 http://www.apache.org/licenses/LICENSE-2.0
36 .
37 Unless required by applicable law or agreed to in writing, software
38 distributed under the License is distributed on an "AS IS" BASIS,
39 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
40 See the License for the specific language governing permissions and
41 limitations under the License.
42 .
43 On Debian systems, the full text of the Apache License, Version 2.0 can be
44 found in the file `/usr/share/common-licenses/Apache-2.0'
0 debian/CTDConverter.1
0 From: Michael R. Crusoe <michael.crusoe@gmail.com>
1 Subject: Add setup.py
2 --- ctdconverter.orig/convert.py
3 +++ ctdconverter/convert.py
4 @@ -8,7 +8,7 @@
5 from common.exceptions import ApplicationException, ModelError
6
7 __all__ = []
8 -__version__ = 2.0
9 +__version__ = '2.0'
10 __date__ = '2014-09-17'
11 __updated__ = '2017-08-09'
12
13 @@ -269,4 +269,4 @@
14
15
16 if __name__ == "__main__":
17 - sys.exit(main())
18 \ No newline at end of file
19 + sys.exit(main())
20 --- /dev/null
21 +++ ctdconverter/setup.py
22 @@ -0,0 +1,171 @@
23 +"""A setuptools based setup module.
24 +
25 +See:
26 +https://packaging.python.org/en/latest/distributing.html
27 +https://github.com/pypa/sampleproject
28 +"""
29 +
30 +# Always prefer setuptools over distutils
31 +from setuptools import setup, find_packages
32 +# To use a consistent encoding
33 +from codecs import open
34 +from os import path
35 +import re
36 +
37 +here = path.abspath(path.dirname(__file__))
38 +
39 +# Get the long description from the README file
40 +with open(path.join(here, 'README.md'), encoding='utf-8') as f:
41 + long_description = f.read()
42 +
43 +def read(*parts):
44 + with open(path.join(here, *parts), 'r') as fp:
45 + return fp.read()
46 +
47 +def find_version(*file_paths):
48 + version_file = read(*file_paths)
49 + version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
50 + version_file, re.M)
51 + if version_match:
52 + return version_match.group(1)
53 + raise RuntimeError("Unable to find version string.")
54 +
55 +# Arguments marked as "Required" below must be included for upload to PyPI.
56 +# Fields marked as "Optional" may be commented out.
57 +
58 +setup(
59 + # This is the name of your project. The first time you publish this
60 + # package, this name will be registered for you. It will determine how
61 + # users can install this project, e.g.:
62 + #
63 + # $ pip install sampleproject
64 + #
65 + # And where it will live on PyPI: https://pypi.org/project/sampleproject/
66 + name='ctdconverter', # Required
67 +
68 + # Versions should comply with PEP 440:
69 + # https://www.python.org/dev/peps/pep-0440/
70 + #
71 + # For a discussion on single-sourcing the version across setup.py and the
72 + # project code, see
73 + # https://packaging.python.org/en/latest/single_source_version.html
74 + version=find_version("convert.py"), # Required
75 +
76 + # This is a one-line description or tagline of what your project does. This
77 + # corresponds to the "Summary" metadata field:
78 + # https://packaging.python.org/specifications/core-metadata/#summary
79 + description='Convert CTD files into Galaxy tool and CWL CommandLineTool files', # Required
80 +
81 + # This is an optional longer description of your project that represents
82 + # the body of text which users will see when they visit PyPI.
83 + #
84 + # Often, this is the same as your README, so you can just read it in from
85 + # that file directly (as we have already done above)
86 + #
87 + # This field corresponds to the "Description" metadata field:
88 + # https://packaging.python.org/specifications/core-metadata/#description-optional
89 + long_description=long_description, # Optional
90 +
91 + # This should be a valid link to your project's main homepage.
92 + #
93 + # This field corresponds to the "Home-Page" metadata field:
94 + # https://packaging.python.org/specifications/core-metadata/#home-page-optional
95 + url='https://github.com/WorkflowConversion/CTDConverter', # Optional
96 +
97 + # This should be your name or the name of the organization which owns the
98 + # project.
99 + author='The WorkflowConversion team', # Optional
100 +
101 + # This should be a valid email address corresponding to the author listed
102 + # above.
103 + # author_email='authors@example.com', # Optional
104 +
105 + # Classifiers help users find your project by categorizing it.
106 + #
107 + # For a list of valid classifiers, see
108 + # https://pypi.python.org/pypi?%3Aaction=list_classifiers
109 + classifiers=[ # Optional
110 + # How mature is this project? Common values are
111 + # 3 - Alpha
112 + # 4 - Beta
113 + # 5 - Production/Stable
114 + 'Development Status :: 3 - Alpha',
115 +
116 + # Indicate who your project is intended for
117 + 'Intended Audience :: Developers',
118 + 'Topic :: Software Development :: Build Tools',
119 +
120 + 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
121 + 'License :: OSI Approved :: Apache Software License',
122 +
123 + # Specify the Python versions you support here. In particular, ensure
124 + # that you indicate whether you support Python 2, Python 3 or both.
125 + 'Programming Language :: Python :: 2',
126 + 'Programming Language :: Python :: 2.7',
127 + 'Programming Language :: Python :: 3',
128 + 'Programming Language :: Python :: 3.4',
129 + 'Programming Language :: Python :: 3.5',
130 + 'Programming Language :: Python :: 3.6',
131 + ],
132 +
133 + # This field adds keywords for your project which will appear on the
134 + # project page. What does your project relate to?
135 + #
136 + # Note that this is a string of words separated by whitespace, not a list.
137 + keywords='CTD CWL CommonWL Galaxy Workflows WorkflowConversion', # Optional
138 +
139 + # You can just specify package directories manually here if your project is
140 + # simple. Or you can use find_packages().
141 + #
142 + # Alternatively, if you just want to distribute a single Python file, use
143 + # the `py_modules` argument instead as follows, which will expect a file
144 + # called `my_module.py` to exist:
145 + #
146 + py_modules=["convert"],
147 + #
148 + packages=find_packages(exclude=['contrib', 'docs', 'tests']), # Required
149 +
150 + # This field lists other packages that your project depends on to run.
151 + # Any package you put here will be installed by pip when your project is
152 + # installed, so they must be valid existing projects.
153 + #
154 + # For an analysis of "install_requires" vs pip's requirements files see:
155 + # https://packaging.python.org/en/latest/requirements.html
156 + install_requires=['lxml', 'ruamel.yaml'], # Optional
157 + # install_requires=['lxml', 'ctdopts'], # Optional
158 +
159 + # List additional groups of dependencies here (e.g. development
160 + # dependencies). Users will be able to install these using the "extras"
161 + # syntax, for example:
162 + #
163 + # $ pip install sampleproject[dev]
164 + #
165 + # Similar to `install_requires` above, these must be valid existing
166 + # projects.
167 + # extras_require={ # Optional
168 + # 'dev': ['check-manifest'],
169 + # 'test': ['coverage'],
170 + # },
171 +
172 + # If there are data files included in your packages that need to be
173 + # installed, specify them here.
174 + #
175 + # If using Python 2.6 or earlier, then these have to be included in
176 + # MANIFEST.in as well.
177 + package_data={ # Optional
178 + 'ctdconverter': ['galaxy/macros.xml'],
179 + },
180 +
181 + # To provide executable scripts, use entry points in preference to the
182 + # "scripts" keyword. Entry points provide cross-platform support and allow
183 + # `pip` to create the appropriate form of executable for the target
184 + # platform.
185 + #
186 + # For example, the following would provide a command called `sample` which
187 + # executes the function `main` from this package when invoked:
188 + entry_points={ # Optional
189 + 'console_scripts': [
190 + 'CTDConverter=convert:main',
191 + ],
192 + },
193 +)
0 add_setup.py.patch
1 upgrade_deprecated_strip
0 From: Michael R. Crusoe <michael.crusoe@gmail.com>
1 Subject: Upgrade deprecated using of string.strip()
2 --- ctdconverter.orig/common/utils.py
3 +++ ctdconverter/common/utils.py
4 @@ -4,8 +4,7 @@
5 import os
6
7 from lxml import etree
8 -from string import strip
9 -from logger import info, error, warning
10 +from logger import info, error, warning
11
12 from common.exceptions import ApplicationException
13 from CTDopts.CTDopts import CTDModel, ParameterGroup
14 @@ -73,9 +72,9 @@
15 if member_value is not None:
16 if isinstance(member_value, list):
17 for file_name in member_value:
18 - paths_to_check.append(strip(str(file_name)))
19 + paths_to_check.append(str(file_name).strip())
20 else:
21 - paths_to_check.append(strip(str(member_value)))
22 + paths_to_check.append(str(member_value).strip())
23
24 for path_to_check in paths_to_check:
25 validate_path_exists(path_to_check)
26
0 #!/usr/bin/make -f
1
2 # DH_VERBOSE := 1
3 export LC_ALL=C.UTF-8
4 export PYBUILD_NAME = ctdconverter
5
6 include /usr/share/dpkg/default.mk
7 # this provides:
8 # DEB_SOURCE: the source package name
9 # DEB_VERSION: the full version of the package (epoch + upstream vers. + revision)
10 # DEB_VERSION_EPOCH_UPSTREAM: the package's version without the Debian revision
11 # DEB_VERSION_UPSTREAM_REVISION: the package's version without the Debian epoch
12 # DEB_VERSION_UPSTREAM: the package's upstream version
13 # DEB_DISTRIBUTION: the distribution(s) listed in the current entry of debian/changelog
14
15 # for hardening you might like to uncomment this:
16 # export DEB_BUILD_MAINT_OPTIONS=hardening=+all
17
18 %:
19 dh $@ --with python3 --buildsystem=pybuild
20
21 override_dh_auto_build:
22 2to3 --write --nobackups convert.py galaxy/ cwl/ common/
23 dh_auto_build
24
25 debian/CTDConverter.1: debian/rules debian/CTDConverter.help2man
26 help2man 'python3 convert.py' --include=debian/CTDConverter.help2man \
27 --no-info --version-string="$(DEB_VERSION_UPSTREAM)" \
28 --output=debian/CTDConverter.1
29
30 override_dh_installman: debian/CTDConverter.1
31 dh_installman
0 3.0 (quilt)
0 Tests: run-unit-test
1 Depends: @
2 Restrictions: allow-stderr
0 #!/bin/bash
1 set -e
2
3 pkg=#PACKAGENAME#
4
5 if [ "$AUTOPKGTEST_TMP" = "" ] ; then
6 AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
7 trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
8 fi
9
10 cp -a /usr/share/doc/${pkg}/examples/* $AUTOPKGTEST_TMP
11
12 cd $AUTOPKGTEST_TMP
13
14 #do_stuff_to_test_package#
0 Reference:
1 Author:
2 Title:
3 Journal:
4 Year:
5 Volume:
6 Number:
7 Pages:
8 DOI:
9 PMID:
10 URL:
11 eprint:
0 version=4
1 # Uncomment to find new files on Github
2 # - when using releases:
3 https://github.com/WorkflowConversion/CTDConverter/releases .*/archive/v?@ANY_VERSION@@ARCHIVE_EXT@
4 # - when using tags
5 # https://github.com/#GITHUBUSER#/#PACKAGE#/tags .*/#PREFIX#@ANY_VERSION@@ARCHIVE_EXT@
6 # Remark: frequently you can do s/#PREFIX#/v?/ since 'v' or nothing is quite common but there are other prefixes possible
7
8 # if tweaking of source is needed
9 # \
10 # debian debian/get-orig-source
11
12 # if you need to repack and choose +dfsg prefix
13 # opts="repacksuffix=+dfsg,dversionmangle=s/\+dfsg//g,repack,compression=xz" \
14
15 # See also
16 # https://people.debian.org/~osamu/uscan.html
17 #
18