Skip to content

Commit 413ca96

Browse files
github-actions[bot]eparirishitadamzevnlebovitsdependabot[bot]
authored
Weekly PR from Staging to Main (CodeForPhilly#1160)
* chore: update modules for semantic release * chore: clean up release workflows * chore: integrate semantic release and publish release notes * ci: add missing conditions and error handling * feat: Adds a decorator to collect metadata from the new ETL pipeline Metadata is collected from docstrings and function runtime. Adds new info to the docstrings of functions in the new ETL pipeline. Adds testing of the new provide_metadata() decorator * chore: store metadata to tmp folder when running main.py * chore: add DAG and DataDict to docs * deps: bump the all-npm group with 32 updates (CodeForPhilly#1124) Removed breaking changes from upgrading Tailwind to v4 and React to v19 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Collum <collum.freedman@gmail.com> * docs: update the doc files for commit message validation * chore(release): 1.0.0 [skip ci] # 1.0.0 (2025-03-25) ### Bug Fixes * **572:** fix webpack warnings + fix linting issues ([CodeForPhilly#574](https://github.com/adamzev/clean-and-green-philly/issues/574)) ([fbfd459](adamzev@fbfd459)) * Add focus styling to header links ([a99065c](adamzev@a99065c)) * Add href to dropdown items to increase link size ([2eb4667](adamzev@2eb4667)) * closing tooltip popup on map closes property details ([432e8c0](adamzev@432e8c0)) * correct the scrolling on the map page ([a850237](adamzev@a850237)) * Remove nested link and button ([d93e8bd](adamzev@d93e8bd)) * Update footer markup structure for accessibility ([d5c2a33](adamzev@d5c2a33)) ### Features * **247:** make the mapbox legend more legible ([bcf6915](adamzev@bcf6915)) * **293:** sort features by priority of high, medium, low ([8cd1058](adamzev@8cd1058)) * **305:** expand the header width of single property table ([b25261e](adamzev@b25261e)) * **395:** add white background to backbutton bar ([a65f052](adamzev@a65f052)) * **395:** make property selection back button sticky ([6601201](adamzev@6601201)) * **457:** add filter count to button ([b35145a](adamzev@b35145a)) * **535:** add close download view button ([CodeForPhilly#579](https://github.com/adamzev/clean-and-green-philly/issues/579)) ([9bd2c53](adamzev@9bd2c53)) * **544:** adjust remove property section ([CodeForPhilly#580](https://github.com/adamzev/clean-and-green-philly/issues/580)) ([900af8e](adamzev@900af8e)) * **568:** restyle the property table ([CodeForPhilly#577](https://github.com/adamzev/clean-and-green-philly/issues/577)) ([2c8cc92](adamzev@2c8cc92)) * Add arrow icon to link ([6bce3fa](adamzev@6bce3fa)) * Add content to sidebar ([23d5c52](adamzev@23d5c52)) * Add council district ([e576218](adamzev@e576218)) * Add extra data to single detail page ([48e34fe](adamzev@48e34fe)) * Add font ([c1a8b93](adamzev@c1a8b93)) * Add font to map ([1491518](adamzev@1491518)) * Add font to search field ([3b08069](adamzev@3b08069)) * Add info cards ([8170944](adamzev@8170944)) * Add missing data and atlas link; style table ([8c260d4](adamzev@8c260d4)) * Add percentage, update column widths ([41caf77](adamzev@41caf77)) * Add priority color square ([ad5a9fa](adamzev@ad5a9fa)) * add redirect from map to find-properties ([439ed6c](adamzev@439ed6c)) * Add row scope ([f945979](adamzev@f945979)) * Add spacing below Back button ([7de48c5](adamzev@7de48c5)) * Address a few more links ([b3b6733](adamzev@b3b6733)) * Adjust table per requirements ([36e6cfa](adamzev@36e6cfa)) * Change Find Properties and Learn More to links ([1de0b47](adamzev@1de0b47)) * Close sidebar if clicking on empty map ([612117d](adamzev@612117d)) * Navigate to map on click; show popups ([183b6a2](adamzev@183b6a2)) * Open sidebar from map ([5474367](adamzev@5474367)) * Pass selected property to map view ([663f142](adamzev@663f142)) * underline links ([5f23d09](adamzev@5f23d09)) * Update aria label and role ([765e5a4](adamzev@765e5a4)) * chore: merge missing imports * chore: update postgis and timescale db versions * chore: remove unused imports and variable * chore: add temporary password to pr_checks_backend.yml * chore: fix dockerfile-pg postgis version to 3.5.2 * chore: delay the initialization of the bucket in FeatureLayer * chore: add missing imports to new ETL pipeline (CodeForPhilly#1140) * New Notebooks. (CodeForPhilly#1137) New notebook detailing some preliminary ML analysis of dataset * Change out docker file for postgis (CodeForPhilly#1158) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Rishit Epari <epari.rishit@gmail.com> Co-authored-by: Adam Levin <zev105@gmail.com> Co-authored-by: Nissim Lebovits <111617674+nlebovits@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Collum <collum.freedman@gmail.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Brad <joohojeong@ucsb.edu> Co-authored-by: Collum Freedman <30787117+cfreedman@users.noreply.github.com>
1 parent 0fb8d85 commit 413ca96

File tree

10 files changed

+380
-161
lines changed

10 files changed

+380
-161
lines changed

.github/hooks/commit-msg

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh
2+
3+
# Read commit message from the commit-msg hook argument ($1)
4+
commit_msg=$(cat "$1")
5+
6+
# Regular expression for Conventional Commits
7+
pattern="^(feat|fix|docs|style|refactor|test|chore|ci|perf|build)(\(.+\))?!?: .+"
8+
9+
10+
if ! echo "$commit_msg" | grep -Eq "$pattern"; then
11+
echo ""
12+
echo "╔══════════════════════════════════════════════════════════════════╗"
13+
echo "║ ❌ ERROR: Your commit message format is invalid! ❌ ║"
14+
echo "╚══════════════════════════════════════════════════════════════════╝"
15+
echo ""
16+
echo "The format should be:"
17+
echo " <type>[optional scope]: <description>"
18+
echo ""
19+
echo "Examples:"
20+
echo " • fix: resolve data fetching issue"
21+
echo " • feat(FilterView): add new method for conditional filtering"
22+
echo " • docs: update the pull request template"
23+
echo ""
24+
echo "✅ Valid types: feat, fix, docs, style, refactor, test, chore, ci, perf, build"
25+
echo ""
26+
exit 1
27+
fi

.github/release-drafter.yml

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

.github/workflows/release-drafter.yml

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

.github/workflows/release.yml

Lines changed: 69 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Publish Release
22

33
on:
44
push:
@@ -9,29 +9,85 @@ on:
99
jobs:
1010
release:
1111
runs-on: ubuntu-latest
12+
1213
steps:
1314
- name: Checkout
1415
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
1518

1619
- name: Set up Node.js
1720
uses: actions/setup-node@v4
1821
with:
1922
node-version: '20.8.1'
2023

21-
- name: List files in the root directory
22-
run: ls -al
23-
24-
- name: Check if package-lock.json exists
25-
run: test -f package-lock.json && echo "package-lock.json exists" || echo "package-lock.json does not exist"
26-
27-
- name: Clear NPM Cache
28-
run: npm cache clean --force
29-
3024
- name: Install dependencies
3125
run: npm ci
3226

33-
- name: Semantic Release
27+
- name: Create Tag
28+
uses: cycjimmy/semantic-release-action@v4.1.1
3429
env:
3530
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
37-
run: npx semantic-release
31+
32+
- name: Read version number
33+
id: get_version
34+
run: |
35+
set -e
36+
echo "---------------------------------------------------------"
37+
if [ -s version.txt ]; then
38+
version=$(cat version.txt)
39+
echo "✅ New version detected: v$version"
40+
echo "---------------------------------------------------------"
41+
echo "version=${version}" >> $GITHUB_OUTPUT
42+
else
43+
echo "🚫 No version update detected. "
44+
echo " This indicates that there is no new release to publish."
45+
echo "---------------------------------------------------------"
46+
echo "version=" >> $GITHUB_OUTPUT
47+
fi
48+
49+
- name: Publish release notes
50+
if: steps.get_version.outputs.version != ''
51+
uses: actions/github-script@v6
52+
env:
53+
NEW_VERSION: ${{ steps.get_version.outputs.version }}
54+
with:
55+
script: |
56+
(async () => {
57+
try {
58+
const newVersion = process.env.NEW_VERSION.trim();
59+
const tagName = `v${newVersion}`;
60+
61+
const response = await github.rest.repos.createRelease({
62+
owner: context.repo.owner,
63+
repo: context.repo.repo,
64+
tag_name: tagName,
65+
name: `Version ${newVersion}`,
66+
generate_release_notes: true,
67+
draft: false,
68+
prerelease: false
69+
});
70+
71+
const date = new Date().toLocaleDateString("en-US", {
72+
timeZone: "America/New_York",
73+
year: "numeric",
74+
month: "long",
75+
day: "numeric"
76+
});
77+
const customHeader = `Release Notes for Version ${newVersion} - ${date}\n\n`;
78+
const updatedBody = customHeader + response.data.body;
79+
80+
await github.rest.repos.updateRelease({
81+
owner: context.repo.owner,
82+
repo: context.repo.repo,
83+
release_id: response.data.id,
84+
body: updatedBody,
85+
name: `Version ${newVersion}`
86+
});
87+
88+
console.log(`✅ Successfully published release notes for version ${newVersion}`);
89+
} catch (error) {
90+
console.error(`🚫 Failed to publish release notes: ${error}`);
91+
process.exit(1);
92+
}
93+
})();

.releaserc

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,10 @@
44
],
55
"plugins": [
66
"@semantic-release/commit-analyzer",
7-
"@semantic-release/release-notes-generator",
8-
"@semantic-release/changelog",
9-
"@semantic-release/npm",
10-
"@semantic-release/github",
117
[
12-
"@semantic-release/git",
8+
"@semantic-release/exec",
139
{
14-
"assets": [
15-
"CHANGELOG.md",
16-
"package.json",
17-
"package-lock.json",
18-
"data/src/Pipfile",
19-
"data/src/Pipfile.lock"
20-
],
21-
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
10+
"prepareCmd": "echo ${nextRelease.version} > version.txt"
2211
}
2312
]
2413
]

docs/CONTRIBUTING.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,24 @@ To ensure smooth contributions to the Clean & Green Philly project, please follo
2727
- Name it `<github-username>/<issue-number>-<kebab-case-description>`
2828
- Example: `vimusds/1069-fix-territory-on-mobile`
2929
- [ ] **Work on the issue**: Make your changes, commit them, and push to your branch
30+
- [ ] **Commit Message Format**: Follow the Conventional Commits format to maintain a clean and meaningful git history.
31+
32+
```
33+
<type>[optional scope]: <description>
34+
```
35+
36+
Where:
37+
38+
- `<type>` is one of: feat, fix, docs, style, refactor, test, chore, ci, perf, build
39+
- `[optional scope]` is the area of the codebase affected (e.g., component name)
40+
- `<description>` is a concise description of the change
41+
42+
**Examples:**
43+
44+
- `fix: resolve data fetching issue`
45+
- `feat(FilterView): add new method for conditional filtering`
46+
- `docs: update the pull request template`
47+
3048
- [ ] **Open a Pull Request (PR)**: Use the provided template, tag relevant issues, and provide testing instructions. Make sure the base branch of the PR is set to `base: staging`.
3149
- [ ] **Ensure all checks pass**: Fix any errors and re-check
3250
- [ ] **Tag reviewers**: Find appropriate reviewers from the [CODEOWNERS](https://github.com/CodeForPhilly/vacant-lots-proj/blob/main/.github/CODEOWNERS) file

docs/SETUP/BACK_END.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,33 @@ If you plan to contribute to the data wrangling and database management on this
1818

1919
We use a precommit hook to help with formatting and linting in our CI/CD pipeline. When setting up the repo, please first [make sure you have `pre-commit` installed](https://pre-commit.com/) using `pip` or another package manager. Once that's done, run `pre-commit install` in the root directory to set up the precommit hooks (configured in `.pre-commit-config.yaml`).
2020

21+
**Important:** After the above step manually copy the commit message hook file to ensure conventional commit format validation:
22+
23+
**Windows Command Prompt:**
24+
25+
```cmd
26+
copy .github\hooks\commit-msg .git\hooks\
27+
```
28+
29+
**Mac/Linux/Git Bash:**
30+
31+
```bash
32+
cp .github/hooks/commit-msg .git/hooks/
33+
chmod +x .git/hooks/commit-msg
34+
```
35+
36+
This will install both code quality checks and commit message format validation.
37+
38+
> **Note:** All commits must follow the Conventional Commits format: `<type>[optional scope]: <description>`
39+
>
40+
> Valid types: feat, fix, docs, style, refactor, test, chore, ci, perf, build
41+
>
42+
> Examples:
43+
>
44+
> - `fix: resolve data fetching issue`
45+
> - `feat(FilterView): add new method for conditional filtering`
46+
> - `docs: update the pull request template`
47+
2148
### Set Environment Variables
2249

2350
The project requires specific and sensitive information to run, which should be stored in the user's development environment rather than in source control. Here are instructions for setting environment variables locally on your machine or using a `.env` file.

docs/SETUP/FRONT_END.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,33 @@ Note: make sure to keep your fork up to date with the original repository by fol
2424

2525
We use a precommit hook to help with formatting and linting in our CI/CD pipeline. When setting up the repo, please first [make sure you have `pre-commit` installed](https://pre-commit.com/) using `pip` or another package manager.\* Once that's done, run `pre-commit install` in the root directory to set up the precommit hooks (configured in `.pre-commit-config.yaml`).
2626

27+
**Important:** After the above step manually copy the commit message hook file to ensure conventional commit format validation:
28+
29+
**Windows Command Prompt:**
30+
31+
```cmd
32+
copy .github\hooks\commit-msg .git\hooks\
33+
```
34+
35+
**Mac/Linux/Git Bash:**
36+
37+
```bash
38+
cp .github/hooks/commit-msg .git/hooks/
39+
chmod +x .git/hooks/commit-msg
40+
```
41+
42+
This will install both code quality checks and commit message format validation.
43+
44+
> **Note:** All commits must follow the Conventional Commits format: `<type>[optional scope]: <description>`
45+
>
46+
> Valid types: feat, fix, docs, style, refactor, test, chore, ci, perf, build
47+
>
48+
> Examples:
49+
>
50+
> - `fix: resolve data fetching issue`
51+
> - `feat(FilterView): add new method for conditional filtering`
52+
> - `docs: update the pull request template`
53+
2754
\*`pre-commit` relies on Python and is installed with `pip`. Python 3 ships by default on Unix systems (macOS and Linux) and `pip` is normally included in this. So, unless you're running Windows, both of these should already be accessible to you without any extra steps. If you're running Windows, see [the Python installation instrutions here](https://docs.python.org/3/using/windows.html).
2855

2956
### Nextjs App

0 commit comments

Comments
 (0)