Compare commits
2
Commits
official
...
496413415f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
496413415f
|
||
|
|
7c5e657e77
|
@@ -0,0 +1,47 @@
|
|||||||
|
name: Compile manual
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "**"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ci:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: catthehacker/ubuntu:act-latest
|
||||||
|
if: github.event.pull_request.draft == false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: "3.2"
|
||||||
|
|
||||||
|
- name: Setup Fontist
|
||||||
|
uses: fontist/setup-fontist@v2
|
||||||
|
|
||||||
|
- name: Install Fonts
|
||||||
|
run: fontist manifest install docs/fonts.yaml
|
||||||
|
|
||||||
|
- uses: typst-community/setup-typst@v5
|
||||||
|
with:
|
||||||
|
typst-version: "0.15.0"
|
||||||
|
zip-packages: docs/requirements.json
|
||||||
|
cache-local-packages: true
|
||||||
|
token: ""
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
typst compile \
|
||||||
|
--root . \
|
||||||
|
--font-path ~/.fontist/fonts \
|
||||||
|
docs/manual.typ \
|
||||||
|
docs/manual.pdf
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: christopherhx/gitea-upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: manual
|
||||||
|
path: docs/manual.pdf
|
||||||
@@ -51,16 +51,7 @@ This framework is being developed as part of a Bachelor's Thesis by Louis Herede
|
|||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
<!--
|
Hereafter is a description of the commands you can use with Midas. For a full description, refer to [the manual](./docs/manual.pdf).
|
||||||
check
|
|
||||||
compile
|
|
||||||
format
|
|
||||||
highlight
|
|
||||||
parse
|
|
||||||
dump_registry
|
|
||||||
types
|
|
||||||
validate
|
|
||||||
-->
|
|
||||||
|
|
||||||
### Type Checking
|
### Type Checking
|
||||||
|
|
||||||
@@ -78,6 +69,10 @@ midas compile -t types.midas source.py
|
|||||||
|
|
||||||
With the `compile` command, you can process a source Python file, with any number of custom type definition files (`-t FILE` option), and the type checker will verify the coherence of your program and generate the runnable code with valid syntax and runtime assertions.
|
With the `compile` command, you can process a source Python file, with any number of custom type definition files (`-t FILE` option), and the type checker will verify the coherence of your program and generate the runnable code with valid syntax and runtime assertions.
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> By default, any type checking error aborts the compilation and the generator is not run. You can bypass this behaviour with the `--ignore-errors` flag.
|
||||||
|
> Only use this flag if you know what you are doing as it will produce a possibly unsafe program and goes against the whole purpose of Midas
|
||||||
|
|
||||||
### Formatting
|
### Formatting
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@@ -143,7 +138,7 @@ This command lets you validate a Midas definition file by running the parser and
|
|||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
Several snapshot tests are available to assert the good behaviour of the parsers and type checker. They can be run as follows:
|
Several snapshot tests are available to assert the good behaviour of the parser, type checker and generator. They can be run as follows:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
uv run -m tests.midas run -a
|
uv run -m tests.midas run -a
|
||||||
@@ -152,7 +147,16 @@ uv run -m tests.checker run -a
|
|||||||
uv run -m tests.generator run -a
|
uv run -m tests.generator run -a
|
||||||
```
|
```
|
||||||
|
|
||||||
**Available subcommands:**
|
Alternatively, you can run all tests by executing the `tests` module directly:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
uv run -m tests
|
||||||
|
```
|
||||||
|
|
||||||
|
When running only one test group, you may use one of the following subcommands.\
|
||||||
|
Not specifying any subcommand is equivalent to running `run -a`
|
||||||
|
|
||||||
|
**Available subcommands**:
|
||||||
- Run all tests: `run -a`
|
- Run all tests: `run -a`
|
||||||
- Run specific tests: `run tests/cases/test1.py tests/cases/test2.py ...`
|
- Run specific tests: `run tests/cases/test1.py tests/cases/test2.py ...`
|
||||||
- Update all tests: `update -a`
|
- Update all tests: `update -a`
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
Source Sans Pro:
|
||||||
|
Source Sans 3:
|
||||||
+10265
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"preview": {},
|
||||||
|
"local": {
|
||||||
|
"codly": "https://github.com/LordBaryhobal/codly-fix-v15/archive/refs/tags/v1.3.1-fix.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user