Skip to content

Commit

Permalink
Merge branch 'main' into emissionfactors-2024
Browse files Browse the repository at this point in the history
  • Loading branch information
han16nah committed May 5, 2024
2 parents f3ea5b5 + 0a703ad commit b9fb8d4
Show file tree
Hide file tree
Showing 38 changed files with 1,336 additions and 724 deletions.
68 changes: 68 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG-REPORT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: "🐛 Bug Report"
description: Create a new ticket for a bug.
title: "BUG: <title>"
labels: [
"bug"
]
body:
- type: textarea
id: description
attributes:
label: "Description"
description: Please enter an explicit description of your issue
placeholder: Short and explicit description of your incident...
validations:
required: true
- type: textarea
id: reprod
attributes:
label: "Reproduction steps"
description: Please enter an explicit description of your issue
value: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
render: bash
validations:
required: true
- type: textarea
id: logs
attributes:
label: "Logs"
description: Please copy and paste any relevant log output or error messages. This will be automatically formatted into code, so no need for backticks.
render: bash
validations:
required: false
- type: textarea
id: package-version
attributes:
label: "Package Version"
description: What version of the package are you using?
placeholder: 1.0.0
validations:
required: false
- type: dropdown
id: python-version
attributes:
label: "Python Version"
description: Which python version are you using?
multiple: true
options:
- 3.10
- 3.11
- 3.12
validations:
required: false
- type: dropdown
id: os
attributes:
label: "OS"
description: What is the impacted environment ?
multiple: true
options:
- Windows
- Linux
- Mac
validations:
required: false
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "Feature Request"
description: Create a new ticket for a new feature request
title: "REQUEST: - <title>"
labels: [
"enhancement"
]
body:
- type: textarea
id: summary
attributes:
label: "Summary"
description: Provide a brief explanation of the feature
placeholder: Describe in a few lines your feature request
validations:
required: true
- type: textarea
id: basic_example
attributes:
label: "Basic Example"
description: Indicate here some basic examples of your feature.
placeholder: A few specific words about your feature request.
validations:
required: true
- type: textarea
id: reference_issues
attributes:
label: "Reference Issues"
description: Common issues
placeholder: "#Issues IDs"
validations:
required: false
- type: textarea
id: unresolved_question
attributes:
label: "Unresolved questions"
description: What questions still remain unresolved ?
placeholder: Identify any unresolved issues.
validations:
required: false
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: true
6 changes: 5 additions & 1 deletion .github/workflows/ci-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,9 @@ jobs:
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: poetry install --no-root
- name: Install coverage-badge
run: pip install coverage-badge
- name: Pytest
run: poetry run pytest -x
run: poetry run coverage run -m pytest -x
- name: coverage badge
run: coverage-badge -o coverage.svg
60 changes: 60 additions & 0 deletions .github/workflows/ci-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Continuous Integration

on:
push:
branches:
- main
release:
types:
- created

jobs:
test:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up testing python ${{ matrix.config.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v2.3.0
- name: Setup a local virtual environment for caching
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- name: Define a cache for the virtual environment based on the dependencies lock file to speed up later runs
uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: poetry install --no-root
- name: Pytest
run: poetry run pytest -x

build-and-publish:
name: Build and publish Python distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-22.04
needs:
- test
steps:
- uses: actions/checkout@v4
- name: Set up base Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Python Poetry Action
uses: abatilo/actions-poetry@v2.3.0
- name: Publish distribution 📦 with test.pypi.org
if: startsWith(github.ref, 'refs/tags')
run: |
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry config pypi-token.testpypi ${{ secrets.PYPI_TEST_TOKEN }}
poetry build
poetry publish -r testpypi
19 changes: 15 additions & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,23 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install sphinx
run: |
pip install sphinx sphinx_rtd_theme
- name: Install poetry
uses: abatilo/actions-poetry@v2.3.0
- name: Install dependencies
run: poetry install --no-root
- name: Setup a local virtual environment for caching
run: |
pip install -r requirements.txt
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- name: Define a cache for the virtual environment based on the dependencies lock file to speed up later runs
uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install sphinx
run: pip install sphinx sphinx_rtd_theme
- name: Install myst-parser
run: pip install myst-parser
- name: Sphinx build
run: |
sphinx-build docs _build
Expand Down
Loading

0 comments on commit b9fb8d4

Please sign in to comment.