-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from DroneML/1-python-template
add content from python template
- Loading branch information
Showing
29 changed files
with
1,178 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Changes here will be overwritten by Copier | ||
SelectCitation: | ||
- AddCitationFile_flag | ||
- AddCFFConvert_flag | ||
SelectCodeQualityFeatures: | ||
- AddLocalTests_flag | ||
- SelectGitHubActions_flag | ||
- AddLinting_flag | ||
SelectCommunityFeatures: [] | ||
SelectDocumentationFeatures: | ||
- AddOnlineDocumentation_flag | ||
- AddDevDoc_flag | ||
- AddGitHubActionDocumentation_flag | ||
SelectGitHubActions: | ||
- AddGitHubActionBuild_flag | ||
- AddLinkCheck_flag | ||
SelectPublishReleaseFeatures: | ||
- SelectCitation_flag | ||
- AddZenodo_flag | ||
_commit: 0.6.1 | ||
_src_path: https://github.com/nlesc/python-template.git | ||
copyright_holder: Christiaan Meijer | ||
email: [email protected] | ||
full_name: Christiaan Meijer | ||
github_organization: DroneML | ||
keywords: Segmentation, UNet, Active learning, Drone, Raster data, Spatial data | ||
license: Apachev2 | ||
package_name: segmentmytiff | ||
package_short_description: Segment (georeferenced) raster data in an interactive fashion. | ||
Retrain models in seconds. Only small amounts of labeled data necessary because | ||
of our use of pretrained base models as feature extractors. | ||
template_profile: ask | ||
version: 0.1.0 |
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,63 @@ | ||
name: Python package | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
|
||
build: | ||
name: Build for (${{ matrix.python-version }}, ${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | ||
python-version: ['3.10', '3.11', '3.12'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Python info | ||
shell: bash -e {0} | ||
run: | | ||
which python | ||
python --version | ||
- name: Upgrade pip and install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install .[dev,publishing] | ||
- name: Run unit tests | ||
run: python -m pytest -v | ||
- name: Verify that we can build the package | ||
run: python -m build | ||
lint: | ||
name: Linting build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
- name: Python info | ||
shell: bash -e {0} | ||
run: | | ||
which python | ||
python --version | ||
- name: Upgrade pip and install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install .[dev,publishing] | ||
- name: Check style against standards using ruff | ||
run: | | ||
ruff check | ||
ruff format --check |
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,23 @@ | ||
name: cffconvert | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
|
||
verify: | ||
name: "cffconvert" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Check out a copy of the repository | ||
|
||
- name: Check whether the citation metadata from CITATION.cff is valid | ||
uses: citation-file-format/[email protected] | ||
with: | ||
args: "--validate" |
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,36 @@ | ||
name: documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-documentation: | ||
name: Build documentation | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
- name: Python info | ||
shell: bash -e {0} | ||
run: | | ||
which python | ||
python --version | ||
- name: Upgrade pip and install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install .[dev,publishing] | ||
- name: Install pandoc using apt | ||
run: sudo apt install pandoc | ||
- name: Build documentation | ||
run: make coverage doctest html | ||
working-directory: docs |
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,38 @@ | ||
name: link-check | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '0 0 1 * *' # first day of every month at midnight | ||
|
||
permissions: | ||
contents: read | ||
issues: write | ||
|
||
jobs: | ||
linkChecker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Link Checker | ||
id: lychee | ||
uses: lycheeverse/lychee-action@v1 | ||
|
||
- name: Set Issue Title | ||
id: set_title | ||
run: echo "ISSUE_TITLE=Link Checker Report - $(date '+%Y-%m-%d')" >> $GITHUB_ENV | ||
|
||
- name: Create Issue From File | ||
if: env.lychee_exit_code != 0 | ||
uses: peter-evans/create-issue-from-file@v5 | ||
with: | ||
title: ${{ env.ISSUE_TITLE }} | ||
content-filepath: ./lychee/out.md | ||
labels: report, automated issue |
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,69 @@ | ||
# Byte-compiled / optimized / DLL files | ||
*.py[cod] | ||
*$py.class | ||
__pycache__ | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# jupyter notebook | ||
.ipynb_checkpoints | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.coverage | ||
.coverage.* | ||
coverage.xml | ||
.cache | ||
.pytest_cache | ||
.tox/ | ||
|
||
# Sphinx documentation | ||
docs/_build | ||
|
||
# ide | ||
# PyCharm | ||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
#.idea/ | ||
.spyderproject | ||
.spyproject | ||
|
||
# Mac | ||
.DS_Store | ||
|
||
# virtual environments | ||
env | ||
.env | ||
env3 | ||
.env3 | ||
venv | ||
.venv | ||
venv3 | ||
.venv3 | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# vim | ||
*.swp | ||
*.swo | ||
*.orig |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,7 @@ | ||
version: 2 | ||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs |
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,19 @@ | ||
# YAML 1.2 | ||
--- | ||
cff-version: "1.2.0" | ||
title: "segmentmytiff" | ||
authors: | ||
- family-names: Meijer | ||
given-names: Christiaan | ||
orcid: "https://orcid.org/0000-0000-0000-0000" | ||
date-released: 2024-10-08 | ||
version: "0.1.0" | ||
repository-code: "https://github.com/DroneML/segmentmytiff" | ||
keywords: | ||
- "Segmentation" | ||
- " UNet" | ||
- " Active learning" | ||
- " Drone" | ||
- " Raster data" | ||
- " Spatial data" | ||
message: "If you use this software, please cite it using these metadata." |
Oops, something went wrong.