-
Notifications
You must be signed in to change notification settings - Fork 2
13 update readme and documentation #50
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
Open
el-rabies
wants to merge
8
commits into
main
Choose a base branch
from
13-update-readme-and-documentation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+220
−50
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7988e8c
chore: Changed main README to reflect current state of repo
el-rabies f5a99a6
chore: Added local environment installation instructions (npm)
el-rabies 513dd84
chore: Grammar fixes, guide to docker installation and local environment
el-rabies 89ec2dc
chore: Added empty documentation files
el-rabies 25c3cc1
chore: Added TinaCMS guide
el-rabies 21f15cf
fix: Incorrect commands in TinaCMS tutorial
el-rabies 54a6c4e
chore: Added angular documentation
el-rabies 5d20f54
Improve Docker setup instructions in documentation
junaid7haque File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,59 +1,18 @@ | ||
| # Reactome | ||
|
|
||
| This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.1.2. | ||
| REACTOME is an open-source, open access, manually curated and peer-reviewed pathway database. | ||
|
|
||
| ## Development server | ||
|
|
||
| To start a local development server, run: | ||
|
|
||
| ```bash | ||
| ng serve | ||
| ``` | ||
|
|
||
| Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files. | ||
|
|
||
| ## Code scaffolding | ||
|
|
||
| Angular CLI includes powerful code scaffolding tools. To generate a new component, run: | ||
|
|
||
| ```bash | ||
| ng generate component component-name | ||
| ``` | ||
|
|
||
| For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run: | ||
|
|
||
| ```bash | ||
| ng generate --help | ||
| ``` | ||
|
|
||
| ## Building | ||
|
|
||
| To build the project run: | ||
|
|
||
| ```bash | ||
| ng build | ||
| ``` | ||
|
|
||
| This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed. | ||
|
|
||
| ## Running unit tests | ||
|
|
||
| To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command: | ||
|
|
||
| ```bash | ||
| ng test | ||
| ``` | ||
|
|
||
| ## Running end-to-end tests | ||
|
|
||
| For end-to-end (e2e) testing, run: | ||
| ## Local Development Server | ||
| To setup a local environment | ||
|
|
||
| ```bash | ||
| ng e2e | ||
| npm install --legacy-peer-deps | ||
| npm start | ||
| ``` | ||
|
|
||
| Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs. | ||
| ## Usage | ||
| Reactome has a wide range of features, to explore more of Reactome or get more information visit [the documentation page](https://reactome.org/documentation) or see the ````/documentation```` folder in the root directory. | ||
|
|
||
| ## Additional Resources | ||
|
|
||
| For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page. | ||
| ## LICENSE | ||
| [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # PathwayBrowser | ||
| [Userguide](http://localhost:4200/documentation/userguide/pathway-browser) | ||
| Dev docs loading... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Adding Components to Reactome | ||
| ## What is a Component | ||
| "Components are the main building blocks of Angular applications. Each component represents a part of a larger web page. Organizing an application into components helps provide structure to your project, clearly separating code into specific parts that are easy to maintain and grow over time." - [Angular Docs](https://angular.dev/essentials/components) | ||
|
|
||
| ## How to Add one | ||
| To add a component to this project use the following command | ||
| ```` | ||
| ng generate component <Component name and path here> | ||
| ```` | ||
| and edit the files it generates to your hearts content. You will then be able to use the component wherever you want in the HTML files. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Adding a Page to Reactome | ||
| The first thing to consider here is whether or not your page needs custom angular functionality. If the pages will be comprised of only text, images and video, a TinaCMS page will suffice and you can follow the TinaCMS tutorial instead. | ||
|
|
||
| To create a new angular page follow these steps | ||
| 1. Generate a new component (this will be your page) | ||
| Follow the tutorial in adding-components | ||
| 2. Add the route for your page in ````projects/website-angular/src/app/app.routes.ts```` | ||
| Your "route" is what makes your page show up at the correct address in the browser. | ||
| 3. Edit your page to your hearts content. | ||
| This step will require a bit more creativity and Angular experience. I can't be sure what kind of page you are creating so do your best to get the functionality your need with the power of the internet on your side. I believe in you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Changing Styles | ||
| Hey!!! Are you here because you think my work is ugly?! Not cool. | ||
| Jokes aside here is your guide to changing the look of anything on the website. | ||
|
|
||
| ## SCSS | ||
| [SCSS](https://sass-lang.com/) is the framework we use for *styling* (assigning visual traits to HTML tags) in this repository. | ||
|
|
||
| ## Changing or Adding Styles | ||
| For the sake of simplicity I will guide you through a basic tutorial on changing the style of an element which will hopefully be applicable to whatever you are trying to do. | ||
|
|
||
| 1. Find class you are trying to restyle on the page (or add a *class* to the component) | ||
| For this tutorial we will use the copyright text at the bottom of the Reactome page ```` © 2026 Reactome````. | ||
| 1. Use right click and select *Inspect* on the component you want to change | ||
| This will open up the *inspector* menu and allow you to see the base HTML of the page. We can see here that the *class* for the box the the copyright text is in is named ````copyright````. | ||
| 1. Find the class definition in a SCSS file (or make one) | ||
| It would help if you already know the file you're working in but if you don't then use a text-search function to match text or class name until you find the correct file. In this case ````projects/website-angular/src/app/copyright-footer/copyright-footer.component.scss````. | ||
| 1. Edit the style | ||
| Now that we have found the *copyright* class definition we can change it as we see fit. To change the colour of the copyright box. Replace the ````.copyright```` section with this. | ||
| ```` | ||
| .copyright { | ||
| display: flex; | ||
| flex: 1; | ||
| flex-direction: row; | ||
| align-items: center; | ||
| justify-content: flex-start; | ||
| gap: 4px; | ||
| color: pink; | ||
| background-color: pink; #change this line | ||
| } | ||
| ```` | ||
|
|
||
| Now you have all the skills you need to change styles wherever you like! Go forth and style away. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Website Angular | ||
| What can I even say? This document refers to the code in the ````projects/website-angular```` directory. This code handles the majority of UI on the website barring certain special pages such as ````/PathwayBrowser````, ````/chat```` and a few others. | ||
|
|
||
| The website is an [angular](https://angular.dev/) project making use of TinaCMS for content management. | ||
|
|
||
| For information on adding pages, components or changing styles please check out the other documentation files. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Guide to Running Reactome as a Docker Container | ||
| This guide will instruct you in setting up Reactome in a Docker container! | ||
|
|
||
| ## Step 1: Installing Docker | ||
| Docker is a containerization tool that allows you to run environments you may not have installed on your computer. You can install Docker by following these [instructions](https://docs.docker.com/get-started/get-docker/). Check that Docker has installed correctly by running ```docker --version```. If you see a version number, then everything is installed correctly. | ||
|
|
||
| ## Step 2: Building and Running the Image | ||
| Once Docker has been installed, run the following command to prepare the local environment: | ||
| ``` | ||
| docker compose up --build | ||
| ``` | ||
|
|
||
| ## Step 3: Explore Reactome! | ||
| Visit [http://localhost:4200/](http://localhost:4200/) to access the website. | ||
| You're all done! Good job. | ||
|
|
||
| Once finished with accessing the website, run the following command: | ||
| ``` | ||
| docker compose down | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Guide to Setting up Reactome as a local Environment | ||
| **Hello and welcome to the local environment installation guide!** | ||
| In an effort to minimize the suffering of all who come here after me I will do my best to assume no pre-exsisting knowledge on github or Angular development. | ||
|
|
||
| Feel free to skip ahead if you have already completed some of these steps! | ||
|
|
||
| ## Step 1: Installing git | ||
| If you are rolling your eyes at the pedantry of this guide please skip to the next step. | ||
|
|
||
| In order to get a local version of Reactome on your computer, you will need to get the code onto your computer. We will be doing this with the command line tool git which you can install for Windows, Linux or MacOS [here](https://git-scm.com/install/). | ||
|
|
||
| Once git is installed clone and enter the repository with the following commands: | ||
| ```` | ||
| git clone https://github.com/reactome/WebsiteAngular.git | ||
| cd WebsiteAngular | ||
| ```` | ||
| this will place a local copy of the project onto you computer and open the folder containing it. | ||
|
|
||
|
|
||
| ## Step 2: Installing Node | ||
| Node is the tool that will compile and run the Reactome project. You can download it [here](https://nodejs.org/en/download)! | ||
| Once node is installed run the following commands in the ````WebsiteAngular/```` directory. | ||
|
|
||
| ```` | ||
| npm install --legacy-peer-deps | ||
| npm start | ||
| ```` | ||
|
|
||
| After this you should have a fully functional copy of Reactome running on your computer. | ||
|
|
||
| If you run into any issues, try your best to follow any instructions in the error message or any advice found online. | ||
|
|
||
| # Step 3: Rejoice! | ||
| Nothing to do here but reap the benefits of your hard work I guess? Why are you still reading this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| # TinaCMS | ||
| TinaCMS is the content management system that Reactome is using for the majority of its pages and all of its articles. This document will instruct you on how to **add**, **edit** and **customize** TinaCMS pages. | ||
|
|
||
| ### Important!!! | ||
| Before making any changes make sure your working git branch is up to date with origin/main. To do this run ````git pull```` or ````git fetch````. | ||
|
|
||
| ## Adding a new page to Reactome from the Browser | ||
| Adding a page to Tina can be done in a few steps | ||
| 1. **Choose where you are adding the page** | ||
| Depending on whether you are adding an *about*, *content*, *documentation*, *tools*, *community*, *news*, *FAQ*, or *research spotlight* page will determine how you proceed. | ||
|
|
||
| 2. **Start your Reactome local dev environment** | ||
| If you followed the ````documentation/local-environment.md```` tutorial run ````npm start```` | ||
| If you followed the ````documentation/local-environment-docker.md```` tutorial run ````docker compose up --build```` | ||
|
|
||
| 3. **Navigate to /admin** | ||
| 4. **Go to the collection you would like to add to** | ||
| Find the "Navigation Menu" button and click on the *collection* you would like to add to. | ||
| 5. **Click Add File** | ||
| 6. **Edit your page / article** | ||
| Don't forget to set the DatePublished! | ||
|
|
||
| 7. **Click Save** | ||
| 8. **Refresh your local environment** | ||
| Stop it with ````^C```` and run again with the command from *Step 2* | ||
|
|
||
| Your Page will now appear in your local environment. To publish it view the *publishing to github* portion of this tutorial. | ||
|
|
||
| ## Editing a TinaCMS page from the Browser | ||
| To Edit a pre-existing page in your local dev environment follow the following steps. | ||
| 1. **Start your Reactome local dev environment** | ||
| If you followed the ````documentation/local-environment.md```` tutorial run ````npm start```` | ||
| If you followed the ````documentation/local-environment-docker.md```` tutorial run ````docker compose up --build```` | ||
| 2. **Navigate to /admin** | ||
| 3. **Go to the collection you would like to edit from** | ||
| Find the "Navigation Menu" button and click on the *collection* that the article you would like to edit is in. | ||
| 4. **Find your chosen article** | ||
| 5. **Click on the ... menu and select Edit in Admin** | ||
| 6. **Edit your page / article** | ||
| 7. **Click Save** | ||
|
|
||
| 8. **Refresh your local environment** | ||
| Stop it with ````^C```` and run again with the command from *Step 1* | ||
|
|
||
| Your edited page will now appear in your local environment. To publish your changes, view the *publishing to github* portion of this tutorial. | ||
|
|
||
| ## Adding and Editing Pages Through mdx files | ||
| If you would prefer to use your own .md or .mdx file editor or do not wish to use a local dev environment -- you can instead edit the files directly. | ||
|
|
||
| All articles and pages are stored in the ````projects/website-angular/content```` directory of this repository. Simply find the collection relevant to your page (i.e ````about/news```` for News articles) and add or edit the relevant files as you see fit. | ||
|
|
||
| If you are adding net new files please follow these templates. | ||
| For articles ````about/news````, ````content/reactome-research-spotlight```` or ````documentation/faq````: | ||
| ```` | ||
| --- | ||
| title: <Title Here> | ||
| date: <YYYY-MM-DD> | ||
| author: <Author Here> | ||
| tags: | ||
| - tag | ||
| image: /uploads/<upload path here> | ||
| --- | ||
|
|
||
| <Article Body Here> | ||
| ```` | ||
| For all other types of pages: | ||
| ```` | ||
| --- | ||
| title: <Title Here> | ||
| description: <Description Here> | ||
| category: <about, content, documentation, tools, community, download> | ||
| image: /uploads/<upload path here> | ||
| --- | ||
|
|
||
| <Body Here> | ||
| ```` | ||
|
|
||
|
|
||
| ## Publishing to Github | ||
| Once you are happy with your changes its time to publish them to github for review. This will require a github account so make sure you have one [here](https://github.com/login). | ||
| Once you are ready run these commands from your clone of the repository. | ||
| ```` | ||
| git status | ||
| git switch -c <Your Article/Branch Name Here> | ||
| git add . | ||
| git commit -m "<Your Commit Message Here>" | ||
| git push -u origin <Your Article/Branch Name Here> | ||
| ```` | ||
| Your branch is now available on the remote repository where you can make a pull request and have your article reviewed. Once everything has been approved the pull request (PR) can be merged into the working branch from which it can be put into the next release. | ||
|
|
||
| If you are uncomfortable with command line there are convenient tools like the [VScode extension](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-github-actions) or [Github Desktop](https://www.gitkraken.com/download?_gl=1*u0whzn*_up*MQ..*_gs*MQ..&gclid=CjwKCAjwhLPOBhBiEiwA8_wJHPBQZEe_3tLOunlEc4lXI8wM8Wxgpov5AYK6cOdTyhM8m1IfV02dCRoCaXgQAvD_BwE) that can make things easier. | ||
|
|
||
| ## Other Notes on TinaCMS | ||
| - If you ever have to edit the collections or general setup of TinaCMS that can be done in ````projects/website-angular/tina/config.ts```` | ||
| - If you need to make a home / landing page for a collection (i.e *about/*, *content/*) just name the file ````index.mdx```` and place it in the correct folder | ||
| - Additional Information about TinaCMS can be found [here](https://tina.io/) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EliotRagueneau did you have anything specific you would want in these docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would need to create a proper user guide for this, never took the time to do it yet :/