Skip to content

Commit

Permalink
Merge pull request #111 from stac-utils/update-1.4.0
Browse files Browse the repository at this point in the history
Update 1.4.0
  • Loading branch information
jonhealy1 authored Oct 9, 2024
2 parents e66e3a3 + 1b604b3 commit b3f2597
Show file tree
Hide file tree
Showing 12 changed files with 458 additions and 306 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish

on:
push:
tags:
- "v*.*.*" # Triggers when a tag starting with 'v' followed by version numbers is pushed

jobs:
build-and-publish:
name: Build and Publish to PyPI
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build package
run: |
python setup.py sdist bdist_wheel
- name: Publish package to PyPI
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload dist/*
38 changes: 32 additions & 6 deletions .github/workflows/test-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,50 @@ on:
- dev

jobs:
pre-commit:
name: Run pre-commit checks
runs-on: ubuntu-latest

test:
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install '.[dev]'
- name: Run pre-commit checks
uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files
env:
PRE_COMMIT_HOME: ~/.cache/pre-commit

test:
needs: pre-commit # This ensures tests run after pre-commit checks
name: Execute tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3

- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@main
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Run unit tests
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install '.[dev]'
pytest -v
- name: Run unit tests
run: pytest -v
32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
repos:
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
args:
- --ignore=E501,E712,W503
- repo: https://github.com/timothycrosley/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/psf/black
rev: 24.1.1
hooks:
- id: black
language_version: python3.10
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
exclude: /tests/
# --strict
args:
[
--no-strict-optional,
--ignore-missing-imports,
--implicit-reexport,
--explicit-package-bases,
]
additional_dependencies:
["types-attrs", "types-requests", "types-setuptools", "types-PyYAML"]
51 changes: 50 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,92 @@ The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/)

## Unreleased

## [v1.4.0] - 2024-10-09

### Added

- Added pre-commit config ([#111](https://github.com/stac-utils/stac-check/pull/111))
- Added publish.yml to automatically publish new releases to PyPI ([#111](https://github.com/stac-utils/stac-check/pull/111))

### Changed

- Updated stac-validator dependency to ensure STAC v1.1.0 compliance ([#111](https://github.com/stac-utils/stac-check/pull/111))

## [v1.3.3] - 2023-11-17

### Changed

- Development dependencies removed from runtime dependency list
([#109](https://github.com/stac-utils/stac-check/pull/109))

## [v1.3.2] - 2023-03-23

### Added

- Ability to lint dictionaries https://github.com/stac-utils/stac-check/pull/94
- Docstrings and pdoc api documents

### Fixed

- Fixed the check_catalog_file_name() method to only work on static catalogs https://github.com/stac-utils/stac-check/pull/94
- Jsonschema version to use a released version https://github.com/stac-utils/stac-check/pull/105

## [v1.3.1] - 2022-10-05

### Changed

- Changed pin on stac-validator to >=3.1.0 from ==3.2.0

## [v1.3.0] - 2022-09-20

### Added

- recursive mode lints assets https://github.com/stac-utils/stac-check/pull/84

### Changed

- recursive mode swaps pystac for stac-validator https://github.com/stac-utils/stac-check/pull/84

### Fixed

- fix catalog file name check https://github.com/stac-utils/stac-check/pull/83

## [v1.2.0] - 2022-04-26

### Added

- Option to include a configuration file to ignore selected checks

### Changed

- Change name from stac_check to stac-check in setup for cli

### Fixed

- Fix thumbnail size check

## [v1.1.2] - 2022-03-03

### Changed

- Make it easier to export linting messages
- Set stac-validator version to 2.4.0

### Fixed

- Fix self-link test

## [v1.0.1] - 2022-02-20

### Changed

- Update readme
- Reorganized code for version 1.0.0 release

## [v0.2.0] - 2022-02-02 - 2022-02-19

### Added

- Import main validator as stac-validator was updated to 2.3.0
- Added best practices docuument to repo
- Recommend 'self' link in links
Expand All @@ -62,29 +101,39 @@ The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/)
- Check for small thumbnail image file type

## [v0.1.3] - 2022-01-23

### Added

- Check for bloated metadata, too many fields in properties
- Check for geometry field, recommend that STAC not be used for non-spatial data

### Changed

- Changed bloated links check to a boolean to mirror bloated metadata

## [v0.1.2] - 2022-01-17 - 2022-01-22

### Added

- Check for null datetime
- Check for unlocated items, bbox should be set to null if geometry is

## [v0.1.1] - 2021-11-26 - 2021-12-12

### Added

- Added github actions to test and push to pypi
- Added makefile, dockerfile

### Changed

- Removed pipenv

## [v0.1.0] - 2021-11-26 - 2021-12-05

### Added
- Best practices - searchable identifiers - lowercase, numbers, '_' or '-'

- Best practices - searchable identifiers - lowercase, numbers, '\_' or '-'
for id names
https://github.com/radiantearth/stac-spec/blob/master/best-practices.md#searchable-identifiers
- Best practices ensure item ids don't contain ':' or '/' characters
Expand Down
21 changes: 12 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import List

# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
Expand All @@ -6,24 +8,25 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'stac-check'
author = 'Jonathan Healy'
release = '1.3.1'
project = "stac-check"
author = "Jonathan Healy"
release = "1.3.1"


# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = []
extensions: List[str] = []

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']
html_theme = "alabaster"
html_static_path = ["_static"]

html_css_files = [
'custom.css',
"custom.css",
]
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"""stac-check setup.py
"""
from setuptools import setup, find_packages

__version__ = "1.3.3"
from setuptools import find_packages, setup

__version__ = "1.4.0"

with open("README.md", "r") as fh:
long_description = fh.read()
Expand All @@ -18,24 +19,23 @@
"click>=8.0.0",
"requests>=2.19.1",
"jsonschema>=3.1.2",
"stac-validator>=3.1.0",
"stac-validator>=3.4.0",
"PyYAML",
"python-dotenv",
"setuptools",
],
extras_require={
"dev": [
"pytest",
"types-setuptools",
],
},
entry_points={
'console_scripts': ['stac-check=stac_check.cli:main']
},
entry_points={"console_scripts": ["stac-check=stac_check.cli:main"]},
author="Jonathan Healy",
author_email="jonathan.d.healy@gmail.com",
license="MIT",
long_description=long_description,
long_description_content_type="text/markdown",
python_requires=">=3.8",
tests_require=["pytest"]
tests_require=["pytest"],
)
Loading

0 comments on commit b3f2597

Please sign in to comment.