Skip to content

Commit d985510

Browse files
committed
Switched to Lerna Monorepo, streamlined project with pid-component, added Somesy and project metadata
1 parent 2c0bbd7 commit d985510

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+63954
-7818
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
"react/jsx-no-bind": "off",
1212
"array-callback-return": "error"
1313
},
14-
"ignorePatterns": ["*.config.ts", "react-library/*"]
14+
"ignorePatterns": ["*.config.ts", "packages/react-library/*"]
1515
}

.github/dependabot.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/deploy-storybook.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,30 @@ on:
66

77
jobs:
88
build-component:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- name: Checkout
12-
uses: actions/checkout@v4.2.2
13-
- name: Build
14-
run: npm ci
15-
16-
deploy-storybook:
179
runs-on: ubuntu-latest
1810
permissions:
1911
contents: read
2012
pages: write
2113
id-token: write
22-
2314
steps:
24-
- name: Checkout
25-
uses: actions/checkout@v4.2.2
26-
- name: Deploy Storybook to GitHub Pages
27-
uses: bitovi/github-actions-storybook-to-github-pages@v1.0.3
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
- name: npm ci
20+
run: npm ci
21+
- name: Build component
22+
run: npm run build
23+
working-directory: packages/stencil-library
24+
- name: Build Storybook
25+
run: npm run build-storybook
26+
working-directory: packages/stencil-library
27+
- name: Upload Storybook to GitHub Pages
28+
uses: actions/upload-pages-artifact@v3
29+
with:
30+
path: "packages/stencil-library/storybook-static"
31+
32+
- name: Deploy to GitHub Pages
33+
uses: actions/deploy-pages@v4
2834
with:
29-
path: storybook-static
30-
build_command: |
31-
npm run build
32-
npm run build-storybook
35+
token: ${{ github.token }}

.github/workflows/github-npm-publish.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/npm-ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
name: NPM Clean Install
1+
name: NPM CI
2+
3+
permissions:
4+
contents: read
25

36
on:
47
push:
@@ -12,14 +15,11 @@ jobs:
1215
strategy:
1316
matrix:
1417
# Use both LTS releases and latest one for tests
15-
node: [ 22 ]
18+
node: [ 18, 20, 22, 24 ]
1619
steps:
17-
- uses: actions/checkout@v4.2.2
20+
- uses: actions/checkout@v4
1821
- uses: actions/setup-node@v4
1922
with:
2023
node-version: ${{ matrix.node }}
21-
- name: Clean install and lint
22-
run: |
23-
rm package-lock.json
24-
npm i
25-
npm run lint
24+
- run: npm ci
25+
- run: npx lerna run build
Lines changed: 79 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,92 @@
1-
# Derived from: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
2-
name: Node.js Package to npmjs.com
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+
name: Node.js Package
5+
36
on:
47
release:
58
types: [ published ]
9+
workflow_dispatch: # Added manual trigger option
10+
11+
permissions:
12+
contents: write
13+
packages: write
614

715
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
cache: 'npm' # Added caching
26+
- run: npm ci
27+
- run: npx lerna run build
28+
# - run: npx lerna run test
29+
- name: Upload build artifacts
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: build-output
33+
path: packages/
34+
35+
publish-gpr:
36+
needs: build
37+
runs-on: ubuntu-latest
38+
permissions:
39+
contents: write
40+
packages: write
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: actions/setup-node@v4
44+
with:
45+
node-version: 20
46+
cache: 'npm'
47+
registry-url: https://npm.pkg.github.com/
48+
- name: Download build artifacts
49+
uses: actions/download-artifact@v4
50+
with:
51+
name: build-output
52+
path: packages/
53+
- run: npm ci
54+
- name: Temporarily sync README
55+
run: |
56+
cp README.md packages/stencil-library
57+
git config --global user.email "webmaster@datamanager.kit.edu"
58+
git config --global user.name "GitHub Action"
59+
git commit -am "Synced README"
60+
- name: Configure GitHub Packages scope
61+
run: echo "@$(echo '${{ github.repository }}' | cut -d '/' -f 1):registry=https://npm.pkg.github.com" >> .npmrc
62+
- run: npx lerna publish from-package --yes
63+
env:
64+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
65+
866
publish-npm:
67+
needs: build
968
runs-on: ubuntu-latest
69+
permissions:
70+
contents: write
1071
steps:
11-
- name: Checkout
12-
uses: actions/checkout@v4.3.1
13-
- name: Setup Node.js
14-
uses: actions/setup-node@v4
72+
- uses: actions/checkout@v4
73+
- uses: actions/setup-node@v4
1574
with:
16-
node-version: 18
75+
node-version: 20
76+
cache: 'npm'
1777
registry-url: https://registry.npmjs.org/
18-
- name: Publish component
78+
- name: Download build artifacts
79+
uses: actions/download-artifact@v4
80+
with:
81+
name: build-output
82+
path: packages/
83+
- run: npm ci
84+
- name: Temporarily sync README
1985
run: |
20-
npm clean-install
21-
npm run build
22-
npm publish --access public
23-
cd react-library
24-
npm install
25-
npm run build
26-
npm publish --access public
86+
cp README.md packages/stencil-library
87+
git config --global user.email "webmaster@datamanager.kit.edu"
88+
git config --global user.name "GitHub Action"
89+
git commit -am "Synced README"
90+
- run: npx lerna publish from-package --yes
2791
env:
2892
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

CITATION.cff

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
cff-version: 1.2.0
2+
message: If you use this software, please cite it using these metadata.
3+
type: software
4+
title: pid-component
5+
abstract: Monorepo for the PID Component and related packages
6+
version: 0.2.2
7+
authors:
8+
- orcid: https://orcid.org/0009-0005-2800-4833
9+
given-names: Maximilian
10+
affiliation: Karlsruhe Institute of Technology (KIT)
11+
family-names: Inckmann
12+
email: maximilian.inckmann@kit.edu
13+
- orcid: https://orcid.org/0009-0003-2196-9187
14+
given-names: Christopher
15+
affiliation: Karlsruhe Institute of Technology (KIT)
16+
family-names: Raquet
17+
email: christopher.raquet@kit.edu
18+
- orcid: https://orcid.org/0000-0001-6575-1022
19+
given-names: Andreas
20+
affiliation: Karlsruhe Institute of Technology (KIT)
21+
family-names: Pfeil
22+
email: andreas.pfeil@kit.edu
23+
- orcid: https://orcid.org/0000-0003-2804-688X
24+
given-names: Thomas
25+
affiliation: Karlsruhe Institute of Technology (KIT)
26+
family-names: Jejkal
27+
email: thomas.jejkal@kit.edu
28+
contact:
29+
- orcid: https://orcid.org/0009-0005-2800-4833
30+
given-names: Maximilian
31+
affiliation: Karlsruhe Institute of Technology (KIT)
32+
family-names: Inckmann
33+
email: maximilian.inckmann@kit.edu
34+
- orcid: https://orcid.org/0009-0003-2196-9187
35+
given-names: Christopher
36+
affiliation: Karlsruhe Institute of Technology (KIT)
37+
family-names: Raquet
38+
email: christopher.raquet@kit.edu
39+
license: Apache-2.0
40+
keywords:
41+
- react
42+
- pid
43+
- datatyperegistry
44+
- handle.net
45+
- orcid
46+
- identifier
47+
- kit-data-manager
48+
- typescript
49+
- storybook
50+
- tailwindcss
51+
- fair
52+
- fairdata
53+
- fairdo
54+
- fairdigitalobject
55+
url: https://kit-data-manager.github.io/pid-component
56+
repository-code: https://github.com/kit-data-manager/pid-component

CODE_OF_CONDUCT.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
education, socio-economic status, nationality, personal appearance, race,
10+
religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at {{ email }}. All
59+
complaints will be reviewed and investigated and will result in a response deemed necessary and appropriate to the
60+
circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
72+
73+
[homepage]: https://www.contributor-covenant.org

0 commit comments

Comments
 (0)