Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Remove NodeJS from user guide (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego authored Aug 29, 2023
1 parent 1a83df4 commit 09892ba
Show file tree
Hide file tree
Showing 24 changed files with 5 additions and 781 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,3 @@ jobs:

- run: pip install black==23.7.0
- run: black --check .

rome:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm install --save-dev --save-exact rome
- run: npx rome format docs/src/node/

test-node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install Polars
run: npm i -s nodejs-polars
- name: Install rng
run: npm i -s chance
- name: Run code snippets
run: find docs/src/ -name "*.js" | xargs -n 1 sh -c 'node $0 || exit 255'
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
.idea/
.vscode/

# NodeJS
node_modules

# Python
/.venv
__pycache__
Expand Down
12 changes: 1 addition & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ endif
$(MAKE) requirements
$(MAKE) install-graphviz

.PHONY: node_modules
node_modules: ## Instal NodeJS modules
npm install

.PHONY: requirements
requirements: .venv ## Install/refresh all project requirements
$(VENV_BIN)/python -m pip install --upgrade pip
Expand All @@ -43,20 +39,14 @@ serve: .venv ## Serve the docs locally
$(VENV_BIN)/mkdocs serve

.PHONY: lint
lint: .venv node_modules ## Lint code examples
lint: .venv ## Lint code examples
# python
$(VENV_BIN)/black --check .
# js
npx rome format docs/src/node/

.PHONY: test-python
test-python: .venv ## Test Python code examples
find docs/src/python -type f | xargs -n 1 bash -c '$(VENV_BIN)/python -W error $$0 || exit 255'

.PHONY: test-node
test-node: node_modules ## Test NodeJS code examples
find docs/src/ -name "*.js" | xargs -n 1 sh -c 'node $$0 || exit 255'

.PHONY: help
help: ## Display this help screen
@echo -e "\033[1mAvailable commands:\033[0m"
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ In order to serve the books run `make serve`. This will run all the python examp
Deployment of the book is done using Github Pages and Github Workflows. The book is automatically deployed on each push to master / main branch. There are a number of checks in the CI pipeline to avoid non-working examples:

- Run all python examples, fail on any errors
- Run all node examples, fail on any errors
- Check all links in markdown
- Run black formatter
45 changes: 0 additions & 45 deletions docs/_build/API_REFERENCE_LINKS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,48 +262,3 @@ rust:
map: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.map
apply: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.apply
over: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.over

javascript:
DataFrame: https://pola-rs.github.io/nodejs-polars/interfaces/DataFrame-1.html
Series: https://pola-rs.github.io/nodejs-polars/interfaces/Series-1.html
select: https://pola-rs.github.io/nodejs-polars/interfaces/DataFrame-1.html#select
filter: https://pola-rs.github.io/nodejs-polars/interfaces/DataFrame-1.html#filter
with_columns:
name: withColumns
link: https://pola-rs.github.io/nodejs-polars/interfaces/DataFrame-1.html#withColumns
groupby:
name: groupBy
link: https://pola-rs.github.io/polars/py-polars/html/reference/dataframe/api/polars.DataFrame.groupby.html
join: https://pola-rs.github.io/nodejs-polars/interfaces/DataFrame-1.html#join
hstack: https://pola-rs.github.io/nodejs-polars/interfaces/DataFrame-1.html#hstack
read_csv:
name: readCSV
link: https://pola-rs.github.io/nodejs-polars/functions/readCSV.html
scan_csv:
name: scanCSV
link: https://pola-rs.github.io/nodejs-polars/functions/pl.scanCSV.html
write_csv:
name: writeCSV
link: https://pola-rs.github.io/nodejs-polars/interfaces/DataFrame-1.html#writeCSV
read_json:
name: readJSON
link: https://pola-rs.github.io/nodejs-polars/functions/readJSON.html
write_json:
name: writeJSON
link: https://pola-rs.github.io/nodejs-polars/interfaces/DataFrame-1.html#writeJSON
read_parquet:
name: readParquet
link: https://pola-rs.github.io/nodejs-polars/functions/readParquet.html
write_parquet:
name: writeParquet
link: https://pola-rs.github.io/nodejs-polars/interfaces/DataFrame-1.html#writeParquet
min: https://pola-rs.github.io/nodejs-polars/interfaces/Series-1.html#min
max: https://pola-rs.github.io/nodejs-polars/interfaces/Series-1.html#max
replace: https://pola-rs.github.io/nodejs-polars/interfaces/StringNamespace.html#replace
sample: https://pola-rs.github.io/nodejs-polars/interfaces/DataFrame-1.html#sample
day: https://pola-rs.github.io/nodejs-polars/interfaces/DatetimeNamespace.html#day
head: https://pola-rs.github.io/nodejs-polars/interfaces/DataFrame-1.html#head
tail: https://pola-rs.github.io/nodejs-polars/interfaces/DataFrame-1.html#tail
describe: https://pola-rs.github.io/nodejs-polars/interfaces/DataFrame-1.html#describe
collect: https://pola-rs.github.io/nodejs-polars/interfaces/pl.LazyDataFrame.html#collect

6 changes: 0 additions & 6 deletions docs/_build/scripts/macro.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@
"icon_name": "rust",
"code_name": "rust",
},
node={
"extension": ".js",
"display_name": "NodeJS",
"icon_name": "node-js",
"code_name": "javascript",
},
)

# Load all links to reference docs
Expand Down
16 changes: 0 additions & 16 deletions docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ Polars is a library and installation is as simple as invoking the package manage
cargo add polars
```

=== ":fontawesome-brands-node-js: NodeJS"

``` shell
yarn add nodejs-polars
```

## Importing

To use the library import it into your project
Expand All @@ -35,13 +29,3 @@ To use the library import it into your project
``` rust
use polars::prelude::*;
```

=== ":fontawesome-brands-node-js: NodeJS"

``` javaScript
// esm
import pl from 'nodejs-polars';

// require
const pl = require('nodejs-polars');
```
12 changes: 3 additions & 9 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,18 @@ hide:
<a href="https://docs.rs/polars/latest/polars/">
<img src="https://docs.rs/polars/badge.svg" alt="rust docs"/>
</a>
<a href="https://github.com/pola-rs/polars/actions">
<img src="https://github.com/pola-rs/polars/workflows/Build%20and%20test/badge.svg" alt="Build and test"/>
</a>
<a href="https://crates.io/crates/polars">
<img src="https://img.shields.io/crates/v/polars.svg"/>
</a>
<a href="https://pypi.org/project/polars/">
<img src="https://img.shields.io/pypi/v/polars.svg" alt="PyPi Latest Release"/>
</a>
<a href="https://www.npmjs.com/package/nodejs-polars">
<img src="https://img.shields.io/npm/v/nodejs-polars.svg" alt="NPM Latest Release"/>
<img src="https://img.shields.io/pypi/v/polars.svg" alt="PyPI Latest Release"/>
</a>
<a href="https://doi.org/10.5281/zenodo.7697217">
<img src="https://zenodo.org/badge/DOI/10.5281/zenodo.7697217.svg" alt="DOI Latest Release"/>
</a>
</div>

Polars is a highly performant DataFrame library for manipulating structured data. The core is written in Rust, but the library is available in Python, Rust & NodeJS. Its key features are:
Polars is a highly performant DataFrame library for manipulating structured data. The core is written in Rust, but the library is also available in Python. Its key features are:

- **Fast**: Polars is written from the ground up, designed close to the machine and without external dependencies.
- **I/O**: First class support for all common data storage layers: local, cloud storage & databases.
Expand All @@ -45,7 +39,7 @@ The `Polars` user guide is intended to live alongside the API documentation. Its
- [Getting Started](getting-started/intro.md): A 10 minute helicopter view of the library and its primary function.
- [User Guide](user-guide/index.md): A detailed explanation of how the library is setup and how to use it most effectively.

If you are looking for details on a specific level / object, it is probably best to go the API documentation: [Python](https://pola-rs.github.io/polars/py-polars/html/reference/index.html) | [NodeJS](https://pola-rs.github.io/nodejs-polars/index.html) | [Rust](https://docs.rs/polars/latest/polars/).
If you are looking for details on a specific level / object, it is probably best to go the API documentation: [Python](https://pola-rs.github.io/polars/py-polars/html/reference/index.html) | [Rust](https://docs.rs/polars/latest/polars/).

## Performance :rocket: :rocket:

Expand Down
81 changes: 0 additions & 81 deletions docs/src/node/getting-started/expressions.js

This file was deleted.

21 changes: 0 additions & 21 deletions docs/src/node/getting-started/joins.js

This file was deleted.

37 changes: 0 additions & 37 deletions docs/src/node/getting-started/reading-writing.js

This file was deleted.

Loading

0 comments on commit 09892ba

Please sign in to comment.