Skip to content

Commit e2b78b8

Browse files
authored
Merge pull request #90 from UBC-MDS/dev
Dev
2 parents 3582c81 + 12f9915 commit e2b78b8

23 files changed

+773
-145
lines changed

.github/workflows/preview-docs.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Netlify Preview Deployment Workflow
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
6+
name: Preview Documentation
7+
8+
jobs:
9+
render-docs-preview-deploy:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
deployments: write
14+
pull-requests: write
15+
steps:
16+
- name: Check out repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Quarto
20+
uses: quarto-dev/quarto-actions/setup@v2
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: '3.13'
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -e .[docs]
31+
32+
# register the Python kernel for Quarto/Jupyter
33+
- name: Register Jupyter kernel
34+
run: |
35+
python -m ipykernel install --user --name python3
36+
37+
- name: quartodoc build
38+
run: |
39+
quartodoc build
40+
41+
- name: Render Quarto Project
42+
uses: quarto-dev/quarto-actions/render@v2
43+
44+
# =====================================================
45+
# Deploy to Netlify
46+
# =====================================================
47+
48+
# Create a unique name for this deployment using the PR number
49+
# This helps track which PR preview is which
50+
- name: Configure release name
51+
run: echo "RELEASE_NAME=pr-${{ github.event.number }}" >> $GITHUB_ENV
52+
53+
# Create a deployment status on GitHub to track the deployment progress
54+
# This shows up in the PR's "Deployments" section
55+
- name: Create deployment status
56+
uses: bobheadxi/deployments@v1
57+
id: deployment
58+
with:
59+
step: start
60+
token: ${{ secrets.GITHUB_TOKEN }}
61+
env: ${{ env.RELEASE_NAME }}
62+
ref: ${{ github.head_ref }}
63+
logs: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
64+
65+
# Deploy the rendered site to Netlify with a PR-specific preview URL
66+
# The alias ensures each PR gets its own stable URL during review
67+
- name: Deploy to Netlify
68+
id: netlify
69+
env:
70+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
71+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
72+
run: |
73+
npm install -g netlify-cli
74+
netlify deploy --dir=_site/ --alias="pr-${{ github.event.number }}" 2>&1 | tee deploy.log
75+
DEPLOY_URL=$(grep -oP 'https://[^\s]+' deploy.log | grep -E '(netlify\.app|--.*\.netlify\.app)' | head -n 1)
76+
echo "url=${DEPLOY_URL}" >> $GITHUB_OUTPUT
77+
78+
# Update the GitHub deployment status with success/failure and the preview URL
79+
# This creates a clickable link in the PR to view the deployed preview
80+
- name: Update deployment status
81+
uses: bobheadxi/deployments@v1
82+
if: always()
83+
with:
84+
step: finish
85+
token: ${{ secrets.GITHUB_TOKEN }}
86+
status: ${{ job.status }}
87+
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
88+
env: ${{ steps.deployment.outputs.env }}
89+
env_url: ${{ steps.netlify.outputs.url }}
90+
logs: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Publish to Test PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- 'v*.*.*'
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
id-token: write
14+
contents: read
15+
16+
steps:
17+
- name: Check-out repository
18+
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.ref }} # Add this line - checks out the exact tag
21+
fetch-depth: 0 # Important: need full history for version detection
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.13'
27+
28+
- name: Install build dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install .[dev]
32+
33+
- name: Build package
34+
run: hatch build
35+
36+
- name: Publish to TestPyPI
37+
uses: pypa/gh-action-pypi-publish@release/v1
38+
with:
39+
verbose: true
40+
repository-url: https://test.pypi.org/legacy/
41+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,4 +249,5 @@ _version.py
249249

250250
# Quarto build output
251251
_build/
252-
*_files/
252+
*_files/
253+
_freeze/

CHANGELOG.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,29 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
98

10-
- Upcoming features and fixes
9+
### Added
10+
11+
- Added clearer, runnable example usage demonstrating all package functions and included a standalone `examples/usage.py` script and `tutorials/usage.qmd` vignette to the docs #64.
12+
- Annotated static test fixtures and mutation tests to make test cases reproducible and easier to review #58.
13+
14+
### Changed
15+
16+
- Fixed incorrect README instruction (`cd sudoku_validation`) and updated README #72.
17+
- Updated documentation to include the API reference pages and linked them from the site landing #64.
18+
- Replaced placeholder contact method with actual contact information #70.
19+
- Fixed Contributing section GitHub usernames #73.
20+
21+
### Fixed
22+
23+
- Adjusted Quarto configuration and documentation pages so the landing page and tutorial render correctly; enabled page TOC and sidebar linking to README sections #64.
24+
25+
26+
### Maintenance
27+
28+
- Closed completed review issues and cleaned up untracked or unnecessary files and ignored temporary files.
29+
30+
### Governance
31+
- Added discussion and reasoning for the license choice #61
1132

12-
## [0.1.0] - (1979-01-01)
1333

14-
- First release

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ representative at an online or offline event.
6262

6363
Instances of abusive, harassing, or otherwise unacceptable behavior may be
6464
reported to the community leaders responsible for enforcement at
65-
\[INSERT CONTACT METHOD\].
65+
https://github.com/UBC-MDS/Sudoku_Validation/issues.
6666
All complaints will be reviewed and investigated promptly and fairly.
6767

6868
All community leaders are obligated to respect the privacy and security of the

CONTRIBUTING.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,19 @@ Every little bit helps, and credit will always be given.
77

88
You can contribute in many ways, for example:
99

10-
* [Report bugs](#report-bugs)
11-
* [Fix Bugs](#fix-bugs)
12-
* [Implement Features](#implement-features)
13-
* [Write Documentation](#write-documentation)
14-
* [Submit Feedback](#submit-feedback)
10+
- [Contributing](#contributing)
11+
- [Example Contributions](#example-contributions)
12+
- [Report Bugs](#report-bugs)
13+
- [Fix Bugs](#fix-bugs)
14+
- [Implement Features](#implement-features)
15+
- [Write Documentation](#write-documentation)
16+
- [Submit Feedback](#submit-feedback)
17+
- [Get Started!](#get-started)
18+
- [Pull Request Guidelines](#pull-request-guidelines)
1519

1620
### Report Bugs
1721

18-
Report bugs at https://github.com/justinmak08, EricYangg, Maple018, Olytics/sudoku_validation/issues.
22+
Report bugs at <https://github.com/UBC-MDS/Sudoku_Validation/issues>.
1923

2024
**If you are reporting a bug, please follow the template guidelines. The more
2125
detailed your report, the easier and thus faster we can help you.**
@@ -42,13 +46,13 @@ happy for any support that they can get.
4246
Sudoku_Validation could always use more documentation, whether as
4347
part of the official documentation, in docstrings, or even on the web in blog
4448
posts, articles, and such. Just
45-
[open an issue](https://github.com/justinmak08, EricYangg, Maple018, Olytics/sudoku_validation/issues)
49+
[open an issue](https://github.com/UBC-MDS/Sudoku_Validation/issues)
4650
to let us know what you will be working on so that we can provide you with guidance.
4751

4852
### Submit Feedback
4953

5054
The best way to send feedback is to file an issue at
51-
https://github.com/justinmak08, EricYangg, Maple018, Olytics/sudoku_validation/issues. If your feedback fits the format of one of
55+
<https://github.com/UBC-MDS/Sudoku_Validation/issues>. If your feedback fits the format of one of
5256
the issue templates, please use that. Remember that this is a volunteer-driven
5357
project and everybody has limited time.
5458

@@ -57,12 +61,12 @@ project and everybody has limited time.
5761
Ready to contribute? Here's how to set up Sudoku_Validation for
5862
local development.
5963

60-
1. Fork the https://github.com/justinmak08, EricYangg, Maple018, Olytics/sudoku_validation
64+
1. Fork the <https://github.com/UBC-MDS/Sudoku_Validation>
6165
repository on GitHub.
6266
2. Clone your fork locally (*if you want to work locally*)
6367

6468
```shell
65-
git clone git@github.com:your_name_here/sudoku_validation.git
69+
git clone https://github.com/UBC-MDS/Sudoku_Validation.git
6670
```
6771

6872
3. [Install hatch](https://hatch.pypa.io/latest/install/).
@@ -104,3 +108,5 @@ Before you submit a pull request, check that it meets these guidelines:
104108
new functionality into a function with a docstring.
105109
3. Your pull request will automatically be checked by the full test suite.
106110
It needs to pass all of them before it can be considered for merging.
111+
### Discuss the use of development tools, GitHub infrastructure, and organizational practices you learned in this course and applied in your project. If you were to scale up your or another project, what tools, infrastructure and practices would you use and why?
112+
We picked up a lot of practical habits in this course, especially around using GitHub to keep our work organized and accountable. Issues and pull requests are our main way of breaking tasks down and making sure we know who is doing what. Automated tests and CI helped us catch mistakes early instead of deadline fighting. If this project grew bigger, I will probably want to improve on better use of github issues for planning so the team could stay coordinated. I will also invest more in documentation and code reviews because they make scaling a lot less chaotic and more developer friendly.

0 commit comments

Comments
 (0)