Skip to content

Commit

Permalink
Changes made to Portfolio page in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
shweta487 committed Nov 27, 2024
1 parent 4dd5c07 commit c27b79a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/analytics_tools/saving_code.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <filename>` 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 <branch-name>` 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 <branch-name>` 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.

Expand Down
11 changes: 10 additions & 1 deletion docs/publishing/sections/5_analytics_portfolio_site.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -47,14 +48,16 @@ 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:

- Include the directory to the notebook(s) you want to publish.

- 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**:
Expand Down Expand Up @@ -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.

0 comments on commit c27b79a

Please sign in to comment.