-
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.
Support builds on windows, linux, and osx (#3)
* Fix build on windows * Switch to conda build * Remove cuda dependencies * Set default actions shell to bash * Fix conda install on windows in GH actions test * Set bash as default shell * Test python 3.8 and 3.9 * Downgrade numpy See brycefrank/pyfor#78 * Tidy up action workflow * Fix install
- Loading branch information
Showing
16 changed files
with
95 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
# For more information see: https:/help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Tests | ||
|
||
|
@@ -10,32 +10,34 @@ on: | |
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ["3.8", "3.9"] | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
python-version: [ "3.8", "3.9" ] | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Setup Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.1 | ||
- name: Install dependencies | ||
run: | | ||
poetry install | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
poetry run pytest | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
environment-file: environment.yml | ||
python-version: ${{ matrix.python-version }} | ||
auto-update-conda: true | ||
auto-activate-base: true | ||
- name: Lint with flake8 | ||
run: | | ||
conda install flake8 | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
conda install pytest | ||
pytest |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,50 @@ | ||
{% set name = "hakai_segmentation" %} | ||
{% set version = "0.1.0rc2" %} | ||
|
||
package: | ||
name: "{{ name|lower }}" | ||
version: "{{ version }}" | ||
|
||
source: | ||
path: ../../ | ||
|
||
build: | ||
noarch: python | ||
number: 0 | ||
entry_points: | ||
- kom = hakai_segmentation.cli:cli | ||
script: "{{ PYTHON }} -m pip install . -vv" | ||
|
||
requirements: | ||
host: | ||
- python | ||
- pip | ||
- poetry | ||
run: | ||
- python | ||
- fire >=0.4.0,<0.5.0 | ||
- numpy >=1.22.2,<2.0.0 | ||
- rasterio >=1.2.10,<2.0.0 | ||
- pytorch >=1.10.2,<2.0.0 | ||
- torchvision >=0.11.3,<0.12.0 | ||
- tqdm >=4.62.3,<5.0 | ||
|
||
test: | ||
imports: | ||
- hakai_segmentation | ||
- hakai_segmentation.data | ||
- hakai_segmentation.geotiff_io | ||
commands: | ||
- kom --help | ||
|
||
about: | ||
home: "https://github.com/hakaiInstitute/hakai-segmentation" | ||
license: MIT | ||
license_file: LICENSE.txt | ||
summary: "Hakai Segment Tool for GeoTiff RPAS Imagery" | ||
doc_url: "https://hakai-segmentation.readthedocs.io" | ||
dev_url: "https://github.com/hakaiInstitute/hakai-segmentation" | ||
|
||
extra: | ||
recipe-maintainers: | ||
- tayden |
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 @@ | ||
name: hakai-segmentation | ||
channels: | ||
- pytorch | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- python>=3.8,<3.10 | ||
- conda-forge::fire | ||
- conda-forge::numpy | ||
- conda-forge::rasterio | ||
- conda-forge::tqdm | ||
- pytorch::pytorch>=1.10 | ||
- pytorch::torchvision |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from hakai_segmentation.geotiff_io.geotiff_reader import GeotiffReader | ||
from hakai_segmentation.geotiff_io.geotiff_writer import GeotiffWriter | ||
|
||
__all__ = [GeotiffReader, GeotiffWriter] | ||
__all__ = ['GeotiffReader', 'GeotiffWriter'] |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ authors = ["Taylor Denouden <[email protected]>"] | |
license = "MIT" | ||
readme = "README.rst" | ||
repository = "https://github.com/hakaiInstitute/hakai-segmentation" | ||
documentation = "https://hakai-segmentation.readthedocs.io" | ||
|
||
packages = [ | ||
{ include = "hakai_segmentation" } | ||
|
@@ -21,19 +22,7 @@ tqdm = "^4.62.3" | |
torchvision = "^0.11.3" | ||
torch = "^1.10.2" | ||
fire = "^0.4.0" | ||
rasterio = [ | ||
{ version = "^1.2.10", platform = "linux || darwin" }, | ||
{ path = "windows/rasterio-1.2.10-cp38-cp38-win32.whl", markers = "python_version == '3.8' and platform_system == 'Windows' and platform_machine == 'x86_64'" }, | ||
{ path = "windows/rasterio-1.2.10-cp39-cp39-win32.whl", markers = "python_version == '3.9' and platform_system == 'Windows' and platform_machine == 'x86_64'" }, | ||
{ path = "windows/rasterio-1.2.10-cp38-cp38-win_amd64.whl", markers = "python_version == '3.8' and platform_system == 'Windows' and platform_machine == 'AMD64'" }, | ||
{ path = "windows/rasterio-1.2.10-cp39-cp39-win_amd64.whl", markers = "python_version == '3.9' and platform_system == 'Windows' and platform_machine == 'AMD64'" }, | ||
] | ||
gdal = [ | ||
{ path = "windows/GDAL-3.4.1-cp38-cp38-win32.whl", markers = "python_version == '3.8' and platform_system == 'Windows' and platform_machine == 'x86_64'" }, | ||
{ path = "windows/GDAL-3.4.1-cp39-cp39-win32.whl", markers = "python_version == '3.9' and platform_system == 'Windows' and platform_machine == 'x86_64'" }, | ||
{ path = "windows/GDAL-3.4.1-cp38-cp38-win_amd64.whl", markers = "python_version == '3.8' and platform_system == 'Windows' and platform_machine == 'AMD64'" }, | ||
{ path = "windows/GDAL-3.4.1-cp39-cp39-win_amd64.whl", markers = "python_version == '3.9' and platform_system == 'Windows' and platform_machine == 'AMD64'" }, | ||
] | ||
rasterio = "^1.2.1" | ||
|
||
[tool.poetry.dev-dependencies] | ||
pytest = "^7.0.1" | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.