Skip to content

Commit

Permalink
Merge pull request #1 from getgrit/starter-dough
Browse files Browse the repository at this point in the history
feat: initialize python stdlib
  • Loading branch information
seren5240 authored Jul 18, 2023
2 parents 155c79b + f31f18e commit 9d8d13b
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Run grit patterns test

env:
GRIT_TELEMETRY_DISABLED: 'true'

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ${{ matrix.runner }}

strategy:
matrix:
runner: [ubuntu-22.04, nscloud-ubuntu-22.04-amd64-4x16]
node-version: [16.16, 18.x, 20.x]

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install @getgrit/launcher
run: npm install -g @getgrit/launcher

- name: Run doctor
run: npx grit doctor

- name: Run grit patterns test
run: npx grit patterns test
2 changes: 2 additions & 0 deletions .grit/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
engine.log
.gritmodules
2 changes: 2 additions & 0 deletions .grit/grit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version: 0.0.1
patterns: []
24 changes: 24 additions & 0 deletions .grit/patterns/print_to_log.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Print to log
---

Rewrite `print` statements using `log`.

```grit
engine marzano(0.1)
language python
`print($x)` => `log($x)`
```

## Transforms a log statement

```python
print("hello world!")
log("this is python")
```

```python
log("hello world!")
log("this is python")
```

0 comments on commit 9d8d13b

Please sign in to comment.