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

[DOCS] Improve docs and enable markdownlint rule MD001 #1352

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# https://github.com/DavidAnson/markdownlint#rules--aliases

# heading-increment - Heading levels should only increment by one level at a time
MD001: false

# ul-indent - Unordered list indentation
MD007: false

Expand Down
3 changes: 1 addition & 2 deletions R/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# apache.sedona <img src="man/figures/logo.png" align="right" width="120"/>

[Apache Sedona](https://sedona.apache.org/) is a cluster computing system for processing large-scale spatial data. Sedona extends existing cluster computing systems, such as Apache Spark and Apache Flink, with a set of out-of-the-box distributed Spatial Datasets and Spatial SQL that efficiently load, process, and analyze large-scale spatial data across machines.
Expand All @@ -15,7 +14,7 @@ To use Apache Sedona from R, you just need to install the apache.sedona package;
install.packages("apache.sedona")
```

#### Development version
### Development version

To use the development version, you will need both the latest version of the package and of the Apache Sedona jars.

Expand Down
30 changes: 16 additions & 14 deletions docs/community/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### IDE

We recommend Intellij IDEA with Scala plugin installed. Please make sure that the IDE has JDK 1.8 set as project default.
We recommend [Intellij IDEA](https://www.jetbrains.com/idea/) with Scala plugin installed. Please make sure that the IDE has JDK 1.8 set as project default.

### Import the project

Expand All @@ -22,7 +22,7 @@ The IDE usually has trouble understanding the complex project structure in Sedon

![](../image/ide-java-4.png)

#### Fix errors by changing pom.xml
#### Fix errors by changing `pom.xml`

You need to comment out the following lines in `pom.xml` at the root folder, as follows. ==Remember that you should NOT submit this change to Sedona.==

Expand All @@ -35,9 +35,9 @@ You need to comment out the following lines in `pom.xml` at the root folder, as
<!-- </parent>-->
```

#### Reload pom.xml
#### Reload `pom.xml`

Make sure you reload the pom.xml or reload the maven project. The IDE will ask you to remove some modules. Please select `yes`.
Make sure you reload the `pom.xml` or reload the maven project. The IDE will ask you to remove some modules. Please select `yes`.

![](../image/ide-java-5.png)

Expand Down Expand Up @@ -80,25 +80,27 @@ Re-run the test case. Do NOT right-click the test case to re-run. Instead, click

## Python developers

#### Run all python tests
### IDE

We recommend [PyCharm](https://www.jetbrains.com/pycharm/).

### Run Python tests

#### Run all Python tests

To run all Python test cases, follow steps mentioned [here](../setup/compile.md#run-python-test).

#### Run all python tests in a single test file
#### Run all Python tests in a single test file

To run a particular python test file, specify the path of the .py file to pipenv.
To run a particular Python test file, specify the path of the `.py` file to `pipenv`.

For example, to run all tests in `test_function.py` located in `python/tests/sql/`, use: `pipenv run pytest tests/sql/test_function.py`.

#### Run a single test

To run a particular test in a particular .py test file, specify `file_name::class_name::test_name` to the pytest command.

For example, to run the test on ST_Contains function located in sql/test_predicate.py, use: `pipenv run pytest tests/sql/test_predicate.py::TestPredicate::test_st_contains`

### IDE
To run a particular test in a particular `.py` test file, specify `file_name::class_name::test_name` to the `pytest` command.

We recommend PyCharm
For example, to run the test on `ST_Contains` function located in `sql/test_predicate.py`, use: `pipenv run pytest tests/sql/test_predicate.py::TestPredicate::test_st_contains`

### Import the project

Expand All @@ -108,6 +110,6 @@ More details to come.

### IDE

We recommend RStudio
We recommend [RStudio](https://posit.co/products/open-source/rstudio/)

### Import the project
14 changes: 7 additions & 7 deletions docs/community/release-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

You only need to perform these steps if this is your first time being a release manager.

### 0. Software requirement
## 0. Software requirement

* JDK 8: `brew install openjdk@8`
* Maven 3.X. Your Maven must point to JDK 8 (1.8). Check it by `mvn --version`
Expand All @@ -28,7 +28,7 @@ JAVA_HOME="${JAVA_HOME:-$(/usr/libexec/java_home -v 1.8)}" exec "/usr/local/Cell

5. Run `mvn --version` again. It should now point to JDK 8.

### 1. Obtain Write Access to Sedona GitHub repo
## 1. Obtain Write Access to Sedona GitHub repo

1. Verify you have a GitHub ID enabled with 2FA https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/
2. Enter your GitHub ID into your Apache ID profile https://id.apache.org/
Expand All @@ -38,7 +38,7 @@ JAVA_HOME="${JAVA_HOME:-$(/usr/libexec/java_home -v 1.8)}" exec "/usr/local/Cell
4. After accepting the GitHub Invitation, verify that you are a member of the team https://github.com/orgs/apache/teams/sedona-committers
5. Additionally, if you have been elected to the Sedona PMC, verify you are part of the LDAP Sedona PMC https://whimsy.apache.org/roster/pmc/sedona

### 2. Prepare Secret GPG key
## 2. Prepare Secret GPG key

1. Install GNUPG if it was not installed before. On Mac: `brew install gnupg gnupg2`
2. Generate a secret key. It must be RSA4096 (4096 bits long).
Expand All @@ -56,7 +56,7 @@ JAVA_HOME="${JAVA_HOME:-$(/usr/libexec/java_home -v 1.8)}" exec "/usr/local/Cell
* There must be an empty line between `-----BEGIN PGP PUBLIC KEY BLOCK-----` and the actual key.
3. Publish your armored key in major key servers: https://keyserver.pgp.com/

### 3. Use SVN to update KEYS
## 3. Use SVN to update KEYS

Use SVN to append your armored PGP public key to the `KEYS` files
* https://dist.apache.org/repos/dist/dev/sedona/KEYS
Expand Down Expand Up @@ -85,7 +85,7 @@ rm -rf sedona-dev
rm -rf sedona-release
```

### 4. Add GPG_TTY environment variable
## 4. Add GPG_TTY environment variable

In your `~/.bashrc` file, add the following content. Then restart your terminal.

Expand All @@ -94,7 +94,7 @@ GPG_TTY=$(tty)
export GPG_TTY
```

### 5. Get GitHub personal access token (classic)
## 5. Get GitHub personal access token (classic)

You need to create a GitHub personal access token (classic). You can follow the instruction on [GitHub](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-personal-access-token-classic).

Expand All @@ -110,7 +110,7 @@ In short:
8. Click `Generate token`.
9. Please save your token somewhere because we will use it in the next step.

### 6. Set up credentials for Maven
## 6. Set up credentials for Maven

In your `~/.m2/settings.xml` file, add the following content. Please create this file or `.m2` folder if it does not exist.

Expand Down
8 changes: 4 additions & 4 deletions docs/tutorial/python-vector-osm.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ from pyspark.sql.functions import monotonically_increasing_id
import json
```

### Registering spark session, adding node executor configurations and sedona registrator
## Registering spark session, adding node executor configurations and sedona registrator

```
spark = SparkSession.\
Expand Down Expand Up @@ -48,7 +48,7 @@ SedonaRegistrator.registerAll(spark)
sc = spark.sparkContext
```

### Connecting to Overpass API to search and downloading data for saving into HDFS
## Connecting to Overpass API to search and downloading data for saving into HDFS

```
import requests
Expand All @@ -74,14 +74,14 @@ hdfs.create_file(file_name, json.dumps(data))

```

### Connecting spark sedona with saved hdfs file
## Connecting spark sedona with saved hdfs file

```
path = "hdfs://776faf4d6a1e:8020/"+file_name
df = spark.read.json(path, multiLine = "true")
```

### Consulting and organizing data for analysis
## Consulting and organizing data for analysis

```
from pyspark.sql.functions import explode, arrays_zip
Expand Down
Loading