Skip to content

Commit 1cd53c8

Browse files
committed
Merge branch 'master' into azure
2 parents 208ab54 + 5fc78dd commit 1cd53c8

File tree

5 files changed

+8
-50
lines changed

5 files changed

+8
-50
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
command: pip install --no-cache-dir -r docs/requirements.txt
5050
- run:
5151
name: Build only this commit
52-
command: make -C docs SPHINXOPTS="-W" BUILDDIR="_build/no_version_html" html
52+
command: make -C docs SPHINXOPTS="-W" BUILDDIR="_build/no_version_html" SPHINX_APIDOC_OPTIONS="members,undoc-members,show-inheritance,noindex" html
5353
- store_artifacts:
5454
path: ./docs/_build/no_version_html
5555
- run:

LICENSE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
1111
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License.
14-

min-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
attrs
33
cloudpickle == 0.8.0
44
filelock == 3.0.0
5-
etelemetry
5+
etelemetry == 0.2.0

pydra/__init__.py

Lines changed: 5 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
first-class operations. It forms the core of the Nipype 2.0 ecosystem.
66
77
"""
8+
import logging
9+
10+
logger = logging.getLogger("pydra")
811
from ._version import get_versions
912

1013
__version__ = get_versions()["version"]
@@ -14,54 +17,10 @@
1417
from . import mark
1518

1619

17-
def check_latest_version(raise_exception=False):
18-
"""
19-
Check for the latest version of the library.
20-
21-
Parameters
22-
----------
23-
raise_exception: :obj:`bool`
24-
Raise a RuntimeError if a bad version is being used
25-
26-
"""
20+
def check_latest_version():
2721
import etelemetry
28-
import logging
29-
from pkg_resources import parse_version
30-
31-
logger = logging.getLogger("pydra")
32-
33-
INIT_MSG = "Running {packname} version {version} (latest: {latest})".format
3422

35-
latest = {"version": "Unknown", "bad_versions": []}
36-
result = None
37-
try:
38-
result = etelemetry.get_project("nipype/pydra")
39-
except Exception as e:
40-
logger.warning("Could not check for version updates: \n%s", e)
41-
finally:
42-
if result:
43-
latest.update(**result)
44-
if parse_version(__version__) != parse_version(latest["version"]):
45-
logger.info(
46-
INIT_MSG(
47-
packname="pydra", version=__version__, latest=latest["version"]
48-
)
49-
)
50-
if latest["bad_versions"] and any(
51-
[
52-
parse_version(__version__) == parse_version(ver)
53-
for ver in latest["bad_versions"]
54-
]
55-
):
56-
message = (
57-
"You are using a version of Pydra with a critical "
58-
"bug. Please use a different version."
59-
)
60-
if raise_exception:
61-
raise RuntimeError(message)
62-
else:
63-
logger.critical(message)
64-
return latest
23+
return etelemetry.check_available_version("nipype/pydra", __version__, lgr=logger)
6524

6625

6726
# Run telemetry on import for interactive sessions, such as IPython, Jupyter notebooks, Python REPL

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ install_requires =
2626
attrs
2727
cloudpickle >= 0.8.0
2828
filelock >= 3.0.0
29-
etelemetry
29+
etelemetry >= 0.2.0
3030

3131
test_requires =
3232
pytest >= 4.4.0

0 commit comments

Comments
 (0)