Skip to content

Commit 268eac4

Browse files
committed
fix actions
1 parent 05953bb commit 268eac4

File tree

11 files changed

+272
-121
lines changed

11 files changed

+272
-121
lines changed

.github/CONTRIBUTING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## Contributing to Mystbin.py
2+
3+
First off, thanks for taking the time to contribute. It makes the library substantially better. :+1:
4+
5+
The following is a set of guidelines for contributing to the repository. These are guidelines, not hard rules.
6+
7+
## Good Bug Reports
8+
9+
Please be aware of the following things when filing bug reports.
10+
11+
1. Don't open duplicate issues. Please search your issue to see if it has been asked already. Duplicate issues will be closed.
12+
2. When filing a bug about exceptions or tracebacks, please include the *complete* traceback. Without the complete traceback the issue might be **unsolvable** and you will be asked to provide more information.
13+
3. Make sure to provide enough information to make the issue workable. The issue template will generally walk you through the process, but they are enumerated here as well:
14+
- A **summary** of your bug report. This is generally a quick sentence or two to describe the issue in human terms.
15+
- Guidance on **how to reproduce the issue**. Ideally, this should have a small code sample that allows us to run and see the issue for ourselves to debug. **Please make sure that the token is not displayed**. If you cannot provide a code snippet, then let us know what the steps were, how often it happens, etc.
16+
- Tell us **what you expected to happen**. That way we can meet that expectation.
17+
- Tell us **what actually happens**. What ends up happening in reality? It's not helpful to say "it fails" or "it doesn't work". Say *how* it failed, do you get an exception? Does it hang? How are the expectations different from reality?
18+
- Tell us **information about your environment**. What version of `mystbin.py` are you using? How was it installed? What operating system are you running on? These are valuable questions and information that we use.
19+
20+
If the bug report is missing this information then it'll take us longer to fix the issue. We will probably ask for clarification, and barring that if no response was given then the issue will be closed.
21+
22+
## Submitting a Pull Request
23+
24+
Submitting a pull request is fairly simple, just make sure it focuses on a single aspect and doesn't manage to have scope creep, and it's probably good to go. It would be incredibly lovely if the style is consistent to that found in the project. This project follows PEP-8 guidelines (mostly) with a column limit of 125.
25+
There are provided tool rules in `pyproject.toml` for `isort` and `black` when committing here.
26+
Please also check type completeness with `pyright`. (This is not mandatory but could lead to a PR review asking for it).
27+
28+
### Git Commit Guidelines
29+
30+
- Use present tense (e.g. "Add feature" not "Added feature")
31+
- Limit all lines to 72 characters or fewer.
32+
- Reference issues or pull requests outside the first line.
33+
- Please use the shorthand `#123` and not the full URL.
34+
35+
If you do not meet any of these guidelines, don't fret. Chances are they will be fixed upon rebasing but please do try to meet them to remove some workload.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Bug Report
2+
description: Report broken or incorrect behaviour
3+
labels: unconfirmed bug
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: >
8+
Thanks for taking the time to fill out a bug.
9+
10+
Please note that this form is for bugs only!
11+
- type: input
12+
attributes:
13+
label: Summary
14+
description: A simple summary of your bug report
15+
validations:
16+
required: true
17+
- type: textarea
18+
attributes:
19+
label: Reproduction Steps
20+
description: >
21+
What you did to make it happen.
22+
validations:
23+
required: true
24+
- type: textarea
25+
attributes:
26+
label: Minimal Reproducible Code
27+
description: >
28+
A short snippet of code that showcases the bug.
29+
render: python
30+
- type: textarea
31+
attributes:
32+
label: Expected Results
33+
description: >
34+
What did you expect to happen?
35+
validations:
36+
required: true
37+
- type: textarea
38+
attributes:
39+
label: Actual Results
40+
description: >
41+
What actually happened?
42+
validations:
43+
required: true
44+
- type: input
45+
attributes:
46+
label: Related item UUIDs
47+
description: >
48+
What type of item were you interacting with?
49+
If applicable, also include it's UUID for testing purposes.
50+
validations:
51+
required: false
52+
- type: checkboxes
53+
attributes:
54+
label: Checklist
55+
description: >
56+
Let's make sure you've properly done due diligence when reporting this issue!
57+
options:
58+
- label: I have searched the open issues for duplicates.
59+
required: true
60+
- label: I have shown the entire traceback, if possible.
61+
required: true
62+
- label: I have included debug logging (with my latest token remove), if applicable.
63+
required: false
64+
- type: textarea
65+
attributes:
66+
label: Additional Context
67+
description: If there is anything else to say, please do so here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Summary
2+
3+
<!-- What is this pull request for? Does it fix any issues? -->
4+
5+
## Checklist
6+
7+
<!-- Put an x inside [ ] to check it, like so: [x] -->
8+
9+
- [ ] If code changes were made then they have been tested.
10+
- [ ] This PR fixes an issue.
11+
- [ ] This PR adds something new (e.g. new method or parameters).
12+
- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)

.github/linters/.isort.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[settings]
22
profile = black
3-
src_paths = hondana
4-
known_first_party = hondana
3+
src_paths = mystbin
4+
known_first_party = mystbin
55
lines_after_imports = 2

.github/workflows/analysis.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: "Code Analysis"
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [ main ]
9+
schedule:
10+
- cron: '35 8 * * 3'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'python' ]
25+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
26+
# Learn more:
27+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v2
32+
33+
# Initializes the CodeQL tools for scanning.
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@v1
36+
with:
37+
languages: ${{ matrix.language }}
38+
# If you wish to specify custom queries, you can do so here or in a config file.
39+
# By default, queries listed here will override any specified in a config file.
40+
# Prefix the list here with "+" to use these queries and those in the config file.
41+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
42+
43+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
44+
# If this step fails, then you should remove it and run the build manually (see below)
45+
- name: Autobuild
46+
uses: github/codeql-action/autobuild@v1
47+
48+
# ℹ️ Command-line programs to run using the OS shell.
49+
# 📚 https://git.io/JvXDl
50+
51+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
52+
# and modify them (or add more) to build your code if your project
53+
# uses a compiled language
54+
55+
#- run: |
56+
# make bootstrap
57+
# make release
58+
59+
- name: Set up Python
60+
uses: actions/setup-python@v1
61+
with:
62+
python-version: 3.9
63+
64+
- name: Set up Poetry
65+
uses: Gr1N/setup-poetry@v4
66+
67+
- name: Install Python deps
68+
run: |
69+
poetry install --no-dev
70+
71+
- name: Perform CodeQL Analysis
72+
uses: github/codeql-action/analyze@v1

.github/workflows/analyze.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/build.yaml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Runs a build test on commit to ensure functionality.
2+
3+
name: Build
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
tags:
10+
- '*.*.*'
11+
pull_request:
12+
branches:
13+
- main
14+
15+
jobs:
16+
build:
17+
name: Build
18+
runs-on: ubuntu-latest
19+
20+
strategy:
21+
matrix:
22+
python-version: [ 3.9 ]
23+
24+
steps:
25+
- name: Checkout source
26+
uses: actions/checkout@v2
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v1
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Set up Poetry
34+
uses: Gr1N/setup-poetry@v4
35+
36+
- name: Install Python deps
37+
run: |
38+
poetry install --no-dev
39+
40+
- name: Check it imports
41+
run: |
42+
poetry run python -c 'import mystbin'
43+
44+
- name: Build wheels
45+
run: |
46+
poetry build
47+
48+
- name: Upload artifacts
49+
uses: actions/upload-artifact@v2
50+
with:
51+
name: distributions
52+
path: dist/*
53+
54+
# Credits to most of this step go to Gorialis (Devon R [https://github.com/Gorialis])
55+
# as I found them in their Jishaku builds (https://github.com/Gorialis/jishaku/blob/d3f50749b5a977b544e5fd14894585f656247486/.github/workflows/deploy.yml#L82-L119)
56+
create_release:
57+
needs: [ build ]
58+
runs-on: ubuntu-latest
59+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
60+
61+
steps:
62+
- name: Checkout Repository
63+
uses: actions/checkout@v2
64+
with:
65+
fetch-depth: 0
66+
submodules: true
67+
68+
- name: Download Artifacts
69+
uses: actions/download-artifact@v2
70+
with:
71+
name: distributions
72+
path: dist
73+
74+
- name: Set up Poetry
75+
uses: Gr1N/setup-poetry@v4
76+
77+
- name: Publish to PyPI
78+
env:
79+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
80+
run: |
81+
poetry config pypi-token.pypi $PYPI_TOKEN
82+
poetry publish

.github/workflows/build.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/coverage_and_lint.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ jobs:
2828
- name: Install Python deps
2929
run: |
3030
poetry install --no-dev
31+
poetry run pip install .
3132
3233
- name: Type Coverage
3334
run: |
3435
npm install -g pyright
35-
pyright --lib --ignoreexternal --verifytypes mystbin
36+
poetry run pyright --lib --ignoreexternal --verifytypes mystbin
3637
3738
- name: Lint
3839
uses: github/super-linter@v4

0 commit comments

Comments
 (0)