Skip to content

Commit

Permalink
import biocommons.example
Browse files Browse the repository at this point in the history
  • Loading branch information
reece committed Feb 1, 2024
0 parents commit 7fe1808
Show file tree
Hide file tree
Showing 16 changed files with 590 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/.github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @biocommons/maintainers
24 changes: 24 additions & 0 deletions .github/.github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/.github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
34 changes: 34 additions & 0 deletions .github/.github/ISSUE_TEMPLATE/project-proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Project Proposal
about: Create a proposal for an intern or GSoC project
title: 'Project: ...'
labels: 'project'
assignees: ''

---

### Summary

1-3 sentence summary of project.

See <a href="#background">Background</a>.

## Value

Why is this project meaningful?

## Required and Desired Skills

- Python
- Relational database design, SQL

## Expected Outcomes

- **Headline**. Description...
- **Headline**. Description...

## Potential Mentors

- @reece

## Background
59 changes: 59 additions & 0 deletions .github/.github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
- name: "bug"
color: "d73a4a"
description: "Something isn't working"

- name: "documentation"
color: "0075ca"
description: "Improvements or additions to documentation"

- name: "duplicate"
color: "cfd3d7"
description: "This issue or pull request already exists"

- name: "enhancement"
color: "a2eeef"
description: "New feature or request"

- name: "good first issue"
color: "7057ff"
description: "Good for newcomers"

- name: "help wanted"
color: "008672"
description: "Extra attention is needed"

- name: "invalid"
color: "e4e669"
description: "This doesn't seem right"

- name: "keep alive"
color: "666666"
description: "exempt issue from staleness checks"
from_name: "keep alive"

- name: "project proposal"
color: "d876e3"
description: "project proposal for interns and GSoC students"

- name: "question"
color: "d876e3"
description: "Further information is requested"

- name: "rfc"
color: "d876e3"
description: "Request for comments"

- name: "stale"
color: "777777"
description: "Issue is stale and subject to automatic closing"
from_name: "Stale"

- name: "stale closed"
color: "444444"
description: "Issue was closed automatically due to inactivity"
from_name: "stale-closed"

- name: "won't fix"
color: "ffffff"
description: "This will not be worked on"
from_name: wontfix
23 changes: 23 additions & 0 deletions .github/.github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Synchronize labels

on:
push:
branches:
- 'main'
paths:
- '.github/labels.yml'
- '.github/workflows/labels.yml'

jobs:
labeler:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .github/labels.yml
123 changes: 123 additions & 0 deletions .github/.github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Python package

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:

jobs:
cqa:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: pip
cache-dependency-path: '**/setup.cfg'

- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install --use-deprecated=legacy-resolver -e .[dev]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Format check with isort
run: |
isort --check src
- name: Format check with black
run: |
black --check src
- name: Security check with bandit
run: |
bandit -ll -r src
test:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: '**/setup.cfg'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
make develop
- name: Test with pytest
run: |
make test
- name: Upload coverage data to Codecov
run: |
# Verify integrity of codecov download
curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import
curl -Os https://uploader.codecov.io/latest/linux/codecov
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
shasum -a 256 -c codecov.SHA256SUM
# Upload coverage report
chmod +x codecov
./codecov
deploy:
needs:
- cqa
- test
runs-on: ubuntu-latest

steps:
- name: Environment
run: |
echo "::group::Environment info"
echo github.event_name = ${{ github.event_name }}
echo refs = ${{ github.ref }}
echo tags = ${{ startsWith(github.ref, 'refs/tags') }}
echo "::endgroup::"
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: pip
cache-dependency-path: '**/setup.cfg'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build

- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
11 changes: 11 additions & 0 deletions .github/.github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://github.com/actions/stale

name: 'Close stale issues and PRs'
on:
workflow_dispatch:
schedule:
- cron: '1 1 * * *'

jobs:
stale:
uses: biocommons/actions/.github/workflows/stale.yml@main
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @biocommons/maintainers
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/project-proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Project Proposal
about: Create a proposal for an intern or GSoC project
title: 'Project: ...'
labels: 'project'
assignees: ''

---

### Summary

1-3 sentence summary of project.

See <a href="#background">Background</a>.

## Value

Why is this project meaningful?

## Required and Desired Skills

- Python
- Relational database design, SQL

## Expected Outcomes

- **Headline**. Description...
- **Headline**. Description...

## Potential Mentors

- @reece

## Background
Loading

0 comments on commit 7fe1808

Please sign in to comment.