Skip to content

Commit f7ee4a1

Browse files
Merge pull request #20 from UBC-MDS/develop
Completion of Milestone 1 into main
2 parents 0bd077f + b906cbe commit f7ee4a1

25 files changed

+1739
-1
lines changed

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Editor Configuration (http://editorconfig.org)
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 4
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
max_line_length = 88
12+
13+
[*.{json,yml,yaml}]
14+
indent_size = 2
15+
16+
[*.{md,rst}]
17+
trim_trailing_whitespace = false
18+
19+
[Makefile]
20+
indent_style = tab
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: 🐞 Bug report
2+
description: Report a problem to help improve this project
3+
title: "[BUG] "
4+
labels: [bug, triage]
5+
body:
6+
- type: checkboxes
7+
attributes:
8+
label: Is there an existing issue for this?
9+
description: Please search to see if an issue already exists for the bug you encountered.
10+
options:
11+
- label: I have searched the existing issues
12+
required: true
13+
14+
- type: textarea
15+
attributes:
16+
label: Problem description
17+
description: |
18+
A concise description of what you're experiencing.
19+
20+
Please explain:
21+
22+
* **what** you tried to achieve,
23+
* **how** you went about it (referring to the code sample), and
24+
* **why** the current behaviour is a problem and what output you expected instead.
25+
validations:
26+
required: false
27+
28+
- type: textarea
29+
attributes:
30+
label: Code sample
31+
description: >
32+
Create a [minimal, complete, verifiable example](https://stackoverflow.com/help/mcve).
33+
Please, paste your code between the ``` tickmarks below or link to a [gist](https://gist.github.com/).
34+
value: |
35+
Code run:
36+
37+
```python
38+
```
39+
40+
Traceback:
41+
42+
```text
43+
```
44+
validations:
45+
required: false
46+
47+
- type: textarea
48+
attributes:
49+
label: Environment
50+
description: >
51+
Please paste the output of running `depinfo --markdown deepwork`
52+
in your environment between the `details` tags below.
53+
value: |
54+
<details>
55+
56+
</details>
57+
validations:
58+
required: true
59+
60+
- type: textarea
61+
attributes:
62+
label: Anything else?
63+
description: |
64+
Links? References? Anything that will give us more context about the issue you are encountering!
65+
66+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
67+
validations:
68+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Community Support
4+
url: https://github.com/UBC-MDS/deepwork/discussions
5+
about: Please ask and answer questions here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- [ ] fix #(issue number)
2+
- [ ] description of feature/fix
3+
- [ ] tests added/passed
4+
- [ ] add an entry to the [changelog](../CHANGELOG.md)

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directories:
6+
- "/"
7+
schedule:
8+
interval: "monthly"
9+
commit-message:
10+
prefix: "dependencies: "
11+
include: scope
12+
groups:
13+
actions:
14+
patterns:
15+
- "*"

.github/workflows/docs.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build Docs
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build-docs:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.5.2
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5.1.0
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
20+
- name: Install hatch
21+
run: |
22+
python -m pip install --upgrade pip
23+
python -m pip install hatch
24+
25+
- name: Build documentation using Hatch
26+
run: |
27+
hatch run docs:build

.github/workflows/release.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
# Setup build separate from publish for added security
13+
# See https://github.com/pypa/gh-action-pypi-publish/issues/217#issuecomment-1965727093
14+
build:
15+
runs-on: ubuntu-latest
16+
# Environment is encouraged for increased security
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
20+
with:
21+
# This fetch element is only important if you are use SCM based
22+
# versioning (that looks at git tags to gather the version).
23+
# setuptools-scm needs tags to form a valid version number
24+
fetch-tags: true
25+
26+
- name: Setup Python
27+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
28+
with:
29+
# You can modify what version of Python you want to use for your release
30+
python-version: "3.11"
31+
32+
- name: Install hatch
33+
run: |
34+
python -m pip install --upgrade pip
35+
python -m pip install hatch
36+
37+
- name: Build package using Hatch
38+
run: |
39+
hatch run build:check
40+
41+
echo ""
42+
echo "Generated files:"
43+
ls -lh dist/
44+
# Store an artifact of the build to use in the publish step below
45+
- name: Store the distribution packages
46+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4
47+
with:
48+
name: python-package-distributions
49+
path: dist/
50+
if-no-files-found: error
51+
publish:
52+
name: >-
53+
Publish Python 🐍 distribution 📦 to PyPI
54+
# Only publish to PyPI with a release trigger in your repository.
55+
if: github.repository_owner == 'UBC-MDS' && github.event_name == 'release'
56+
needs:
57+
- build
58+
runs-on: ubuntu-latest
59+
# Environment required here for trusted publisher
60+
environment:
61+
name: pypi
62+
# Modify the url to be the name of your package
63+
url: https://pypi.org/p/deepwork
64+
permissions:
65+
id-token: write # this permission is mandatory for PyPI publishing
66+
steps:
67+
- name: Download dists
68+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v4
69+
with:
70+
name: python-package-distributions
71+
path: dist/
72+
merge-multiple: true
73+
- name: Publish package to PyPI
74+
# Only publish to real PyPI on release. This action uses sigstore for additional security.
75+
if: github.event_name == 'release' && github.event.action == 'published'
76+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e #v1.13.0

.github/workflows/test.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Run Tests
2+
# Run the test suite on pull requests and pushes to main branch
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
schedule:
9+
- cron: '0 23 * * Sun'
10+
11+
jobs:
12+
test:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ubuntu-latest, macos-latest, windows-latest]
18+
python-version: ["3.10", "3.13"]
19+
20+
steps:
21+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.5.2
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5.1.0
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install hatch
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install hatch
31+
- name: Run test suite
32+
run: hatch run +py=${{ matrix.python-version }} test:run
33+
# If you use this step and have a private repo- then you will need to get a
34+
# token from codecov and
35+
# save it as a github secret called CODECOV_TOKEN
36+
- name: Upload to codecov
37+
if: runner.os == 'macOS' && matrix.python-version == '3.13'
38+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
39+
with:
40+
#token: ${{ secrets.CODECOV_TOKEN }}
41+
verbose: true
42+
files: ./coverage.xml
43+

0 commit comments

Comments
 (0)