You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rdocumentation.org provides the R community with centralized, quality and easy to search documentation.
4
-
5
-
R documentation sifts through all CRAN, GitHub and BioConductor packages hourly, parses the documentation files and indexes them in an Elasticsearch database. This makes rdocumentation.org the best online resource to browse all R package documentation.
6
-
7
-
The RDocs project is completely open-source. This repository contains the source code for the NodeJS web application that serves [www.rdocumentation.org](https://www.rdocumentation.org). For other codebases, you can check out [`CONTRIBUTING.md`](CONTRIBUTING.md).
8
-
9
-
## Features
10
-
- Quick search through all packages and functions
11
-
12
-

13
-
14
-
- Complete search through all packages and function
15
-
16
-

17
-
18
-
- Easily assess package quality
3
+
_Important notes:_
19
4
20
-

5
+
1. Please read this [confluence page](https://datacamp.atlassian.net/wiki/spaces/PRODENG/pages/2314469377/RDocumentation) which explains the architecture of how RDocumentation works.
6
+
2. This repo is now only used for its API. Please disregard all the UI code here. THe UI now lives in [datacamp/rdocumentation-2.0](https://github.com/datacamp/rdocumentation-2.0).
21
7
22
-
- Post *community examples* to help the community understand how to use a function
23
-
24
-

25
-
26
-
27
-
## What this app does
8
+
rdocumentation.org provides the R community with centralized, quality and easy to search documentation.
28
9
29
-
This application is part the rdocumentation project. This app is responsible for storing the RDocumentation data, and bring it to the users through a web interface (the rdocumentation.org site) or through an api (See https://www.rdocumentation.org/docs/ for the public API)
10
+
R documentation sifts through all CRAN, GitHub and BioConductor packages hourly, parses the documentation files and indexes them in an Elasticsearch database. This makes rdocumentation.org the best online resource to browse all R package documentation.
30
11
31
-
## Documentation
12
+
## How the API works
32
13
33
-
Documentation of the differents endpoints can be found here: http://www.rdocumentation.org/docs/
14
+
You can check docs for the API by running the app locally and going to http://localhost:3000/docs/
34
15
35
-
## Issue/Feature request
36
-
Please post a new issue at https://github.com/datacamp/rdocumentation-app/issues for any bug that you encounter or a feature that you would like to see in rdocumetation.org.
16
+
1. Newly parsed packages are added to the `rdocs-app-worker` SQS queue every hour.
17
+
2. That queue is configured to hit the `/task` path which calls the `processMessage` method of the WorkerController
18
+
3. That `processMessage` method adds topics to the mysql database
19
+
4. After a query is sent to the API to request a topic, that topic is stored in Redis so that it's returned faster next time.
37
20
38
21
## Development
39
22
40
23
### Using docker
24
+
41
25
You'll need docker and docker-compose to run this stack locally
42
26
43
27
- Copy the .env.sample to .env and change relevant variables
28
+
- If you already have a mysql db running on port 3306, update the `DATABASE_PORT` to another value as well as the port mapping in docker-compose.yml (e.g. change it to `"3308:3306"`)
44
29
-`docker-compose create` to create the redis and mysql container
45
30
-`docker-compose start` to fire up a local redis an mysql
31
+
- Use the same node version in your terminal as the Dockerfile is using: `nvm use 8.16`
32
+
-`npm install`
46
33
- Run the database migrations by doing `npm run migrate`
47
34
-`npm run start-dev`
48
35
36
+
Once the db is running, you can use a mysql client like dbeaver to access it. Connect to it based on the environment variables you have in `docker-compose.yml`. The server host should just be `localhost`.
37
+
38
+
### Troubleshooting
39
+
40
+
If you get an error: `SequelizeConnectionError: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client`
41
+
follow these steps:
42
+
43
+
1. Access your mysql container: you can do it either through the docker app by clicking on the "cli" button of the container, or in your terminal by running `docker exec -it <mysql_container_id> bash`
44
+
2.`mysql -u root -p`
45
+
3. Enter: `password`
46
+
4.`ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'`
47
+
49
48
## How to deploy
50
49
51
50
- To deploy to stating (rdocumentation.datacamp-staging.com), merge to master
@@ -56,18 +55,11 @@ The rdocumentation app is hosted on DataCamp's infrastructure, on our AWS ECS cl
56
55
## What the CI does
57
56
58
57
This application runs on the DataCamp infrastructure. Our custom CI flow will:
58
+
59
59
- Build a docker image
60
60
- Upload it the ECR
61
61
- Deploy the new version to ECS
62
62
63
-
## How to contribute
64
-
65
-
We welcome any contributions that could improves rdocumentation.org. There is multiple ways of contributing:
66
-
- Report when some packages are missing/outdated/incorrect by creating an issue.
67
-
- Report bugs.
68
-
- Help us improves by proposing features.
69
-
- Directly contribute by forking the repo and making changes.
70
-
71
63
## License
72
64
73
65
See the [LICENSE](LICENSE.md) file for license rights and limitations (MIT).
The information on this page comes from the original Readme when this app was used for its UI as well, but since the UI now lives in [datacamp/rdocumentation-2.0](https://github.com/datacamp/rdocumentation-2.0), this Readme is just there to remind you the good old' days of RDocumentation.
2
+
3
+
## Features
4
+
5
+
- Quick search through all packages and functions
6
+
7
+

8
+
9
+
- Complete search through all packages and function
10
+
11
+

12
+
13
+
- Easily assess package quality
14
+
15
+

16
+
17
+
- Post _community examples_ to help the community understand how to use a function
18
+
19
+

20
+
21
+
## What this app does
22
+
23
+
This application is part the rdocumentation project. This app is responsible for storing the RDocumentation data, and bring it to the users through a web interface (the rdocumentation.org site) or through an api (See https://www.rdocumentation.org/docs/ for the public API)
24
+
25
+
## Documentation
26
+
27
+
Documentation of the differents endpoints can be found here: http://www.rdocumentation.org/docs/
28
+
29
+
## Issue/Feature request
30
+
31
+
Please post a new issue at https://github.com/datacamp/rdocumentation-app/issues for any bug that you encounter or a feature that you would like to see in rdocumetation.org.
32
+
33
+
## How to contribute
34
+
35
+
We welcome any contributions that could improves rdocumentation.org. There is multiple ways of contributing:
36
+
37
+
- Report when some packages are missing/outdated/incorrect by creating an issue.
38
+
- Report bugs.
39
+
- Help us improves by proposing features.
40
+
- Directly contribute by forking the repo and making changes.
0 commit comments