Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit and Update: Enhancements to Cal-ITP Data Services Documentation #3554

Merged
merged 12 commits into from
Nov 27, 2024
Prev Previous commit
Next Next commit
Changes made to Portfolio page in docs
  • Loading branch information
shweta487 committed Nov 27, 2024
commit c27b79ab493b93d1c1e1e5502eaea7d11a169b44
2 changes: 1 addition & 1 deletion docs/analytics_tools/saving_code.md
Original file line number Diff line number Diff line change
@@ -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.

11 changes: 10 additions & 1 deletion docs/publishing/sections/5_analytics_portfolio_site.md
Original file line number Diff line number Diff line change
@@ -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,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**:
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm rereading this again and can you ask Tiffany or Eric how to take off a site analysis.calitp.org completely? These instructions are about redeploying your portfolio, rather than deleting a portfolio completely.


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.
Loading