-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added fileformats packages to template resources
- Loading branch information
Showing
12 changed files
with
346 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
nipype2pydra/pkg_gen/resources/templates/related-packages/conftest.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import os | ||
import logging | ||
from pathlib import Path | ||
import tempfile | ||
import pytest | ||
|
||
# Set DEBUG logging for unittests | ||
|
||
log_level = logging.WARNING | ||
|
||
logger = logging.getLogger("fileformats") | ||
logger.setLevel(log_level) | ||
|
||
sch = logging.StreamHandler() | ||
sch.setLevel(log_level) | ||
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") | ||
sch.setFormatter(formatter) | ||
logger.addHandler(sch) | ||
|
||
|
||
# For debugging in IDE's don't catch raised exceptions and let the IDE | ||
# break at it | ||
if os.getenv("_PYTEST_RAISE", "0") != "0": | ||
|
||
@pytest.hookimpl(tryfirst=True) | ||
def pytest_exception_interact(call): | ||
raise call.excinfo.value | ||
|
||
@pytest.hookimpl(tryfirst=True) | ||
def pytest_internalerror(excinfo): | ||
raise excinfo.value | ||
|
||
|
||
@pytest.fixture | ||
def work_dir(): | ||
work_dir = tempfile.mkdtemp() | ||
return Path(work_dir) |
13 changes: 13 additions & 0 deletions
13
nipype2pydra/pkg_gen/resources/templates/related-packages/fileformats-extras/LICENSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Copyright 2021 Nipype developers | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
32 changes: 32 additions & 0 deletions
32
...ydra/pkg_gen/resources/templates/related-packages/fileformats-extras/README.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FileFormats-medimage-CHANGEME Extras | ||
==================================== | ||
|
||
.. image:: https://github.com/nipype/pydra-freesurfer/actions/workflows/ci-cd.yaml/badge.svg | ||
:target: https://github.com/nipype/pydra-freesurfer/actions/workflows/ci-cd.yaml | ||
|
||
|
||
This is a extras module for the `fileformats-medimage-CHANGEME <https://github.com/nipype/pydra-CHANGEME/>`__ | ||
fileformats extension package, which provides additional functionality to format classes (i.e. aside | ||
from basic identification and validation), such as conversion tools, metadata parsers, | ||
sample data generators, etc... | ||
|
||
|
||
Quick Installation | ||
------------------ | ||
|
||
This extension can be installed for Python 3 using *pip*:: | ||
|
||
$ pip3 install fileformats-medimage-CHANGEME-extras | ||
|
||
This will install the package, base packages, and any other dependencies required to | ||
implement the extra functionality. | ||
|
||
License | ||
------- | ||
|
||
This work is licensed under a | ||
`Creative Commons Attribution 4.0 International License <http://creativecommons.org/licenses/by/4.0/>`_ | ||
|
||
.. image:: https://i.creativecommons.org/l/by/4.0/88x31.png | ||
:target: http://creativecommons.org/licenses/by/4.0/ | ||
:alt: Creative Commons Attribution 4.0 International License |
1 change: 1 addition & 0 deletions
1
...ates/related-packages/fileformats-extras/fileformats/extras/medimage_CHANGEME/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from ._version import __version__ |
87 changes: 87 additions & 0 deletions
87
nipype2pydra/pkg_gen/resources/templates/related-packages/fileformats-extras/pyproject.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
[build-system] | ||
requires = ["hatchling", "hatch-vcs"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "fileformats-medimage-CHANGEME-extras" | ||
description = "Extensions to add functionality to tool-specific *fileformats* classes" | ||
readme = "README.rst" | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
"fileformats", | ||
"fileformats-medimage-CHANGEME", | ||
"pydra >= 0.23.0a" | ||
] | ||
license = {file = "LICENSE"} | ||
authors = [ | ||
{name = "Thomas G. Close", email = "[email protected]"}, | ||
] | ||
maintainers = [ | ||
{name = "Thomas G. Close", email = "[email protected]"}, | ||
] | ||
keywords = [ | ||
"file formats", | ||
"data", | ||
] | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"Environment :: Console", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: POSIX :: Linux", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Topic :: Scientific/Engineering", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"black", | ||
"pre-commit", | ||
"codespell", | ||
"flake8", | ||
"flake8-pyproject", | ||
] | ||
test = [ | ||
"pytest >=6.2.5", | ||
"pytest-env>=0.6.2", | ||
"pytest-cov>=2.12.1", | ||
"codecov", | ||
] | ||
|
||
converters = [ | ||
] | ||
|
||
[project.urls] | ||
repository = "https://github.com/nipype/pydra-CHANGEME" | ||
|
||
[tool.hatch.version] | ||
source = "vcs" | ||
raw-options = { root = "../.." } | ||
|
||
[tool.hatch.build.hooks.vcs] | ||
version-file = "fileformats/extras/medimage_CHANGEME/_version.py" | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = ["fileformats"] | ||
|
||
[tool.black] | ||
target-version = ['py38'] | ||
exclude = "fileformats/extras/medimage_CHANGEME/_version.py" | ||
|
||
[tool.codespell] | ||
ignore-words = ".codespell-ignorewords" | ||
|
||
[tool.flake8] | ||
doctests = true | ||
per-file-ignores = [ | ||
"__init__.py:F401" | ||
] | ||
max-line-length = 88 | ||
select = "C,E,F,W,B,B950" | ||
extend-ignore = ['E203', 'E501', 'E129'] |
13 changes: 13 additions & 0 deletions
13
nipype2pydra/pkg_gen/resources/templates/related-packages/fileformats/LICENSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Copyright 2021 Nipype developers | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
Oops, something went wrong.