Skip to content

Commit

Permalink
feat: Integrate prettier and black for code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
phorward committed Oct 19, 2023
1 parent 75f4222 commit 44595ff
Show file tree
Hide file tree
Showing 16 changed files with 3,523 additions and 904 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ all: \

$(LOGICS_PY): logics.par
unicc -swo $(patsubst %.py,%,$@) -l python $?
cd logics-py; pipenv install --dev; pipenv run fmt

$(LOGICS_JS): logics.par
unicc -swo $(patsubst %.js,%,$@) -l javascript $?
cd logics-js; npm i; npm run fmt

clean:
rm $(LOGICS_JS) $(LOGICS_PY)
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Previous uses of Logics included
Since Logics is used on both the client and server side, the language has been implemented in two separate implementations:

- [logics-js](https://www.npmjs.com/package/logics-js) is a pure (vanilla) JavaScript implementation of Logics provided as npm-package.
- [logics-py](https://pypi.org/project/logics-py/) is a pure Python 3.10 implementation of Logics provided as PyPI-package, with no other dependencies.
- [logics-py](https://pypi.org/project/logics-py/) is a pure Python 3.11 implementation of Logics provided as PyPI-package, with no other dependencies.

Both packages are under recent development and not stable right now. They are maintained in separate version numbers, which is planned to be changed soon, when they become almost feature-complete.

Expand Down Expand Up @@ -131,6 +131,15 @@ x * x

### logics-js

#### Formatting

To format the source code, use [prettier](https://www.npmjs.com/package/prettier) as follows:

```bash
cd logics-js
npm run fmt
```

#### Tests

Tests are implemented using [Mocha](https://mochajs.org/):
Expand All @@ -151,6 +160,15 @@ npm publish

### logics-py

#### Formatting

To format the source code, use [Black](https://github.com/psf/black) as follows:

```
cd logics-py
pipenv run fmt
```

#### Tests

Tests are implemented using [pytest](https://pytest.org):
Expand Down
Loading

0 comments on commit 44595ff

Please sign in to comment.