Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky authored May 15, 2021
2 parents abf1c78 + 1876d4c commit a0167ce
Show file tree
Hide file tree
Showing 30 changed files with 1,130 additions and 287 deletions.
19 changes: 19 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[paths]
source =
src
*/site-packages

[report]
precision = 1
exclude_lines =
pragma: no cover
abc\.abstractmethod
typing\.overload
if typing.TYPE_CHECKING:
^\s*pass\s*$
^\s*...\s*$

[run]
branch = True
source =
plotman
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''

---

<!--
**Should I file this?**
Use this template to report *observed bugs in current Plotman*. Do not use this to request tech support or troubleshooting; we are unable to provide that support here, so please use the user channel(s) on Keybase, or GitHub Discussions instead. Do not use this to report issues with the core Chia plotter. Because the `development` branch often contains new fixes not yet released, you may also want to try installing it to see if it addresses your issue (you can do this by following the install instructions but specifying `@development` instead of `@main`).
-->

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

**To Reproduce**

Steps to reproduce the behavior, e.g.:
1. Set up config with '...'
2. Run other programs '....'
3. Run Plotman with '....'
4. See error

**Expected behavior**
<!-- A clear and concise description of what you expected to happen, even if it seems obvious. -->

**System setup:**
- OS: [e.g. Ubuntu, iOS, ...]
- Method of archiving (e.g., none, rsyncd, rsync, ...)

**Config**
<details> <summary>full configuration</summary>

```yaml
# paste your complete configuration file contents here.
```

</details>

**Additional context & screenshots**
<!-- Add any other context about the problem here, including screenshots. -->
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
contact_links:
- about: Ask a general question or request support in Discussions
name: Ask for Support
url: >-
https://github.com/ericaltendorf/plotman/discussions/new
- about: Get support on the Chia Keybase's dedicated plotman channel.
name: Join the Keybase.io plotman channel
url: 'https://keybase.io/team/chia_network.public'
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Log a request for a new feature or enhancement
title: ''
labels: 'enhancement'
assignees: ''

---

**Describe the request**
<!-- A clear and concise description of your suggested enhancement, as well as some basic rationale to allow us to balance the effort/reward for the work, if possible. -->

**Images**
<!-- If applicable (but not required), add diagrams or wireframes to help explain your request if it is UI/UX related. -->

**Additional comments**
<!-- Add any other comments here. -->
121 changes: 118 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: CI

on:
push:
branches: [ development ]
branches:
- main
- development
tags: [ "**" ]
pull_request:
branches: [ "**" ]
Expand All @@ -13,7 +15,8 @@ defaults:

jobs:
build:
name: ${{ matrix.task.name}} - ${{ matrix.os.name }} ${{ matrix.python.name }}
# Should match JOB_NAME below
name: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }}
runs-on: ${{ matrix.os.runs-on }}
strategy:
fail-fast: false
Expand All @@ -30,6 +33,10 @@ jobs:
- name: Build
tox: build

env:
# Should match name above
JOB_NAME: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }}

steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -71,7 +78,8 @@ jobs:
path: dist/

test:
name: ${{ matrix.task.name}} - ${{ matrix.os.name }} ${{ matrix.python.name }}
# Should match JOB_NAME below
name: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }}
runs-on: ${{ matrix.os.runs-on }}
needs:
- build
Expand All @@ -98,6 +106,7 @@ jobs:
task:
- name: Test
tox: test
coverage: true
include:
- task:
name: Check
Expand All @@ -111,6 +120,8 @@ jobs:


env:
# Should match name above
JOB_NAME: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }}
TOXENV: ${{ matrix.task.tox }}${{ fromJSON('["", "-"]')[matrix.python.tox != null] }}${{ matrix.python.tox }}

steps:
Expand Down Expand Up @@ -157,12 +168,116 @@ jobs:
run: |
tox --skip-pkg-install
- name: Coverage Processing
if: matrix.task.coverage
run: |
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_NAME }}.xml"
- name: Publish Coverage
if: matrix.task.coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*

coverage:
# Should match JOB_NAME below
name: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }}
runs-on: ${{ matrix.os.runs-on }}
needs:
- test
strategy:
fail-fast: false
matrix:
include:
- os:
name: Linux
runs-on: ubuntu-latest
python:
name: CPython 3.8
action: 3.8
task:
name: Coverage
tox: check-coverage
coverage: false
download_coverage: true

env:
# Should match name above
JOB_NAME: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }}
TOXENV: ${{ matrix.task.tox }}${{ fromJSON('["", "-"]')[matrix.task.tox != null && matrix.python.tox != null] }}${{ matrix.python.tox }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Download package files
uses: actions/download-artifact@v2
with:
name: dist
path: dist/

- name: Download Coverage
if: matrix.task.download_coverage
uses: actions/download-artifact@v2
with:
name: coverage
path: coverage_reports

- name: Set up ${{ matrix.python.name }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python.action }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install tox
- name: Prepare tox environment
run: |
tox --notest --installpkg dist/*.whl
- name: Runner info
uses: twisted/python-info-action@v1

- name: Tox info
uses: twisted/python-info-action@v1
with:
python-path: .tox/${{ env.TOXENV }}/*/python

- name: Run tox environment
env:
BASE_REF: ${{ fromJSON(format('[{0}, {1}]', toJSON(github.event.before), toJSON(format('origin/{0}', github.base_ref))))[github.base_ref != ''] }}
run: |
tox --skip-pkg-install -- --compare-branch="${BASE_REF}"
- name: Coverage Processing
if: always()
run: |
mkdir all_coverage_report
cp .coverage "all_coverage_report/.coverage.all"
cp coverage.xml "all_coverage_report/coverage.all.xml"
- name: Upload Coverage
if: always()
uses: actions/upload-artifact@v2
with:
name: coverage
path: all_coverage_report/*

all:
name: All
runs-on: ubuntu-latest
needs:
- build
- test
# TODO: make this required when we have a better testing situation
# - coverage
steps:
- name: This
shell: python
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
__pycache__
venv
.DS_Store
.vscode
Loading

0 comments on commit a0167ce

Please sign in to comment.