From 68931f4371bcb0acd970dc57742363231e1864c3 Mon Sep 17 00:00:00 2001 From: Qiusheng Wu Date: Fri, 11 Aug 2023 16:22:47 -0400 Subject: [PATCH] Initial commit --- .editorconfig | 21 +++++ .github/ISSUE_TEMPLATE/bug_report.md | 25 +++++ .github/ISSUE_TEMPLATE/config.yml | 10 ++ .github/ISSUE_TEMPLATE/feature_request.md | 18 ++++ .github/workflows/docs-build.yml | 51 ++++++++++ .github/workflows/docs.yml | 28 ++++++ .github/workflows/macos.yml | 38 ++++++++ .github/workflows/pypi.yml | 30 ++++++ .github/workflows/ubuntu.yml | 46 +++++++++ .github/workflows/windows.yml | 31 +++++++ .gitignore | 106 +++++++++++++++++++++ LICENSE | 22 +++++ MANIFEST.in | 7 ++ README.md | 17 ++++ docs/changelog.md | 11 +++ docs/common.md | 3 + docs/contributing.md | 108 ++++++++++++++++++++++ docs/examples/intro.ipynb | 21 +++++ docs/faq.md | 1 + docs/geoai.md | 4 + docs/index.md | 16 ++++ docs/installation.md | 21 +++++ docs/overrides/main.html | 11 +++ docs/usage.md | 7 ++ geoai/__init__.py | 5 + geoai/common.py | 7 ++ geoai/geoai.py | 1 + mkdocs.yml | 86 +++++++++++++++++ requirements.txt | 0 requirements_dev.txt | 12 +++ requirements_docs.txt | 24 +++++ setup.cfg | 22 +++++ setup.py | 57 ++++++++++++ tests/__init__.py | 1 + tests/test_geoai.py | 21 +++++ 35 files changed, 889 insertions(+) create mode 100644 .editorconfig create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/workflows/docs-build.yml create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/macos.yml create mode 100644 .github/workflows/pypi.yml create mode 100644 .github/workflows/ubuntu.yml create mode 100644 .github/workflows/windows.yml create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 MANIFEST.in create mode 100644 README.md create mode 100644 docs/changelog.md create mode 100644 docs/common.md create mode 100644 docs/contributing.md create mode 100644 docs/examples/intro.ipynb create mode 100644 docs/faq.md create mode 100644 docs/geoai.md create mode 100644 docs/index.md create mode 100644 docs/installation.md create mode 100644 docs/overrides/main.html create mode 100644 docs/usage.md create mode 100644 geoai/__init__.py create mode 100644 geoai/common.py create mode 100644 geoai/geoai.py create mode 100644 mkdocs.yml create mode 100644 requirements.txt create mode 100644 requirements_dev.txt create mode 100644 requirements_docs.txt create mode 100644 setup.cfg create mode 100644 setup.py create mode 100644 tests/__init__.py create mode 100644 tests/test_geoai.py diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d4a2c44 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,21 @@ +# http://editorconfig.org + +root = true + +[*] +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true +insert_final_newline = true +charset = utf-8 +end_of_line = lf + +[*.bat] +indent_style = tab +end_of_line = crlf + +[LICENSE] +insert_final_newline = false + +[Makefile] +indent_style = tab diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..d2e449d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,25 @@ +--- +name: Bug Report +about: Create a bug report to help us improve +labels: bug +--- + + + +### Environment Information + +- geoai version: +- Python version: +- Operating System: + +### Description + +Describe what you were trying to get done. +Tell us what happened, what went wrong, and what you expected to happen. + +### What I Did + +``` +Paste the command(s) you ran and the output. +If there was a crash, please include the traceback here. +``` diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..6ce4abb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,10 @@ +contact_links: + - name: Ask questions + url: https://github.com/opengeos/geoai/discussions/categories/q-a + about: Please ask and answer questions here. + - name: Ideas + url: https://github.com/opengeos/geoai/discussions/categories/ideas + about: Please share your ideas here. + - name: Ask questions from the GIS community + url: https://gis.stackexchange.com + about: To get answers from questions in the GIS community, please ask and answer questions here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..cf7acb9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,18 @@ +--- +name: Feature Request +about: Submit a feature request to help us improve +labels: Feature Request +--- + + + +### Description + +Describe the feature (e.g., new functions/tutorials) you would like to propose. +Tell us what can be achieved with this new feature and what's the expected outcome. + +### Source code + +``` +Paste your source code here if have sample code to share. +``` diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml new file mode 100644 index 0000000..57096bc --- /dev/null +++ b/.github/workflows/docs-build.yml @@ -0,0 +1,51 @@ +name: docs-build +on: + pull_request: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install GDAL + run: | + python -m pip install --upgrade pip + pip install --find-links=https://girder.github.io/large_image_wheels --no-cache GDAL pyproj + - name: Test GDAL installation + run: | + python -c "from osgeo import gdal" + gdalinfo --version + - name: Install dependencies + run: | + pip install --no-cache-dir Cython + pip install -r requirements.txt -r requirements_dev.txt -r requirements_docs.txt + pip install . + - name: Discover typos with codespell + run: codespell --skip="*.csv,*.geojson,*.json,*.js,*.html,*cff,*.pdf,./.git" --ignore-words-list="aci,acount,acounts,fallow,hart,hist,nd,ned,ois,wqs" + - name: PKG-TEST + run: | + python -m unittest discover tests/ + - name: Build docs + run: | + mkdocs build + # - name: Deploy to Netlify + # uses: nwtgck/actions-netlify@v2.0 + # with: + # publish-dir: "./site" + # production-branch: master + # github-token: ${{ secrets.GITHUB_TOKEN }} + # deploy-message: "Deploy from GitHub Actions" + # enable-pull-request-comment: true + # enable-commit-comment: false + # overwrites-pull-request-comment: true + # env: + # NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + # NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + # timeout-minutes: 10 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..7262e05 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,28 @@ +name: docs +on: + push: + branches: + - main +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.9 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install --user --no-cache-dir Cython + pip install --user -r requirements.txt + pip install . + - name: Discover typos with codespell + run: | + pip install codespell + codespell --skip="*.csv,*.geojson,*.json,*.js,*.html,*cff,./.git" --ignore-words-list="aci,acount,acounts,fallow,hart,hist,nd,ned,ois,wqs,watermask" + - name: PKG-TEST + run: | + python -m unittest discover tests/ + - run: pip install -r requirements_docs.txt + - run: mkdocs gh-deploy --force diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000..3bb390c --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,38 @@ +on: + push: + branches: + - main + pull_request: + branches: + - main + +name: macOS build +jobs: + test-macOS: + runs-on: ${{ matrix.os }} + name: ${{ matrix.os }} (${{ matrix.python-version}}) + strategy: + fail-fast: false + matrix: + os: ["macOS-latest"] + python-version: ["3.10"] + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version}} + - name: Install GDAL + run: | + brew install gdal + - name: Test GDAL installation + run: | + gdalinfo --version + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install --no-cache-dir Cython + pip install -r requirements.txt + pip install . diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..2bbb0c0 --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,30 @@ +# This workflows will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: pypi + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERS }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml new file mode 100644 index 0000000..dd78cdd --- /dev/null +++ b/.github/workflows/ubuntu.yml @@ -0,0 +1,46 @@ +on: + push: + branches: + - main + pull_request: + branches: + - main + +name: Linux build +jobs: + py-check: + runs-on: ${{ matrix.config.os }} + name: ${{ matrix.config.os }} (${{ matrix.config.py }}) + strategy: + fail-fast: false + matrix: + config: + - { os: ubuntu-latest, py: "3.8" } + - { os: ubuntu-latest, py: "3.9" } + - { os: ubuntu-latest, py: "3.10" } + - { os: ubuntu-latest, py: "3.11" } + steps: + - name: Checkout Code + uses: actions/checkout@v3 + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.config.py }} + - name: Install GDAL + run: | + python -m pip install --upgrade pip + pip install --no-cache-dir Cython + pip install --find-links=https://girder.github.io/large_image_wheels --no-cache GDAL + - name: Test GDAL installation + run: | + python -c "from osgeo import gdal" + gdalinfo --version + - name: Install dependencies + run: | + pip install --user -r requirements.txt + pip install --user -r requirements_dev.txt + pip install . + - name: PKG-TEST + run: | + python -m unittest discover tests/ + diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..84c0b02 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,31 @@ +on: + push: + branches: + - main + pull_request: + branches: + - main + +name: Windows build +jobs: + test-windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - name: Install miniconda + uses: conda-incubator/setup-miniconda@v2 + with: + auto-activate-base: true + python-version: "3.10" + - name: Install GDAL + run: conda install -c conda-forge gdal --yes + - name: Test GDAL installation + run: | + python -c "from osgeo import gdal" + gdalinfo --version + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install --no-cache-dir Cython + pip install -r requirements.txt + pip install . diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..631004a --- /dev/null +++ b/.gitignore @@ -0,0 +1,106 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +private/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# dotenv +.env + +# virtualenv +.venv +venv/ +ENV/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ + +# IDE settings +.vscode/ \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0962b5f --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2023, Qiusheng Wu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..89411aa --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,7 @@ +include LICENSE +include README.md +include requirements.txt + +recursive-exclude * __pycache__ +recursive-exclude * *.py[co] + diff --git a/README.md b/README.md new file mode 100644 index 0000000..e4efc08 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# geoai + + +[![image](https://img.shields.io/pypi/v/geoai.svg)](https://pypi.python.org/pypi/geoai) +[![image](https://img.shields.io/conda/vn/conda-forge/geoai.svg)](https://anaconda.org/conda-forge/geoai) + + +**A Python package for using Artificial Intelligence (AI) with geospatial data** + + +- Free software: MIT license +- Documentation: https://opengeos.github.io/geoai + + +## Features + +- TODO diff --git a/docs/changelog.md b/docs/changelog.md new file mode 100644 index 0000000..289e2c5 --- /dev/null +++ b/docs/changelog.md @@ -0,0 +1,11 @@ +# Changelog + +## v0.0.1 - Date + +**Improvement**: + +- TBD + +**New Features**: + +- TBD diff --git a/docs/common.md b/docs/common.md new file mode 100644 index 0000000..b84badb --- /dev/null +++ b/docs/common.md @@ -0,0 +1,3 @@ +# common module + +::: geoai.common \ No newline at end of file diff --git a/docs/contributing.md b/docs/contributing.md new file mode 100644 index 0000000..4445492 --- /dev/null +++ b/docs/contributing.md @@ -0,0 +1,108 @@ +# Contributing + +Contributions are welcome, and they are greatly appreciated! Every +little bit helps, and credit will always be given. + +You can contribute in many ways: + +## Types of Contributions + +### Report Bugs + +Report bugs at . + +If you are reporting a bug, please include: + +- Your operating system name and version. +- Any details about your local setup that might be helpful in troubleshooting. +- Detailed steps to reproduce the bug. + +### Fix Bugs + +Look through the GitHub issues for bugs. Anything tagged with `bug` and +`help wanted` is open to whoever wants to implement it. + +### Implement Features + +Look through the GitHub issues for features. Anything tagged with +`enhancement` and `help wanted` is open to whoever wants to implement it. + +### Write Documentation + +geoai could always use more documentation, +whether as part of the official geoai docs, +in docstrings, or even on the web in blog posts, articles, and such. + +### Submit Feedback + +The best way to send feedback is to file an issue at +. + +If you are proposing a feature: + +- Explain in detail how it would work. +- Keep the scope as narrow as possible, to make it easier to implement. +- Remember that this is a volunteer-driven project, and that contributions are welcome :) + +## Get Started! + +Ready to contribute? Here's how to set up geoai for local development. + +1. Fork the geoai repo on GitHub. + +2. Clone your fork locally: + + ```shell + $ git clone git@github.com:your_name_here/geoai.git + ``` + +3. Install your local copy into a virtualenv. Assuming you have + virtualenvwrapper installed, this is how you set up your fork for + local development: + + ```shell + $ mkvirtualenv geoai + $ cd geoai/ + $ python setup.py develop + ``` + +4. Create a branch for local development: + + ```shell + $ git checkout -b name-of-your-bugfix-or-feature + ``` + + Now you can make your changes locally. + +5. When you're done making changes, check that your changes pass flake8 + and the tests, including testing other Python versions with tox: + + ```shell + $ flake8 geoai tests + $ python setup.py test or pytest + $ tox + ``` + + To get flake8 and tox, just pip install them into your virtualenv. + +6. Commit your changes and push your branch to GitHub: + + ```shell + $ git add . + $ git commit -m "Your detailed description of your changes." + $ git push origin name-of-your-bugfix-or-feature + ``` + +7. Submit a pull request through the GitHub website. + +## Pull Request Guidelines + +Before you submit a pull request, check that it meets these guidelines: + +1. The pull request should include tests. +2. If the pull request adds functionality, the docs should be updated. + Put your new functionality into a function with a docstring, and add + the feature to the list in README.rst. +3. The pull request should work for Python 3.5, 3.6, 3.7 and 3.8, and + for PyPy. Check and make sure that the tests pass for all + supported Python versions. diff --git a/docs/examples/intro.ipynb b/docs/examples/intro.ipynb new file mode 100644 index 0000000..ebd171a --- /dev/null +++ b/docs/examples/intro.ipynb @@ -0,0 +1,21 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print('Hello World!')" + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + }, + "orig_nbformat": 4 + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/docs/faq.md b/docs/faq.md new file mode 100644 index 0000000..4514b4c --- /dev/null +++ b/docs/faq.md @@ -0,0 +1 @@ +# FAQ diff --git a/docs/geoai.md b/docs/geoai.md new file mode 100644 index 0000000..0f0df0b --- /dev/null +++ b/docs/geoai.md @@ -0,0 +1,4 @@ + +# geoai module + +::: geoai.geoai \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..180d83f --- /dev/null +++ b/docs/index.md @@ -0,0 +1,16 @@ +# Welcome to geoai + + +[![image](https://img.shields.io/pypi/v/geoai.svg)](https://pypi.python.org/pypi/geoai) + + +**A Python package for using Artificial Intelligence (AI) with geospatial data** + + +- Free software: MIT license +- Documentation: + + +## Features + +- TODO diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 0000000..4b7c630 --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,21 @@ +# Installation + +## Stable release + +To install geoai, run this command in your terminal: + +``` +pip install geoai +``` + +This is the preferred method to install geoai, as it will always install the most recent stable release. + +If you don't have [pip](https://pip.pypa.io) installed, this [Python installation guide](http://docs.python-guide.org/en/latest/starting/installation/) can guide you through the process. + +## From sources + +To install geoai from sources, run this command in your terminal: + +``` +pip install git+https://github.com/opengeos/geoai +``` diff --git a/docs/overrides/main.html b/docs/overrides/main.html new file mode 100644 index 0000000..702c96b --- /dev/null +++ b/docs/overrides/main.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block content %} +{% if page.nb_url %} + + {% include ".icons/material/download.svg" %} + +{% endif %} + +{{ super() }} +{% endblock content %} diff --git a/docs/usage.md b/docs/usage.md new file mode 100644 index 0000000..e55c446 --- /dev/null +++ b/docs/usage.md @@ -0,0 +1,7 @@ +# Usage + +To use geoai in a project: + +``` +import geoai +``` diff --git a/geoai/__init__.py b/geoai/__init__.py new file mode 100644 index 0000000..8119edb --- /dev/null +++ b/geoai/__init__.py @@ -0,0 +1,5 @@ +"""Top-level package for geoai.""" + +__author__ = """Qiusheng Wu""" +__email__ = 'giswqs@gmail.com' +__version__ = '0.0.1' diff --git a/geoai/common.py b/geoai/common.py new file mode 100644 index 0000000..6967be7 --- /dev/null +++ b/geoai/common.py @@ -0,0 +1,7 @@ +"""The common module contains common functions and classes used by the other modules. +""" + +def hello_world(): + """Prints "Hello World!" to the console. + """ + print("Hello World!") \ No newline at end of file diff --git a/geoai/geoai.py b/geoai/geoai.py new file mode 100644 index 0000000..dd0b80e --- /dev/null +++ b/geoai/geoai.py @@ -0,0 +1 @@ +"""Main module.""" diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..9d34237 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,86 @@ +site_name: geoai +site_description: A Python package for using Artificial Intelligence (AI) with geospatial data +site_author: opengeos +site_url: https://opengeos.github.io/geoai +repo_url: https://github.com/opengeos/geoai + +copyright: "Copyright © 2023 - 2023 Qiusheng Wu" + +theme: + palette: + - scheme: default + # primary: blue + # accent: indigo + toggle: + icon: material/toggle-switch-off-outline + name: Switch to dark mode + - scheme: slate + primary: indigo + accent: indigo + toggle: + icon: material/toggle-switch + name: Switch to light mode + name: material + icon: + repo: fontawesome/brands/github + # logo: assets/logo.png + # favicon: assets/favicon.png + features: + - navigation.instant + - navigation.tracking + - navigation.top + - search.highlight + - search.share + custom_dir: "docs/overrides" + font: + text: Google Sans + code: Regular + +plugins: + - search + - mkdocstrings + - git-revision-date + - git-revision-date-localized: + enable_creation_date: true + type: timeago + # - pdf-export + - mkdocs-jupyter: + include_source: True + ignore_h1_titles: True + execute: True + allow_errors: false + ignore: ["conf.py"] + execute_ignore: ["*ignore.ipynb"] + +markdown_extensions: + - admonition + - abbr + - attr_list + - def_list + - footnotes + - meta + - md_in_html + - pymdownx.superfences + - pymdownx.highlight: + linenums: true + - toc: + permalink: true + +# extra: +# analytics: +# provider: google +# property: UA-XXXXXXXXX-X + +nav: + - Home: index.md + - Installation: installation.md + - Usage: usage.md + - Contributing: contributing.md + - FAQ: faq.md + - Changelog: changelog.md + - Report Issues: https://github.com/opengeos/geoai/issues + - Examples: + - examples/intro.ipynb + - API Reference: + - geoai module: geoai.md + - common module: common.md diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/requirements_dev.txt b/requirements_dev.txt new file mode 100644 index 0000000..2a86222 --- /dev/null +++ b/requirements_dev.txt @@ -0,0 +1,12 @@ +black +black[jupyter] +pip +bump2version +wheel +watchdog +flake8 +tox +coverage +Sphinx +twine + diff --git a/requirements_docs.txt b/requirements_docs.txt new file mode 100644 index 0000000..bd75819 --- /dev/null +++ b/requirements_docs.txt @@ -0,0 +1,24 @@ +bump2version +coverage +flake8 +ipykernel +livereload +nbconvert +nbformat +pip +sphinx +tox +twine +watchdog +wheel +mkdocs +mkdocs-git-revision-date-plugin +mkdocs-git-revision-date-localized-plugin +mkdocs-jupyter>=0.24.0 +mkdocs-material>=9.1.3 +mkdocs-pdf-export-plugin +mkdocstrings +mkdocstrings-crystal +mkdocstrings-python-legacy +pygments +pymdown-extensions \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..914033b --- /dev/null +++ b/setup.cfg @@ -0,0 +1,22 @@ +[bumpversion] +current_version = 0.0.1 +commit = True +tag = True + +[bumpversion:file:setup.py] +search = version='{current_version}' +replace = version='{new_version}' + +[bumpversion:file:geoai/__init__.py] +search = __version__ = '{current_version}' +replace = __version__ = '{new_version}' + +[bdist_wheel] +universal = 1 + +[flake8] +exclude = docs + +[aliases] +# Define setup.py command aliases here + diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..9119c3b --- /dev/null +++ b/setup.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python + +"""The setup script.""" + +import io +from os import path as op +from setuptools import setup, find_packages + +with open('README.md') as readme_file: + readme = readme_file.read() + +here = op.abspath(op.dirname(__file__)) + +# get the dependencies and installs +with io.open(op.join(here, "requirements.txt"), encoding="utf-8") as f: + all_reqs = f.read().split("\n") + +install_requires = [x.strip() for x in all_reqs if "git+" not in x] +dependency_links = [x.strip().replace("git+", "") for x in all_reqs if "git+" not in x] + +requirements = [ ] + +setup_requirements = [ ] + +test_requirements = [ ] + +setup( + author="Qiusheng Wu", + author_email='giswqs@gmail.com', + python_requires='>=3.8', + classifiers=[ + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + ], + description="A Python package for using Artificial Intelligence (AI) with geospatial data", + install_requires=install_requires, + dependency_links=dependency_links, + license="MIT license", + long_description=readme, + long_description_content_type='text/markdown', + include_package_data=True, + keywords='geoai', + name='geoai', + packages=find_packages(include=['geoai', 'geoai.*']), + setup_requires=setup_requirements, + test_suite='tests', + tests_require=test_requirements, + url='https://github.com/opengeos/geoai', + version='0.0.1', + zip_safe=False, +) diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e1a3bca --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1 @@ +"""Unit test package for geoai.""" diff --git a/tests/test_geoai.py b/tests/test_geoai.py new file mode 100644 index 0000000..e6f1bee --- /dev/null +++ b/tests/test_geoai.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python + +"""Tests for `geoai` package.""" + + +import unittest + +from geoai import geoai + + +class TestGeoai(unittest.TestCase): + """Tests for `geoai` package.""" + + def setUp(self): + """Set up test fixtures, if any.""" + + def tearDown(self): + """Tear down test fixtures, if any.""" + + def test_000_something(self): + """Test something."""