Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 1.4.0 #111

Merged
merged 12 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/[email protected]
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="[email protected]",
license="MIT",
long_description=long_description,
long_description_content_type="text/markdown",
python_requires=">=3.8",
tests_require=["pytest"]
tests_require=["pytest"],
)
Loading
Loading