From c27b79ab493b93d1c1e1e5502eaea7d11a169b44 Mon Sep 17 00:00:00 2001 From: Shweta Adhikari Date: Wed, 27 Nov 2024 00:51:55 +0000 Subject: [PATCH] Changes made to Portfolio page in docs --- docs/analytics_tools/saving_code.md | 2 +- .../publishing/sections/5_analytics_portfolio_site.md | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/analytics_tools/saving_code.md b/docs/analytics_tools/saving_code.md index 195dc9b9ed..642ed43030 100644 --- a/docs/analytics_tools/saving_code.md +++ b/docs/analytics_tools/saving_code.md @@ -123,7 +123,7 @@ If you discover merge conflicts and they are within a single notebook that only - Untracked Files: Sometimes, files are created or modified locally but are not added to Git before committing, so they are not tracked or pushed to GitHub. Use `git add ` to track files before committing. - Incorrect Branches: - Committing to the wrong branch (e.g., main instead of a feature branch) can cause problems, especially if changes are not meant to be merged into the main codebase. Always ensure you're on the correct branch using git branch and switch branches with `git checkout ` before committing. + Committing to the wrong branch (e.g., main instead of a feature branch) can cause problems, especially if changes are not meant to be merged into the main codebase. Always ensure you're on the correct branch using git branch and switch branches with `git switch -c ` before committing. - Merge Conflicts from Overlapping Work: When multiple analysts work on the same files or sections of code, merge conflicts can occur. Creating feature branches and pulling regularly to stay updated with main can help avoid these conflicts. diff --git a/docs/publishing/sections/5_analytics_portfolio_site.md b/docs/publishing/sections/5_analytics_portfolio_site.md index 12eacdf3cf..3e2e1e5ca8 100644 --- a/docs/publishing/sections/5_analytics_portfolio_site.md +++ b/docs/publishing/sections/5_analytics_portfolio_site.md @@ -11,6 +11,7 @@ Netlify is the platform turns our Jupyter Notebooks uploaded to GitHub into a fu To setup your netlify key: - Ask in Slack/Teams for a Netlify key if you don't have one yet. +- If you already have your Netlify key set up, find it by typing `cat ~/.bash_profile` into the root of your repo. - Install netlify: `npm install -g netlify-cli` - Navigate to your main directory - Edit your bash profile using Nano: @@ -47,7 +48,7 @@ Create a `README.md` file in the repo where your work lies. This also forms the Each `.yml` file creates a new site on the [Portfolio's Index Page](https://analysis.calitp.org/), so every project needs its own file. DLA Grant Analysis, SB125 Route Illustrations, and Active Transportation Program all have their own `.yml` file. -All the `.yml` files live here at [data-analyses/portfolio/sites](https://github.com/cal-itp/data-analyses/tree/main/portfolio/sites). +All the `.yml` files live here at [data-analyses/portfolio/sites](https://github.com/cal-itp/data-analyses/tree/main/portfolio/sites). Navigate to this folder to create the .yml file. Here's how to create a `yml` file: @@ -55,6 +56,8 @@ Here's how to create a `yml` file: - Name your `.yml` file. For now we will use `my_report.yml` as an example. +- `.yml` file should contain the title, directory, README.md path and notebook path. + - The structure of your `.yml` file depends on the type of your analysis: - If you have one parameterized notebook with **one parameter**: @@ -206,3 +209,9 @@ build_my_reports: git add portfolio/my_report/district_*/ portfolio/my_report/*.yml portfolio/my_report/*.md git add portfolio/sites/my_report.yml ``` + +### Delete Portfolio/ Refresh Index Page + +When creating a new portfolio and there’s an old version with existing files or content on your portfolio site or in your local environment, it’s important to clean up the old files before adding new content. + +Use python `portfolio/portfolio.py clean my_report` before deploying your report.