Skip to content

Commit

Permalink
Merge branch 'main' into devices-text-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
harivyasi committed Aug 20, 2024
2 parents 9f78314 + dba38d7 commit ecc1265
Show file tree
Hide file tree
Showing 327 changed files with 11,485 additions and 6,458 deletions.
44 changes: 31 additions & 13 deletions .devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/javascript-node
{
"name": "Docusaurus",
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"image": "mcr.microsoft.com/devcontainers/javascript-node",

// Configure tool-specific properties.
Expand All @@ -17,31 +14,52 @@
"*.mdx": "markdown"
},
"editor.rulers": [100],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.markdownlint": true
"source.fixAll.eslint": "always",
"source.fixAll.markdownlint": "always"
},
"cSpell.enableFiletypes": ["md", "mdx", "!js", "!json", "!jsonc"],
"cSpell.words": ["Chemotion", "helpdesk"],
"markdownlint.config": {
"MD033": { "allowed_elements": ["kbd"] }
"eslint.options": {
"extensions": [".js", ".jsx", ".md", ".mdx", ".ts", ".tsx"]
},
"markdownlint.run": "onSave"
"eslint.validate": [
"markdown",
"mdx",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"Workspace_Formatter.includePattern": ["*.mdx", "*.md"],
"cSpell.enableFiletypes": ["md", "mdx", "!js", "!json", "!jsonc"],
"cSpell.words": [
"Chemotion",
"helpdesk",
"Labimotion",
"fortawesome",
"fontawesome",
"subcomponent",
"wellplate"
],
"cSpell.suggestionMenuType": "quickFix"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint",
"streetsidesoftware.code-spell-checker",
"DavidAnson.vscode-markdownlint"
"esbenp.prettier-vscode",
"franneck94.workspace-formatter"
]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3000],

// Use 'postCreateCommand' to run commands after the container is created.
// Use 'updateContentCommand' to run commands after the container is created and before the project is cloned.
"updateContentCommand": "npm install -g npm",

// Use 'postCreateCommand' to run commands after the project has been cloned into the container.
"postCreateCommand": "npm install",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
Expand Down
14 changes: 3 additions & 11 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": ["plugin:react/recommended", "airbnb"],
"overrides": [],
"extends": ["plugin:@docusaurus/recommended"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
"ecmaVersion": "latest"
},
"plugins": ["react"],
"rules": {}
"plugins": ["react", "frontmatter"]
}
12 changes: 11 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,23 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"

- name: Download YT Thumbnails
run: |
for file in $(grep -roP 'youtube-nocookie.com/embed/.{11}' docs | rev | cut -d / -f 1 | rev); do
if [ ! -f "static/img/yt_thumbnails/$file.jpg" ]; then
wget -O "static/img/yt_thumbnails/$file.jpg" "https://img.youtube.com/vi/$file/hqdefault.jpg" || wget -O "static/img/yt_thumbnails/$file.jpg" "https://img.youtube.com/vi/$file/0.jpg"
fi
done
- name: Build
id: build
run: |
npm install -g npm
npm install
npm run build --if-present
npm run build
- name: Deploy
if: steps.build.outcome == 'success' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'skip deploy')
Expand Down
6 changes: 3 additions & 3 deletions docs/_old_pages/2020-01-31.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ author: Nicole Jung
---

<img
src={require('/img/310120.png').default}
alt="select authors"
src={require('/img/310120.png').default}
alt="select authors"
/>

For new submissions: please ensure that you add yourself as author and not only as contributor which is set as default.
The change of the procedure applies to the tab to initialize the publication and review process.

We introduced this procedure to ensure that one is able to add data on behalf of others. A requirement for a listing as
author is the registration in the chemotion repository. If you use this function, please take care that all authors
author is the registration in the Chemotion repository. If you use this function, please take care that all authors
agreed to be mentioned.
2 changes: 1 addition & 1 deletion docs/_old_pages/2020-02-25.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Data Assignment in Chemotion Repository"
author: Nicole Jung
---

This video shows the basics to add data to the right place in the repository chemotion.
This video shows the basics to add data to the right place in the Chemotion repository.

<iframe width="640" height="360" src="https://www.youtube-nocookie.com/embed/EpJmuMFtvag" frameborder="0" allow="accelerometer;
autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen></iframe>
Expand Down
2 changes: 0 additions & 2 deletions docs/_old_pages/Newsroom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ title: "Newsroom"
---

This is the blog of the Chemotion Repository.


4 changes: 4 additions & 0 deletions docs/_old_pages/native_installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ slug: native_installation
---

:::info

Documentation and processes are being reworked and improved at the moment. It may happen that you miss information. If you face problems, please let us know, we are there to support you. You may contact the [helpdesk](https://helpdesk.nfdi4chem.de) if you plan to install or test Chemotion.

:::

This documentation detailed an installation solution example of the the chemotion_ELN system and associated services on Ubuntu servers with NGINX as web server and Phusion-passenger as app server.
Expand All @@ -24,7 +26,9 @@ The code for the web-application (server- and client- sides) and the workers is
For a few users, all this components can be installed on a single machine (2 cpu s, 4GB memory) using the [installation script](https://github.com/ComPlat/chemotion_ELN/blob/development-5/scripts/install_production.sh) that will set up all these components and basic configurations.

:::info

Use a sudo user, not root, to run the script!

:::

![architecture_ELN](/img/architecture_ELN_base.svg)
Expand Down
2 changes: 1 addition & 1 deletion docs/_old_pages/review_glossary.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ author: Nicole Jung

All review reports and comments are given with the initials of the referee (e.g. "NJ:"). Hints for a better understanding of the referees' comments are given in brackets "[hint]". Please refer to the following descriptions if _short comments_ are given in your review reports:

<!--truncate-->
{/* truncate */}

- **"amount"**: Please check the given amount of your starting materials/reagents in table and text for inaccuracies [text-table]. Brackets may give an indication where the inconsistency was detected.
- **"analytics-format"**: Please check the formatting of your analytic contents. Please have a look at the How-To page ["Details for analytics"](details_analytics).
Expand Down
5 changes: 2 additions & 3 deletions docs/development/ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ Our CI is configured in this following workflow [file](https://github.com/ComPla

Because of large Ruby and npm dependencies, the CI is running inside a Docker container with prebuilt libraries
in order to speed up CI runs.
Our Docker image for CI is hosted at <https://hub.docker.com/r/complat/complat-ubuntu-runner>.
Our Docker image for CI is hosted at [here](https://hub.docker.com/r/complat/complat-ubuntu-runner).
The CI image is built from the following [Dockerfile](https://github.com/ComPlat/chemotion_ELN/blob/main/Dockerfile.github-ci).

We're using a PostgreSQL container to run the database alongside the ELN application:
<https://hub.docker.com/_/postgres>.
We're using a [PostgreSQL container](https://hub.docker.com/_/postgres) to run the database alongside the ELN application.

## Troubleshooting

Expand Down
15 changes: 5 additions & 10 deletions docs/development/debugging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,22 @@ title: Debugging

## JavaScript

You can use your browser's developer tools:

<https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools>
You can use your browser's [developer tools](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools).

## Ruby (Rails application)

Below are two options for "live"-debugging Ruby code (i.e., while the application is running).

### Pry

Install [`pry`](https://github.com/pry/pry) and set `binding.pry` breakpoints in your Ruby code:
<https://docs.gitlab.com/ee/development/pry_debugging.html>. Pry should work independently of your IDE.
Install [`pry`](https://github.com/pry/pry) and set `binding.pry` breakpoints to [debug](https://docs.gitlab.com/ee/development/pry_debugging.html) your Ruby code. Pry should work independently of your IDE.

### Visual Studio Code

If you're using the Visual Studio Code IDE, you can use it's visual / GUI debugger.
The configuration depends on your local setup, however, following these instructions should get you started fine:

<https://andyv.me/til/debug-a-ruby-on-rails-server-using-vs-code/>.
The configuration depends on your local setup, however, [these instructions](https://andyv.me/til/debug-a-ruby-on-rails-server-using-vs-code/) could help you get started.

In case debugging doesn't work yet, have a look at the following resources to fine-tune your configuration:

<https://github.com/rubyide/vscode-ruby/blob/main/docs/debugger.md>
<https://github.com/Microsoft/vscode-recipes/blob/2174a750102a76142378ea08dbbb4a576dc6d1d5/debugging-Ruby-on-Rails/README.md>
0. [Rubyide Debugger](https://github.com/rubyide/vscode-ruby/blob/main/docs/debugger.md)
1. [VSCode recipe for Ruby on Rails](https://github.com/Microsoft/vscode-recipes/blob/2174a750102a76142378ea08dbbb4a576dc6d1d5/debugging-Ruby-on-Rails/README.md)
73 changes: 40 additions & 33 deletions docs/development/environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ title: Development Environment
---

:::info

[Contact us](/helpdesk) us if you're having trouble setting up your development environment.

:::

## Prerequisites
Expand All @@ -20,15 +22,16 @@ This keeps your machine free of clutter, and more importantly,
it can ensure consistent development environments across contributors (i.e., avoiding "works on my machine" scenarios).

In the following you find guides for setting up a dockerized development environment for the Chemotion ELN on
[Windows](#windows-heading-id), [Linux](#linux-heading-id), and [macOS](#macos-heading-id).
[Windows](environment#windows), [Linux](environment#linux), and [macOS](environment#macos).

## Windows

## Windows {#windows-heading-id}
:::important[Call to action]

:::important Call to action
The following instructions are tested on Windows 10 only.
If you're on Windows 11, please consider contributing your experiences.
You can propose additions / changes to this documentation by opening a pull request on
<https://github.com/ComPlat/chemotion_saurus>. Thank you!
You can propose additions / changes to this documentation by opening a pull request in its [repository](https://github.com/ComPlat/chemotion_saurus). Thank you!

:::

This guide will help you getting started developing with containers on Windows using `Docker Desktop` along with the [Windows Subsystem for Linux](https://learn.microsoft.com/en-us/windows/wsl/about) (referred to as `WSL` in the following).
Expand Down Expand Up @@ -75,9 +78,9 @@ You won't be able to run bash scripts from PowerShell.

On your Windows machine, [open the `Ubuntu` terminal](https://devblogs.microsoft.com/commandline/a-guide-to-invoking-wsl/#comments).
Next, start `Docker Desktop`. You can confirm that `Docker Desktop` is running by typing `docker --version` in the `Ubuntu` terminal.
If you get a response you're now ready to run the ELN in a [Docker container](#eln-in-docker) (any IDE) or in a [Visual Studio Code devcontainer](#eln-in-devcontainer) (recommended!).
If you get a response you're now ready to run the ELN in a [Docker container](#eln-in-docker-container) (any IDE) or in a [Visual Studio Code devcontainer](#eln-in-devcontainer) (recommended!).

## Linux {#linux-heading-id}
## Linux

We assume that you're on a fresh installation of a Linux operating system, either on a physical or virtual machine.
The instructions have been tested on 64-bit Ubuntu Focal 20.04 (LTS) and 22.04 (LTS).
Expand All @@ -86,34 +89,36 @@ The instructions have been tested on 64-bit Ubuntu Focal 20.04 (LTS) and 22.04 (

#### Docker Engine

Install Docker Engine according to <https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository>,
and make sure that non-root users can issue Docker commands: <https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user>.
Install Docker Engine according to the [official instructions](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository),
and make sure that non-root users can issue Docker commands by following the post-installation [instructions](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user).

You're now ready to run the ELN in a [Docker container](#eln-in-docker-container) (any IDE) or in a [Visual Studio Code devcontainer](#eln-in-devcontainer) (recommended!).

You're now ready to run the ELN in a [Docker container](#eln-in-docker) (any IDE) or in a [Visual Studio Code devcontainer](#eln-in-devcontainer) (recommended!).
## macOS

## macOS {#macos-heading-id}
:::important[Call to action]

:::important Call to action
We haven't extensively tested our containerized development environment on macOS.
If you're on macOS, please consider contributing your experiences.
You can propose additions / changes to this documentation by opening a pull request on
<https://github.com/ComPlat/chemotion_saurus>. Thank you!
You can propose additions / changes to this documentation by opening a pull request in its [repository](https://github.com/ComPlat/chemotion_saurus). Thank you!

:::

Install Docker (<https://docs.docker.com/desktop/install/mac-install/>)
and run the ELN in a [Docker container](#eln-in-docker) (any IDE)
[Install Docker](https://docs.docker.com/desktop/install/mac-install/)
and run the ELN in a [Docker container](#eln-in-docker-container) (any IDE)
or in a [Visual Studio Code devcontainer](#eln-in-devcontainer) (recommended!).

Alternatively, we recommend setting up a Ubuntu virtual machine and following the [Linux installation](#linux-heading-id).
Alternatively, we recommend setting up a Ubuntu virtual machine and following the [Linux installation](environment#linux).

## ELN in a Docker container {#eln-in-docker}
## ELN in Docker container

:::info[Operating system requirements]

Make sure you've followed the instructions for your operating system ([Windows](environment#windows), [Linux](environment#linux), [macOS](environment#macos)).

:::caution operating system requirements
Make sure you've followed the instructions for your operating system ([Windows](#windows-heading-id), [Linux](#linux-heading-id), [macOS](#macos-heading-id)).
:::

Start by cloning <https://github.com/ComPlat/chemotion_ELN>.
The repository contains the ELN's source code and Docker configuration (`docker-compose.dev.yml`).
Start by cloning the [repository](https://github.com/ComPlat/chemotion_ELN). It contains the ELN's source code and Docker configuration (`docker-compose.dev.yml`).

From the root of the repository (i.e., `pwd` is `chemotion_ELN`),
you can instantiate the development environment with
Expand Down Expand Up @@ -158,34 +163,36 @@ To stop the development environment (i.e., shut down all three containers) run
docker compose -f docker-compose.dev.yml down
```

## ELN in a Visual Studio Code devcontainer {#eln-in-devcontainer}
## ELN in devcontainer

:::info[Operating system requirements]

Make sure you've followed the instructions for your operating system ([Windows](#windows), [Linux](#linux), [macOS](#macos)).

:::caution operating system requirements
Make sure you've followed the instructions for your operating system ([Windows](#windows-heading-id), [Linux](#linux-heading-id), [macOS](#macos-heading-id)).
:::

:::caution Windows Docker Desktop
:::info[Windows Docker Desktop]

If you're using Docker Desktop (opposed to the Docker Engine on Linux)
make sure that Docker Desktop is running before starting the devcontainer.

:::

Visual Studio Code devcontainers allow you to run your entire development environment inside a Docker container.
For more context visit <https://code.visualstudio.com/docs/devcontainers/containers>.
For more context visit its [documentation](https://code.visualstudio.com/docs/devcontainers/container).

### Dependencies

#### Visual Studio Code

Install Visual Studio Code (referred to as `VSCode` in the following) on you operating system: <https://code.visualstudio.com>.
Install [Visual Studio Code](https://code.visualstudio.com) (referred to as `VSCode` in the following) on you operating system.
Note that if you're on Windows, please install VSCode on Windows, not on the Ubuntu system that's running under WSL.

Once you've got VSCode running, install the `Dev Containers` extension (ms-vscode-remote.remote-containers):
<https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers>.
Once you've got VSCode running, install the `Dev Containers` extension [`ms-vscode-remote.remote-containers`](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).

### Setup

Start by cloning <https://github.com/ComPlat/chemotion_ELN>.
The repository contains the ELN's source code as well as the configuration for the devcontainer (`.devcontainer/`).
Start by cloning [the repository](https://github.com/ComPlat/chemotion_ELN). It contains the ELN's source code as well as the configuration for the devcontainer (`.devcontainer/`).

Start VSCode from the root of the repository (i.e., `pwd` is `chemotion_ELN`), by running

Expand All @@ -208,7 +215,7 @@ development environment.

### Clean Docker

Make sure that you're working with a clean Docker system: <https://docs.docker.com/config/pruning/>.
Make sure that you're working with a clean Docker system by [pruning](https://docs.docker.com/config/pruning/) it.

### Remove `node_modules` directory

Expand Down
Loading

0 comments on commit ecc1265

Please sign in to comment.