Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update README (DSP-1142) #1771

Merged
merged 6 commits into from Dec 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Expand Up @@ -105,7 +105,7 @@ Then we need to start knora-api after loading the data:
$ make stack-up
```

Then try opening [http://localhost:3333/v1/resources/http%3A%2F%2Frdfh.ch%2F0803%2Fc5058f3a](http://localhost:3333/v1/resources/http%3A%2F%2Frdfh.ch%2F0803%2Fc5058f3a) in a web browser. You should see a response in JSON describing a book.
Then try opening [http://localhost:3333/v2/resources/http%3A%2F%2Frdfh.ch%2F0803%2Fc5058f3a](http://localhost:3333/v2/resources/http%3A%2F%2Frdfh.ch%2F0803%2Fc5058f3a) in a web browser. You should see a response in JSON-LD describing a book.

To shut down the Knora-Stack:

Expand Down Expand Up @@ -150,7 +150,11 @@ implementing the desired functionality.

Use `camelCase` for names of classes, variables, and functions. Make names descriptive, and don't worry if they're long.

Format your code consistently. We [IntelliJ IDEA](https://www.jetbrains.com/idea) to format code, with 4 spaces indentation. Use whitespace to make your code easier to read. Add lots of implementation comments describing what your code is doing, how it works, and why it works that way.
Use [Scalafmt](https://scalameta.org/scalafmt/) in [IntelliJ IDEA](https://www.jetbrains.com/idea) to format Scala code.

Use whitespace to make your code easier to read.
Add lots of implementation comments describing what your code is doing,
how it works, and why it works that way.

### Tests

Expand Down
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 7 additions & 5 deletions docs/05-internals/development/intellij-config.md
Expand Up @@ -49,14 +49,16 @@ License along with Knora. If not, see <http://www.gnu.org/licenses/>.
on Bazel logo `Sync Project with Build Files`. This needs to be repeated every time there is a change in a `BUILD.bazel` file.

![screenshot 'Bazel sync'](figures/bazel-sync.png)

- Make sure that the tab size is set correctly to **4 spaces** (so you
can use automatic code reformatting): `Preferences -> Code Style ->
Scala`:

![screenshot 'setting tab size'](figures/setting-tab-space.png)
## Setup IntelliJ Code Formatter

Use [Scalafmt](https://scalameta.org/scalafmt/) in [IntelliJ IDEA](https://www.jetbrains.com/idea) to format Scala code.

In IntelliJ editor setting (`Preferences -> Editor -> Code Style -> Scala`), choose `Scalafmt` as formatter and check the box for
`Reformat on file save` as shown below:

![screenshot 'setting tab size'](figures/setup_formatting.png)

## Use IntelliJ IDEA's Run/Debugger Configuration with Knora

First, you need to create an application configuration to run or debug a code. Here the configuration is explained using a test as an
Expand Down