Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2 from rbavery/validate
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault authored Apr 18, 2024
2 parents 8c5829c + f2b7dc2 commit c3a3a67
Show file tree
Hide file tree
Showing 49 changed files with 7,623 additions and 1,443 deletions.
39 changes: 39 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Git
.git
.gitignore
.github

# Docker
.dockerignore

# IDE
.idea
.vscode

# Byte-compiled / optimized / DLL files
__pycache__/
**/__pycache__/
*.pyc
*.pyo
*.pyd
.Python
*.py[cod]
*$py.class
.pytest_cache/
..mypy_cache/

# poetry
.venv
requirements*.txt

# C extensions
*.so

# Virtual environment
.venv
venv

.DS_Store
.AppleDouble
.LSOverride
._*
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Check http://editorconfig.org for more information
# This is the main config file for this project:
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[*.{py, pyi}]
indent_style = space
indent_size = 4

[Makefile]
indent_style = tab

[*.md]
trim_trailing_whitespace = false

[*.{diff,patch}]
trim_trailing_whitespace = false
17 changes: 17 additions & 0 deletions .github/.stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 120
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 30
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs in 30 days. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: ":bug: Bug report"
about: If something isn't working 🔧
title: ''
labels: bug, needs-triage
assignees:
---

## :bug: Bug Report

<!-- A clear and concise description of what the bug is. -->

## :microscope: How To Reproduce

Steps to reproduce the behavior:

1. ...

### Code sample

<!-- If applicable, attach a minimal code sample to reproduce the described issue. -->

### Environment

* OS: [e.g. Linux / Windows / macOS]
* Python version
* stac-model version


## :chart_with_upwards_trend: Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## :paperclip: Additional context

<!-- Add any other context about the problem here. -->
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Configuration: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository

blank_issues_enabled: false
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: ":rocket: Feature request"
about: Suggest an idea for this project 🏖
title: ''
labels: enhancement, needs-triage
assignees:
---

## :rocket: Feature Request

<!-- A clear and concise description of the feature proposal. -->

## :sound: Motivation

<!-- Please describe the motivation for this proposal, such as the problem it solves, the intended users for the feature and what does success look like and how we can measure that. -->

## :satellite: Alternatives

<!-- A clear and concise description of any alternative solutions or features you've considered. -->

## :paperclip: Additional context

<!-- Add any other context or screenshots about the feature request here. -->
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: "red_question_mark Question"
about: Ask a question about this project 🎓
title: ''
labels: question, needs-triage
assignees:
---

## Checklist

<!-- Mark with an `x` all the checkboxes that apply (like `[x]`) -->

- [ ] I've searched the project's [`issues`][1], looking for the following terms:
- [...]

## :question: Question

<!-- What is your question -->

How can I [...]?

Is it possible to [...]?

## :paperclip: Additional context

<!-- Add any other context or screenshots about the feature request here. -->

[1]: https://github.com/crim-ca/stac-model/issues
30 changes: 30 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Description

<!-- Add a more detailed description of the changes if needed. -->

## Related Issue

<!-- If your PR refers to a related issue, link it here. -->

## Type of Change

<!-- Mark with an `x` all the checkboxes that apply (like `[x]`) -->

- [ ] :books: Examples, docs, tutorials or dependencies update;
- [ ] :wrench: Bug fix (non-breaking change which fixes an issue);
- [ ] :clinking_glasses: Improvement (non-breaking change which improves an existing feature);
- [ ] :rocket: New feature (non-breaking change which adds functionality);
- [ ] :boom: Breaking change (fix or feature that would cause existing functionality to change);
- [ ] :closed_lock_with_key: Security fix.

## Checklist

<!-- Mark with an `x` all the checkboxes that apply (like `[x]`) -->

- [ ] I've read the [`CONTRIBUTING.md`][2] guide;
- [ ] I've updated the code style using `make codestyle`;
- [ ] I've written tests for all new methods and classes that I created;
- [ ] I've written the docstring in `Google` format for all the methods and classes that I used.

[1]: https://github.com/rbavery/stac-model/blob/master/CODE_OF_CONDUCT.md
[2]: https://github.com/rbavery/stac-model/blob/master/CONTRIBUTING.md
35 changes: 35 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Configuration: https://dependabot.com/docs/config-file/
# Docs: https://docs.github.com/en/github/administering-a-repository/keeping-your-dependencies-updated-automatically

version: 2

updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "monthly"
allow:
- dependency-type: "all"
commit-message:
prefix: ":arrow_up:"
open-pull-requests-limit: 5

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
allow:
- dependency-type: "all"
commit-message:
prefix: ":arrow_up:"
open-pull-requests-limit: 5

- package-ecosystem: "docker"
directory: "/docker"
schedule:
interval: "monthly"
allow:
- dependency-type: "all"
commit-message:
prefix: ":arrow_up:"
open-pull-requests-limit: 5
28 changes: 28 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Release drafter configuration https://github.com/release-drafter/release-drafter#configuration
# Emojis were chosen to match the https://gitmoji.dev/

name-template: "v$NEXT_PATCH_VERSION"
tag-template: "v$NEXT_PATCH_VERSION"

categories:
- title: ":rocket: Features"
labels: [enhancement, feature]
- title: ":wrench: Fixes & Refactoring"
labels: [bug, refactoring, bugfix, fix]
- title: ":package: Build System & CI/CD"
labels: [build, ci, testing]
- title: ":boom: Breaking Changes"
labels: [breaking]
- title: ":memo: Documentation"
labels: [documentation]
- title: ":arrow_up: Dependencies updates"
labels: [dependencies]

template: |
## What's Changed
$CHANGES
## :busts_in_silhouette: List of contributors
$CONTRIBUTORS
9 changes: 6 additions & 3 deletions .github/remark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ plugins:
# Apply some recommended defaults for consistency
- remark-preset-lint-consistent
- remark-preset-lint-recommended
- lint-no-html
- - lint-no-html
- false
# General formatting
- - remark-lint-emphasis-marker
- '*'
- remark-lint-hard-break-spaces
- remark-lint-blockquote-indentation
- remark-lint-no-consecutive-blank-lines
- - remark-lint-maximum-line-length
- 150
- 120
# GFM - autolink literals, footnotes, strikethrough, tables, tasklist
- remark-gfm
# Code
- remark-lint-fenced-code-flag
- remark-lint-fenced-code-marker
Expand All @@ -37,7 +40,7 @@ plugins:
- - remark-lint-unordered-list-marker-style
- '-'
- - remark-lint-list-item-indent
- space
- space
# Tables
- remark-lint-table-pipes
- remark-lint-no-literal-urls
16 changes: 16 additions & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Greetings

on: [pull_request, issues]

jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-message: 'Hello @${{ github.actor }}, thank you for submitting a PR!'
issue-message: |
Hello @${{ github.actor }}, thank you for submitting an issue!
If this is a bug report, please provide **minimum viable code to reproduce your issue**.
16 changes: 16 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5.15.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/stac-model.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Check Python Linting and Tests

on: [push, pull_request]

jobs:
stac-model:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]

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

- name: Install poetry
run: make poetry-install

- name: Set up cache
uses: actions/cache@v2.1.6
with:
path: .venv
key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: make install-dev

- name: Run checks
run: |
make lint-all
- name: Run tests
run: |
make test
7 changes: 5 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
node-version: [16]
steps:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
cache: npm
- uses: actions/checkout@v2
- run: |
npm install
npm test
npm test
Loading

0 comments on commit c3a3a67

Please sign in to comment.