Skip to content

Commit 3a452bc

Browse files
committed
initial
0 parents  commit 3a452bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+4586
-0
lines changed

.github/CONTRIBUTING.md

Whitespace-only changes.

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: openaq

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: OpenAQ python bug
2+
description: Report a bug or unexpected behavior in OpenAQ python wrapper
3+
labels: [bug, pending]
4+
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: Thank you for contributing to OpenAQ Python
9+
10+
- type: textarea
11+
id: description
12+
attributes:
13+
label: Description
14+
description: |
15+
Please explain what you're seeing and what you would expect to see.
16+
17+
Please provide as much detail as possible to make understanding and solving your problem as quick as possible.
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: example
23+
attributes:
24+
label: Example Code
25+
description: >
26+
If applicable, please add a self-contained,
27+
[minimal, reproducible, example](https://stackoverflow.com/help/minimal-reproducible-example)
28+
demonstrating the bug.
29+
render: Python
30+
31+
- type: textarea
32+
id: version
33+
attributes:
34+
label: Python, openaq & OS Version
35+
description: |
36+
Which version of Python & OpenAQ python are you using, and which Operating System?
37+
38+
Please run the following command and copy the output below:
39+
40+
```bash
41+
python -c "import openaq.version; print(openaq.version.version_info())"
42+
```
43+
44+
render: Text
45+
validations:
46+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
blank_issues_enabled: false
2+
3+
contact_links:
4+
- name: Ask a question / advice on using OpenAQ
5+
url: https://join.slack.com/t/openaq/shared_invite/zt-yzqlgsva-v6McumTjy2BZnegIK9XCVw
6+
about: Connect with OpenAQ community
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: OpenAQ Python Feature request
2+
description: Suggest a new feature for OpenAQ python
3+
labels: [feature request]
4+
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: Thank you for contributing to OpenAQ python
9+
10+
- type: textarea
11+
id: description
12+
attributes:
13+
label: Description
14+
description: |
15+
Please give as much detail as possible about the feature you would like to suggest.
16+
17+
You might like to add:
18+
* A demonstration of how code might look when using the feature
19+
* Your use case(s) for the feature
20+
* Why the feature should be added to OpenAQ python.
21+
validations:
22+
required: true

.github/workflows/docs.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: generate and publish docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Configure AWS credentials
17+
uses: aws-actions/configure-aws-credentials@v4
18+
with:
19+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
20+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
21+
aws-region: ${{ secrets.AWS_REGION }}
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.11'
27+
cache: 'pip'
28+
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install hatch
33+
34+
- name: Build docs
35+
run: hatch run docs:build
36+
37+
- name: s3 sync
38+
uses: jakejarvis/s3-sync-action@master
39+
with:
40+
args: --follow-symlinks --delete
41+
env:
42+
SOURCE_DIR: 'site'
43+
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
44+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
45+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
46+
AWS_REGION: ${{ secrets.AWS_REGION }}
47+
48+
- name: invalidate
49+
uses: chetan/invalidate-cloudfront-action@master
50+
env:
51+
DISTRIBUTION: ${{ secrets.AWS_CF_DISTRIBUTION_ID }}
52+
PATHS: '/*'
53+
AWS_REGION: ${{ secrets.AWS_REGION }}
54+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
55+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
14+
environment:
15+
name: release
16+
17+
permissions:
18+
contents: read
19+
id-token: write
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up Python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.11'
27+
cache: 'pip'
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install hatch
32+
- name: Build package
33+
run: hatch build
34+
- name: Publish package distributions to PyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types:
9+
- opened
10+
- synchronize
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.11'
22+
cache: 'pip'
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install hatch
27+
- name: Run tests
28+
run: hatch run test:test

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
__pycache__
2+
.pytest_cache
3+
.DS_Store
4+
.coverage
5+
.ruff_cache
6+
site

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

0 commit comments

Comments
 (0)