Skip to content

Commit

Permalink
Merge branch 'main' into task-caching
Browse files Browse the repository at this point in the history
  • Loading branch information
joluj authored Jul 15, 2024
2 parents 3ab9c55 + 0cc48c7 commit 133bff6
Show file tree
Hide file tree
Showing 160 changed files with 5,780 additions and 300 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ jobs:
run: npm run generate

- name: Build
run: npx nx affected --target=build --configuration=prod --parallel=3
run: npx nx affected --target=build --verbose --parallel=1 --configuration=prod

- name: Lint
run: npx nx affected --target=lint --parallel=3 --maxWarnings=0
run: npx nx affected --target=lint --verbose --parallel=1 --maxWarnings=0

- name: Test
run: npx nx affected --target=test --parallel=3 --base=remotes/origin/main --head=HEAD --ci
run: npx nx affected --target=test --verbose --parallel=1 --base=remotes/origin/main --head=HEAD --ci

# Ensure this works for future release publishing
- name: Publish Dry-Run
run: npx nx affected --target=pre-publish --parallel=3 --base=remotes/origin/main --head=HEAD --ci
run: npx nx affected --target=pre-publish --verbose --parallel=1 --base=remotes/origin/main --head=HEAD --ci

# Ensure this works for future release publishing
- name: Pack VSCode Extension
Expand Down
243 changes: 243 additions & 0 deletions apps/docs/docs/user/cell-range.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
---
sidebar_position: 9
---

# Cell Range

Cell ranges can be used to select a subset of cells in a 2D data structure, such as a `Sheet`. The syntax for cell ranges follows conventions from spreadsheet-software. Rows are referenced by one-based indices and columns by capitalized characters, ordered alphabetically.

<table>
<tr>
<td></td>
<td>A</td>
<td>B</td>
<td>C</td>
</tr>
<tr>
<td>1</td>
<td class="example-table__highlighted">Cell A1</td>
<td class="example-table__highlighted">Cell B1</td>
<td class="example-table__highlighted">Cell C1</td>
</tr>
<tr>
<td>2</td>
<td class="example-table__highlighted">Cell A2</td>
<td class="example-table__highlighted">Cell B2</td>
<td class="example-table__highlighted">Cell C2</td>
</tr>
<tr>
<td>3</td>
<td class="example-table__highlighted">Cell A3</td>
<td class="example-table__highlighted">Cell B3</td>
<td class="example-table__highlighted">Cell C3</td>
</tr>
</table>

Cell ranges can be expressed as whole rows using the **`row`** keyword, whole columns using the **`column`** keyword and custom ranges using the **`range`** keyword.

## Selecting Custom Ranges

Using the **`range`** keyword, custom ranges can be selected. Ranges must define a start cell and end cell with the syntax `range <start-cell>:<end-cell>`. All cells between these cells are part of the range as if a user had selected the start cell in a spreadsheet-software and dragged the mouse until the end cell. For example `range A1:B2` is a range over four cells, from cell `A1` to `B2`.

Instead of a specific character or integer, the placeholder `*` denotes the last available cell in the row or column. For example: `A*` is the last cell in column `A` and `*2` is the last cell in row `2`.

### Examples
The following `CellRangeSelector` block will select the four cells in the top left corner of a `Sheet`:

<div class="side-by-side__container">

```jayvee
block ExampleDataSelector oftype CellRangeSelector {
select: range A1:B2;
}
```

<table>
<tr>
<td></td>
<td>A</td>
<td>B</td>
<td>C</td>
</tr>
<tr>
<td>1</td>
<td class="example-table__highlighted">Cell A1</td>
<td class="example-table__highlighted">Cell B1</td>
<td>Cell C1</td>
</tr>
<tr>
<td>2</td>
<td class="example-table__highlighted">Cell A2</td>
<td class="example-table__highlighted">Cell B2</td>
<td>Cell C2</td>
</tr>
<tr>
<td>3</td>
<td>Cell A3</td>
<td>Cell B3</td>
<td>Cell C3</td>
</tr>
</table>
</div>

The following `CellRangeSelector` block will select cells from the first to the last cell in row 2 in a `Sheet`:

<div class="side-by-side__container">

```jayvee
block ExampleDataSelector oftype CellRangeSelector {
select: range A2:*2;
}
```

<table>
<tr>
<td></td>
<td>A</td>
<td>B</td>
<td>C</td>
</tr>
<tr>
<td>1</td>
<td>Cell A1</td>
<td>Cell B1</td>
<td>Cell C1</td>
</tr>
<tr>
<td>2</td>
<td class="example-table__highlighted">Cell A2</td>
<td class="example-table__highlighted">Cell B2</td>
<td class="example-table__highlighted">Cell C2</td>
</tr>
<tr>
<td>3</td>
<td>Cell A3</td>
<td>Cell B3</td>
<td>Cell C3</td>
</tr>
</table>
</div>

The following `CellRangeSelector` block will select cells from the top-left most cell to the last cell in column B in a `Sheet`:

<div class="side-by-side__container">

```jayvee
block ExampleDataSelector oftype CellRangeSelector {
select: range A1:B*;
}
```

<table>
<tr>
<td></td>
<td>A</td>
<td>B</td>
<td>C</td>
</tr>
<tr>
<td>1</td>
<td class="example-table__highlighted">Cell A1</td>
<td class="example-table__highlighted">Cell B1</td>
<td>Cell C1</td>
</tr>
<tr>
<td>2</td>
<td class="example-table__highlighted">Cell A2</td>
<td class="example-table__highlighted">Cell B2</td>
<td>Cell C2</td>
</tr>
<tr>
<td>3</td>
<td class="example-table__highlighted">Cell A3</td>
<td class="example-table__highlighted">Cell B3</td>
<td>Cell C3</td>
</tr>
</table>
</div>

## Selecting Rows

Using the **`row`** keyword, individual rows can be selected. For example, `row 2` will select the second row in a `Sheet`. By adding multiple rows to a `Collection<CellRange>`, multiple rows can be selected.

### Examples
The following `RowDeleter` block will delete the first two rows of a `Sheet`:

<div class="side-by-side__container">

```jayvee
block ExampleRowDeleter oftype RowDeleter {
delete: [row 1, row 2];
}
```

<table>
<tr>
<td></td>
<td>A</td>
<td>B</td>
<td>C</td>
</tr>
<tr>
<td>1</td>
<td class="example-table__highlighted">Cell A1</td>
<td class="example-table__highlighted">Cell B1</td>
<td class="example-table__highlighted">Cell C1</td>
</tr>
<tr>
<td>2</td>
<td class="example-table__highlighted">Cell A2</td>
<td class="example-table__highlighted">Cell B2</td>
<td class="example-table__highlighted">Cell C2</td>
</tr>
<tr>
<td>3</td>
<td>Cell A3</td>
<td>Cell B3</td>
<td>Cell C3</td>
</tr>
</table>
</div>

## Selecting Columns

Using the **`column`** keyword, individual columns can be selected. For example, `column 2` will select the second column in a `Sheet`. By adding multiple columns to a `Collection<CellRange>`, multiple columns can be selected.

### Examples
The following `ColumnDeleter` block will delete the first two columns of a `Sheet`:

<div class="side-by-side__container">

```jayvee
block ExampleColumnDeleter oftype ColumnDeleter {
delete: [column A, column B];
}
```

<table>
<tr>
<td></td>
<td>A</td>
<td>B</td>
<td>C</td>
</tr>
<tr>
<td>1</td>
<td class="example-table__highlighted">Cell A1</td>
<td class="example-table__highlighted">Cell B1</td>
<td>Cell C1</td>
</tr>
<tr>
<td>2</td>
<td class="example-table__highlighted">Cell A2</td>
<td class="example-table__highlighted">Cell B2</td>
<td>Cell C2</td>
</tr>
<tr>
<td>3</td>
<td class="example-table__highlighted">Cell A3</td>
<td class="example-table__highlighted">Cell B3</td>
<td>Cell C3</td>
</tr>
</table>
</div>
3 changes: 3 additions & 0 deletions apps/docs/docs/user/cell-range.md.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2024 Friedrich-Alexander-Universitat Erlangen-Nurnberg

SPDX-License-Identifier: AGPL-3.0-only
2 changes: 1 addition & 1 deletion apps/docs/docs/user/runtime-parameters.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 9
sidebar_position: 10
---

# Runtime Parameters
Expand Down
22 changes: 17 additions & 5 deletions apps/docs/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@
}

.header-github-link:before {
background: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat;
display: flex;
height: 24px;
width: 24px;
content: "";
background: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat;
display: flex;
height: 24px;
width: 24px;
content: "";
}

.header-github-link:hover {
opacity: 0.6;
}
Expand All @@ -50,4 +51,15 @@
background: linear-gradient(45deg, var(--ifm-color-primary), var(--ifm-color-primary-lightest) 80%);
background-clip: text;
-webkit-text-fill-color: transparent;
}

.example-table__highlighted {
background-color: var(--ifm-color-primary-lightest);
}

.side-by-side__container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-evenly;
}
64 changes: 64 additions & 0 deletions apps/docs/versioned_docs/version-0.5.0/dev/01-intro.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
sidebar_position: 1
---

# Introduction for Jayvee Developers

import MascotImageUrl from '@site/static/img/mascots/mascot3.png';

<div style={{ display: 'flex', flexDirection: 'row', flexWrap: 'none', alignItems: 'center'}}>
<div>
<img src={MascotImageUrl} width="400px" style={{ float: 'left' }} />
</div>

<span className={"text--center"}>
<h2>"On the tracks of Jayvee's internals"</h2>
</span>
</div>

## How to contribute

In order to contribute to the Jayvee project, please have a look at our [contribution guide](https://github.com/jvalue/jayvee/blob/main/CONTRIBUTING.md). Before planning a contribution, please read the [design principles](./05-design-principles.md) and consider if your changes fit the vision expressed there.

The overall project is licensed under the `AGPL-3.0-only` license and is compliant to the [REUSE Specification](https://reuse.software/spec/) by the [Free Software Foundation Europe](https://fsfe.org/).
Because of this, contributions are required to adhere to the license and follow that specification.
More details on this topic can be found [here](./02-dev-processes/03-licensing-and-copyright.md).

And last but not least, please read and follow our [code of conduct](https://github.com/jvalue/jayvee/blob/main/CODE_OF_CONDUCT.md).

## Project overview

The Jayvee repository is located [here](https://github.com/jvalue/jayvee) on GitHub.
It uses an [Nx mono-repository](https://nx.dev/) setup and contains all related projects, most notably the Jayvee language server and interpreter.
Please have a look at the [architecture overview](./03-architecture-overview.md) for more details.

## Prerequisites

Node.js and npm are required for development.
It is recommended to use their LTS version to avoid any potential compatibility issues.
Also, refer to this [quick start guide](https://github.com/jvalue/jayvee#development-quickstart) for developers.

In order to run the Jayvee VS Code extension during development, VS Code is required as IDE.
Using VS Code also allows installing the [Langium VS Code extension](https://marketplace.visualstudio.com/items?itemName=langium.langium-vscode) for better IDE support when working with Langium grammar files.

## Resources for getting started

### Langium

- [**Langium documentation**](https://langium.org/docs/)
- Practical examples using Langium:
- [Langium examples](https://github.com/langium/langium/tree/main/examples): Official example languages by Langium
- [Langium's grammar language](https://github.com/langium/langium/tree/main/packages/langium): The implementation of Langium's own grammar language
- [Language server for SQL](https://github.com/langium/langium-sql): An implementation of a language server for SQL
- [MiniLogo DSL](https://github.com/langium/langium-minilogo): A domain-specific language for drawing pictures
- [Lox language](https://github.com/langium/langium-lox): An implementation of the Lox scripting language (also see the "Crafting Interpreters" book below)
- [SimpleUI DSL](https://github.com/TypeFox/langium-ui-framework): A domain-specific language for generating user interfaces
- [STPA-DSL](https://github.com/kieler/stpa): A domain-specific language for System-Theoretic Process Analysis
- [Langium playground](https://langium.org/playground/): A tool for testing Langium grammars and visualizing resulting ASTs
- [Typefox blog](https://www.typefox.io/blog/): A blog by the company behind Langium, mostly posting Langium-related content.

### Building compilers / interpreters / DSLs

- [Crafting Interpreters](https://craftinginterpreters.com/contents.html): A book by Robert Nystrom on implementing an interpreter for the Lox scripting language
- [DSL Engineering](https://voelter.de/dslbook/markusvoelter-dslengineering-1.0.pdf): A book by Markus Voelter on designing, implementing and using domain-specific languages
- [Awesome Compilers](https://github.com/aalhour/awesome-compilers#readme): A list featuring many resources on compilers and interpreters
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2023 Friedrich-Alexander-Universitat Erlangen-Nurnberg

SPDX-License-Identifier: AGPL-3.0-only
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Language Design Process (RFCs)
sidebar_position: 1
---

We use RFCs to discuss changes to the language before implementing them. You can have a look at all closed (accepted / rejected) RFCs [here](https://github.com/jvalue/jayvee/pulls?q=is%3Apr+is%3Aclosed+RFC+), and all RFCs under discussion [here](https://github.com/jvalue/jayvee/pulls?q=is%3Apr+is%3Aopen+RFC).

If you want to contribute an RFC please follow these steps:
1. Make a copy of the **template** at `rfc/0000-rfc-template.md` and place it into the `rfc` folder.
2. Create a draft for the RFC on a new branch. Follow the `TODOs` in template to do so.
3. Open a pull request with prefix `RFC <number>` in the title.
4. Address the reviews. Consider opening a new PR if major things need to be addressed and the discussion log becomes too confusing.
5. Once accepted, create an issue with the necessary steps to implement the RFC.
Loading

0 comments on commit 133bff6

Please sign in to comment.