Skip to content

Commit

Permalink
Merge branch 'main' into fix-data_types
Browse files Browse the repository at this point in the history
  • Loading branch information
harivyasi committed Oct 1, 2024
2 parents b26f115 + 7487e53 commit 3cfec35
Show file tree
Hide file tree
Showing 545 changed files with 47,526 additions and 17,122 deletions.
47 changes: 31 additions & 16 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,34 +14,52 @@
"*.mdx": "markdown"
},
"editor.rulers": [100],
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always",
"source.fixAll.markdownlint": "always"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"eslint.options": {
"extensions": [".js", ".jsx", ".md", ".mdx", ".ts", ".tsx"]
},
"eslint.validate": [
"markdown",
"mdx",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"Workspace_Formatter.includePattern": ["*.mdx", "*.md"],
"cSpell.enableFiletypes": ["md", "mdx", "!js", "!json", "!jsonc"],
"cSpell.words": ["Chemotion", "helpdesk"],
"markdownlint.config": {
"MD033": { "allowed_elements": ["kbd"] }
},
"markdownlint.run": "onSave"
"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"
"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
7 changes: 7 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": ["plugin:@docusaurus/recommended"],
"parserOptions": {
"ecmaVersion": "latest"
},
"plugins": ["react", "frontmatter"]
}
55 changes: 20 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,38 @@
name: chemotion_saurus GitHub Actions

on:
workflow_dispatch:
push:
branches: [main]

jobs:
build:
if: ${{ true }}
build_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/cache@v2
- uses: actions/setup-node@v4
with:
path: build
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
node-version: 20
cache: "npm"

- name: Build
env:
ALGOLIA_SEARCH_API_KEY: ${{ secrets.ALGOLIA_SEARCH_API_KEY }}
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
INDEX_NAME: ${{ secrets.INDEX_NAME }}
- name: Download YT Thumbnails
run: |
npm i
npm run build --if-present
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: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: public
path: build

deploy:
if: "!contains(github.event.commits[0].message, 'skip deploy')"
runs-on: ubuntu-latest
needs: build
steps:
- name: Download build artifacts
uses: actions/download-artifact@v2
with:
name: public
path: public
- name: Build
id: build
run: |
npm install -g npm
npm install
npm run build
- name: Setup ssh and deploy2
- name: Deploy
if: steps.build.outcome == 'success' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'skip deploy')
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
Expand All @@ -62,4 +47,4 @@ jobs:
touch ~/.ssh/known_hosts
ssh-keyscan github.com >> ~/.ssh/known_hosts
chmod 600 ~/.ssh/known_hosts
rsync -e "ssh -o StrictHostKeyChecking=no" -az --delete ./public/ docusaurus@eln.chemotion.net:chemotion_saurus/.
rsync -e "ssh -o StrictHostKeyChecking=no" -az --delete ./build/ saurus@chemotion.net:docs/chemotion_saurus/.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,16 @@ npm run serve
![code status](https://github.com/ComPlat/chemotion_saurus/actions/workflows/build.yml/badge.svg)

The website is deployed with GitHub Actions [here](https://github.com/ComPlat/chemotion_saurus/blob/aa6fe5cc1ade8517f855a7df1ef4f6d648c67f26/.github/workflows/build.yml#L40).


## Acknowledgments

This project has been funded by the **[DFG]**.

[![DFG Logo]][DFG]


Funded by the [Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)](https://www.dfg.de/) under the [National Research Data Infrastructure – NFDI4Chem](https://nfdi4chem.de/) – Projektnummer **441958208** since 2020.

[DFG]: https://www.dfg.de/en/
[DFG Logo]: https://chemotion.net/img/logos/DFG_logo.png
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-16.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ author: Nicole Jung
See the new You-Tube video to learn how to add collaborators to your profile. Collaborators should be created to enable
the addition of additional authors to data publications in the publishing process:

<iframe width="640" height="360" src="https://www.youtube.com/embed/mNL0REP76Gc" frameborder="0" allow="accelerometer;
<iframe width="640" height="360" src="https://www.youtube-nocookie.com/embed/mNL0REP76Gc" frameborder="0" allow="accelerometer;
autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen></iframe>
4 changes: 2 additions & 2 deletions docs/_old_pages/2020-02-25.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ 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.com/embed/EpJmuMFtvag" frameborder="0" allow="accelerometer;
<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>

Another video, part B, will be provided soon. Part B will then give some examples included to a demo of the repository.
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
3 changes: 1 addition & 2 deletions docs/_old_pages/review_glossary.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
id: review_glossary
title: Review Glossary
author: Nicole Jung
---
Expand All @@ -8,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
25 changes: 0 additions & 25 deletions docs/chemconverter/readers.mdx

This file was deleted.

32 changes: 0 additions & 32 deletions docs/chemconverter/troubleshooting.mdx

This file was deleted.

7 changes: 0 additions & 7 deletions docs/chemscanner/index.mdx

This file was deleted.

1 change: 0 additions & 1 deletion docs/development/architecture.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
id: architecture
title: Application Architecture
---

Expand Down
6 changes: 2 additions & 4 deletions docs/development/ci.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
id: ci
title: Continuous Integration
---

Expand All @@ -16,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
16 changes: 5 additions & 11 deletions docs/development/debugging.mdx
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
---
id: debugging
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)
Loading

0 comments on commit 3cfec35

Please sign in to comment.