Skip to content

Commit

Permalink
Merge pull request #64 from SenteraLLC/DEM-303-mosaic-funcs
Browse files Browse the repository at this point in the history
[DEM 303] Adding functions from `mosaic-modeling`
  • Loading branch information
marissakivi committed Mar 29, 2023
2 parents 7b52a2e + 63e9fd1 commit 65f500e
Show file tree
Hide file tree
Showing 12 changed files with 3,635 additions and 688 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/create_github_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Create GitHub Release

on:
push:
branches:
- main
workflow_dispatch:

jobs:
release:
name: Create GitHub Release
runs-on: ubuntu-22.04
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v3.1.0
with:
fetch-depth: 0

- name: TOML Reader
id: read_toml
uses: SebRollen/toml-action@2bd04b06a3ebc3e6a3eb6060de115710cad16cd6 #v1.0.2
with:
file: 'pyproject.toml'
field: 'tool.poetry.version'

- name: Define TAG
run: |
export VERSION="${{ steps.read_toml.outputs.value }}"
echo "TAG=v$VERSION" >> $GITHUB_ENV
- name: Create Release
uses: actions/github-script@v6
with:
result-encoding: string
retries: 3
script: |
github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: process.env.TAG,
target_commitish: context.sha,
name: process.env.TAG,
generate_release_notes: true
})
22 changes: 10 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
repos:
- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.4.2
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/ambv/black
rev: 20.8b1
rev: 23.1.0
rev: 23.1.0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: '3.8.3'
- repo: https://github.com/pycqa/flake8
rev: '6.0.0'
hooks:
- id: flake8
exclude: (tests|doc)
additional_dependencies: [
'flake8-docstrings',
'flake8-builtins',
'flake8-logging-format',
'flake8-rst-docstrings',
'pygments',
'pep8-naming'
]
default_language_version:
python: python3
]
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.13
3.10.4
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
language: python
python: 3.9
python: "3.10"
dist: focal

install:
- 'pip install poetry'
- 'pip install poetry==1.3.2'
- 'poetry install'

script:
- poetry --version
- poetry --version
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ poetry install
poetry run pre-commit install
```

### Release/Tags
- A GitHub release is created on every push to the main branch using the `create_github_release.yml` Github Action Workflow
- Releases can be created manually through the GitHub Actions UI as well.
- The name of the Release/Tag will match the value of the version field specified in `pyproject.toml`
- Release Notes will be generated automatically and linked to the Release/Tag

## Setup and Installation (used as a library)
If using `geoml` as a dependency in your script, simply add it to the `pyproject.toml` in your project repo.

Expand Down
21 changes: 11 additions & 10 deletions geoml/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import importlib.metadata
from .join_tables import JoinTables
from .tables import Tables
from .feature_data import FeatureData
from .feature_selection import FeatureSelection
from .training import Training
from .predict import Predict
"""ML functionality."""
# import importlib.metadata
# from .join_tables import JoinTables
# from .tables import Tables
# from .feature_data import FeatureData
# from .feature_selection import FeatureSelection
# from .training import Training
# from .predict import Predict


name = "geoml"
__version__ = importlib.metadata.version(name)
# name = "geoml"
# __version__ = importlib.metadata.version(name)

__all__ = ["JoinTables", "Tables", "FeatureData", "FeatureSelection", "Training"]
# __all__ = ["JoinTables", "Tables", "FeatureData", "FeatureSelection", "Training"]
2 changes: 1 addition & 1 deletion geoml/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Defines package version. Parsed by setup.py and imported by __init__.py."""

__version__ = "0.1.9"
__version__ = "1.0.0"
Loading

0 comments on commit 65f500e

Please sign in to comment.