diff --git a/.gitignore b/.gitignore index cfc5568..863bcb8 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,9 @@ backup/llf /doc/build/ */__pycache__/* +__pycache__/ +build/ +easyreg.egg-info/ /training_atlas_ll3/ /training_atlas/ ./RELEASE-VERSION diff --git a/.travis.yml b/.travis.yml index b51e974..0648cc0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,35 +52,12 @@ jobs: # - CXX=clang++ -install: - # Create a new environment - - conda create --yes --name test python=$TRAVIS_PYTHON_VERSION - # Activate it - - source activate test - # Install various dependencies - - conda install --yes numpy=1.17 pytest pip install: - - conda install --yes conda-build - # You can add any CONDA channels you may need here. CONDA supports - # both the commands add and append. The only difference is that - # the add command places the channel at the front of the priority - # list, while append does the opposite. - - conda config --add channels pytorch - - conda config --add channels conda-forge - - conda config --add channels anaconda - - conda config --add channels uncbiag - - conda install easyreg - - # Build the conda recipe for this package - - conda build . --python=$TRAVIS_PYTHON_VERSION --output-folder bld-dir - # Add the built package as a channel with highest priority - - conda config --add channels "file://`pwd`/bld-dir" - - # Create and activate the test environment - - conda create --yes --name test-environment python=$TRAVIS_PYTHON_VERSION easyreg --file dev-requirements.txt - - source activate test-environment - + - which python + - pip wheel . --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple -w dist + - pip install --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple dist/easyreg* + # command to install dependencies #install: diff --git a/bld.bat b/bld.bat deleted file mode 100644 index b9cd616..0000000 --- a/bld.bat +++ /dev/null @@ -1,2 +0,0 @@ -"%PYTHON%" setup.py install --single-version-externally-managed --record=record.txt -if errorlevel 1 exit 1 diff --git a/build.sh b/build.sh deleted file mode 100644 index e5e55a4..0000000 --- a/build.sh +++ /dev/null @@ -1,10 +0,0 @@ -$PYTHON setup.py install --single-version-externally-managed --record=record.txt - -# Add more build steps here, if they are necessary. - -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. - - - diff --git a/conda_build_config.yaml b/conda_build_config.yaml deleted file mode 100644 index 12259d6..0000000 --- a/conda_build_config.yaml +++ /dev/null @@ -1,24 +0,0 @@ -cxx_compiler: - - clang_bootstrap # [osx] - - gxx # [linux] - - vs2017 # [win] - -c_compiler: - - clang_bootstrap # [osx] - - gcc # [linux] - - vs2017 # [win] - -vc: - - 14 - -python: - - 3.7 - -numpy: - - 1.17 - -c_compiler_version: # [osx] - - "*" # [osx] - -cxx_compiler_version: # [osx] - - "*" # [osx] \ No newline at end of file diff --git a/meta.yaml b/meta.yaml deleted file mode 100644 index f74827d..0000000 --- a/meta.yaml +++ /dev/null @@ -1,74 +0,0 @@ -# -# This is how to do the build (and some other useful commands) -# -# To build requires access to the conda-forge, pytorchm and anaconda channels -# can be used with --debug flag -# conda build . -c pytorch -c conda-forge -c anaconda -c uncbiag -# -# to upload to the cloud -# anaconda login -# anaconda upload --user uncbiag easyreg -# -# Combined with travis, to auto-create conda packages and upload them to the conda cloud, tag them. - -{% set name = "easyreg" %} - -package: - name: '{{ name|lower }}' - version: {{ GIT_DESCRIBE_TAG }} - -source: - - git_url: . - -requirements: - build: - - python ==3.7 - - setuptools - - pip - - run: - - python ==3.7 - - ipython - - numpy >=1.17 - - future - - scikit-image - - cffi - - itk - - pytorch - - pynrrd - - torchvision - - pandas - - matplotlib - - scipy - - openpyxl - - sphinx - - progressbar2 - - h5py - - SimpleITK - - tensorboardX - - blosc - - ants - - nibabel - - webcolors - - sklearn - - gdown - -#test: -# imports: -# - easyreg - -about: - home: https://github.com/uncbiag/easyreg - license: Apache 2.0 license - license_family: BSD - license_file: LICENSE - summary: 'Deep-learning-based image registration. Companion package to mermaid.' - description: 'This image registration toolbox provides approaches to train and run deep-learning-based image registration networks based on the transformation models available within mermaid. It is written in pytorch allowing for easy prototyping of new approaches. To install include the conda-forge and the anaconda channels by executing: conda install -c pytorch -c conda-forge -c anaconda -c uncbiag easyreg' - doc_url: 'https://easyreg.readthedocs.io/en/latest/' - dev_url: 'https://github.com/uncbiag/easyreg' - -extra: - recipe-maintainers: - - marcniethammer - - hbgtjxzbbx - diff --git a/requirements.txt b/requirements.txt index e64e25c..d231a50 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,3 +25,4 @@ torchvision sklearn gdown nose +mermaid diff --git a/setup.py b/setup.py index 2924dd7..ae791c9 100644 --- a/setup.py +++ b/setup.py @@ -47,7 +47,8 @@ "nibabel", "webcolors", "sklearn", - "gdown" + "gdown", + "mermaid" ] # What packages are optional? @@ -144,7 +145,7 @@ def run(self): classifiers=[ # Trove classifiers # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers - 'License :: OSI Approved :: Apache 2.0 License', + 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', diff --git a/travis_test.sh b/travis_test.sh index 650050c..ec66991 100755 --- a/travis_test.sh +++ b/travis_test.sh @@ -1,4 +1,5 @@ cd test_models +which python # this requires GPU support #gdown https://drive.google.com/uc?id=1RI7YevByrLAKy1JTv6KG4RSAnHIC7ybb #unzip demo.zip -d . diff --git a/version.py b/version.py index e0ca250..17a4dd3 100644 --- a/version.py +++ b/version.py @@ -50,6 +50,7 @@ def call_git_describe(abbrev): def is_dirty(): + return False try: p = Popen(["git", "diff-index", "--name-only", "HEAD"], stdout=PIPE, stderr=PIPE)