pid4cat-model 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. pid4cat_model-0.3.0/.copier-answers.yml +15 -0
  2. pid4cat_model-0.3.0/.editorconfig +18 -0
  3. pid4cat_model-0.3.0/.github/dependabot.yml +9 -0
  4. pid4cat_model-0.3.0/.github/workflows/deploy-docs.yaml +86 -0
  5. pid4cat_model-0.3.0/.github/workflows/main.yaml +55 -0
  6. pid4cat_model-0.3.0/.github/workflows/pypi-publish.yaml +94 -0
  7. pid4cat_model-0.3.0/.gitignore +151 -0
  8. pid4cat_model-0.3.0/.linkmllint.yaml +11 -0
  9. pid4cat_model-0.3.0/.pre-commit-config.yaml +45 -0
  10. pid4cat_model-0.3.0/.yamllint.yaml +12 -0
  11. pid4cat_model-0.3.0/CODE_OF_CONDUCT.md +76 -0
  12. pid4cat_model-0.3.0/CONTRIBUTING.md +113 -0
  13. pid4cat_model-0.3.0/LICENSE +22 -0
  14. pid4cat_model-0.3.0/PKG-INFO +52 -0
  15. pid4cat_model-0.3.0/README.md +76 -0
  16. pid4cat_model-0.3.0/README_pypkg.md +39 -0
  17. pid4cat_model-0.3.0/config.public.mk +35 -0
  18. pid4cat_model-0.3.0/config.yaml +63 -0
  19. pid4cat_model-0.3.0/docs/about.md +20 -0
  20. pid4cat_model-0.3.0/docs/apis.md +73 -0
  21. pid4cat_model-0.3.0/docs/elements/.gitkeep +0 -0
  22. pid4cat_model-0.3.0/docs/future-docs.md +767 -0
  23. pid4cat_model-0.3.0/docs/getting-started.md +62 -0
  24. pid4cat_model-0.3.0/docs/images/favicon.svg +121 -0
  25. pid4cat_model-0.3.0/docs/images/logo-design-source.svg +268 -0
  26. pid4cat_model-0.3.0/docs/images/logo-icon.svg +121 -0
  27. pid4cat_model-0.3.0/docs/images/logo-with-text.png +0 -0
  28. pid4cat_model-0.3.0/docs/images/logo-with-text.svg +193 -0
  29. pid4cat_model-0.3.0/docs/index.md +36 -0
  30. pid4cat_model-0.3.0/docs/metadata.md +58 -0
  31. pid4cat_model-0.3.0/docs/open-data.md +52 -0
  32. pid4cat_model-0.3.0/docs/overview.md +349 -0
  33. pid4cat_model-0.3.0/docs/policies.md +100 -0
  34. pid4cat_model-0.3.0/docs/schema/README.md +8 -0
  35. pid4cat_model-0.3.0/docs/templates-linkml/README.md +7 -0
  36. pid4cat_model-0.3.0/docs/tools.md +43 -0
  37. pid4cat_model-0.3.0/docs/versioning.md +12 -0
  38. pid4cat_model-0.3.0/examples/PID4CatRecord-001.yaml +86 -0
  39. pid4cat_model-0.3.0/examples/README.md +11 -0
  40. pid4cat_model-0.3.0/examples/api-v2-demo.ipynb +529 -0
  41. pid4cat_model-0.3.0/examples/example_p1.json +142 -0
  42. pid4cat_model-0.3.0/examples/example_p1.yaml +98 -0
  43. pid4cat_model-0.3.0/examples/example_p1_dataclasses.py +175 -0
  44. pid4cat_model-0.3.0/examples/example_p1_pydantic.json +142 -0
  45. pid4cat_model-0.3.0/examples/example_p1_pydantic.py +228 -0
  46. pid4cat_model-0.3.0/examples/hdl-net-api-demo.ipynb +379 -0
  47. pid4cat_model-0.3.0/examples/valid/HandleRecordContainer-001.json.off +159 -0
  48. pid4cat_model-0.3.0/examples/valid/HandleRecordContainer-001.yaml +86 -0
  49. pid4cat_model-0.3.0/examples/valid/PID4CatRecord-001.json +159 -0
  50. pid4cat_model-0.3.0/examples/valid/PID4CatRecord-001.yaml +86 -0
  51. pid4cat_model-0.3.0/justfile +249 -0
  52. pid4cat_model-0.3.0/mkdocs.yml +62 -0
  53. pid4cat_model-0.3.0/nfdi4cat_details.md +259 -0
  54. pid4cat_model-0.3.0/nfdi4cat_details_ex.py +21 -0
  55. pid4cat_model-0.3.0/project/README.md +9 -0
  56. pid4cat_model-0.3.0/project.justfile +1 -0
  57. pid4cat_model-0.3.0/pyproject.toml +86 -0
  58. pid4cat_model-0.3.0/src/pid4cat_model/__init__.py +5 -0
  59. pid4cat_model-0.3.0/src/pid4cat_model/_version.py +8 -0
  60. pid4cat_model-0.3.0/src/pid4cat_model/datamodel/__init__.py +6 -0
  61. pid4cat_model-0.3.0/src/pid4cat_model/datamodel/pid4cat_model.py +2816 -0
  62. pid4cat_model-0.3.0/src/pid4cat_model/datamodel/pid4cat_model_pydantic.py +2753 -0
  63. pid4cat_model-0.3.0/src/pid4cat_model/handle_api.py +123 -0
  64. pid4cat_model-0.3.0/src/pid4cat_model/schema/README.md +3 -0
  65. pid4cat_model-0.3.0/src/pid4cat_model/schema/media_types.yaml +2247 -0
  66. pid4cat_model-0.3.0/src/pid4cat_model/schema/pid4cat_model.yaml +977 -0
  67. pid4cat_model-0.3.0/tests/__init__.py +1 -0
  68. pid4cat_model-0.3.0/tests/data/21.T11978_hdlnet_api/TEST_KBKA-BEM9.json +86 -0
  69. pid4cat_model-0.3.0/tests/data/21.T11978_hdlnet_api/TEST_KBKA-BEM9_decoded.json +142 -0
  70. pid4cat_model-0.3.0/tests/data/21.T11978_hdlnet_api/TEST_KBKA-BEM9_invalid.json +142 -0
  71. pid4cat_model-0.3.0/tests/data/README.md +14 -0
  72. pid4cat_model-0.3.0/tests/data/invalid/.gitkeep +0 -0
  73. pid4cat_model-0.3.0/tests/data/invalid/HandleAPIRecord-004.json +88 -0
  74. pid4cat_model-0.3.0/tests/data/problem/invalid/.gitkeep +0 -0
  75. pid4cat_model-0.3.0/tests/data/problem/valid/.gitkeep +0 -0
  76. pid4cat_model-0.3.0/tests/data/valid/HandleAPIRecord-001.yaml +88 -0
  77. pid4cat_model-0.3.0/tests/data/valid/HandleAPIRecord-002.json +142 -0
  78. pid4cat_model-0.3.0/tests/data/valid/HandleAPIRecord-003.json +142 -0
  79. pid4cat_model-0.3.0/tests/data/valid/HandleAPIRecord-004.json +111 -0
  80. pid4cat_model-0.3.0/tests/data/valid/HandleRecordContainer-001.yaml +89 -0
  81. pid4cat_model-0.3.0/tests/test_data.py +30 -0
  82. pid4cat_model-0.3.0/tests/test_handle_api.py +57 -0
  83. pid4cat_model-0.3.0/tests/test_model_pydantic.py +32 -0
  84. pid4cat_model-0.3.0/uv.lock +2632 -0
@@ -0,0 +1,15 @@
1
+ # Changes here will be overwritten by Copier
2
+ _commit: v0.4.0
3
+ _src_path: gh:dalito/linkml-project-copier
4
+ add_example: false
5
+ copyright_year: '2023'
6
+ email: david.linke@catalysis.de
7
+ full_name: David Linke
8
+ gh_action_docs_preview: false
9
+ gh_action_pypi: true
10
+ github_org: nfdi4cat
11
+ license: MIT
12
+ project_description: LinkML model for handle-based PIDs for resources in catalysis
13
+ (pid4cat)
14
+ project_name: pid4cat-model
15
+ project_slug: pid4cat_model
@@ -0,0 +1,18 @@
1
+ # Check http://editorconfig.org for more information
2
+ # This is the main config file for this project:
3
+ root = true
4
+
5
+ [*]
6
+ charset = utf-8
7
+ end_of_line = lf
8
+ insert_final_newline = true
9
+ indent_style = space
10
+ indent_size = 2
11
+ trim_trailing_whitespace = true
12
+
13
+ [*.py]
14
+ indent_style = space
15
+ indent_size = 4
16
+
17
+ [*.md]
18
+ trim_trailing_whitespace = false
@@ -0,0 +1,9 @@
1
+ # Please see the documentation for all configuration options:
2
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3
+
4
+ version: 2
5
+ updates:
6
+ - package-ecosystem: github-actions
7
+ directory: "/"
8
+ schedule:
9
+ interval: monthly
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: Deploy docs
3
+ on: # yamllint disable-line rule:truthy
4
+ push:
5
+ tags:
6
+ - 'v[0-9]+.[0-9]+.[0-9]+'
7
+ - 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]'
8
+ branches:
9
+ - main
10
+ pull_request:
11
+ branches:
12
+ - main
13
+ workflow_dispatch:
14
+
15
+ permissions: {}
16
+
17
+ jobs:
18
+ build-docs:
19
+ runs-on: ubuntu-latest
20
+
21
+ # Grant GITHUB_TOKEN the permissions required to make a gh-pages deployment
22
+ permissions:
23
+ contents: write # to let mkdocs write the new docs
24
+ pages: write # to deploy to Pages
25
+ id-token: write # allow to generate an OpenID Connect (OIDC) token
26
+
27
+ steps:
28
+ - name: Checkout
29
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
30
+ with:
31
+ fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
32
+
33
+ - name: Configure git for the bot
34
+ # Gives the bot that commits to gh-pages a name & email address
35
+ # so that the commits have an author in the commit log.
36
+ run: |
37
+ git config user.name github-actions[bot]
38
+ git config user.email github-actions[bot]@users.noreply.github.com
39
+
40
+ - name: Install uv
41
+ uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182
42
+ with:
43
+ python-version: 3.12
44
+ enable-cache: true
45
+ cache-dependency-glob: "uv.lock"
46
+
47
+ - name: Set up Python
48
+ uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
49
+ with:
50
+ python-version: 3.12
51
+
52
+ - name: Install just
53
+ run: |
54
+ uv tool install rust-just
55
+
56
+ - name: Install dependencies
57
+ run: uv sync --dev --no-progress
58
+
59
+ - name: Generate schema documentation
60
+ run: |
61
+ # TODO Check if version is injected into the schema.
62
+ just gen-doc
63
+
64
+ # The if-conditions below make sure to select the right step, depending
65
+ # on the job trigger. Only one of the steps below will run at a time.
66
+ # The others will be skipped.
67
+
68
+ - name: Check docs in pull requests with strict mode
69
+ if: github.event_name == 'pull_request'
70
+ run: |
71
+ # XXX Enable strict mode once docs are clean
72
+ echo "Strict check of docs disabled."
73
+ # uv run mkdocs build --strict
74
+
75
+ # yamllint disable rule:line-length
76
+ - name: Build & deploy "dev" docs for a new commit to master
77
+ if: github.event_name == 'push' && github.ref_type != 'tag'
78
+ run: |
79
+ export SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-7)
80
+ uv run mike deploy --push --update-aliases --title "dev (${SHORT_SHA})" dev
81
+
82
+ - name: Build & deploy docs for a new version tag
83
+ if: github.ref_type == 'tag' && github.event_name == 'push'
84
+ run: |
85
+ uv run mike deploy --push --update-aliases ${{ github.ref_name }} latest
86
+ uv run mike set-default latest --push
@@ -0,0 +1,55 @@
1
+ # Built from:
2
+ # https://docs.github.com/en/actions/guides/building-and-testing-python
3
+ ---
4
+ name: Build and test
5
+
6
+ on: # yamllint disable-line rule:truthy
7
+ push:
8
+ branches: [main]
9
+ pull_request:
10
+
11
+ env:
12
+ FORCE_COLOR: "1" # Make tools pretty.
13
+
14
+ permissions: {}
15
+
16
+ jobs:
17
+ test:
18
+
19
+ runs-on: ubuntu-latest
20
+ strategy:
21
+ matrix:
22
+ # re-enable when linkml-runtime is realesed with
23
+ # https://github.com/linkml/linkml-runtime/pull/357
24
+ # python-version: ["3.9", "3.10", "3.11", "3.12"]
25
+ python-version: ["3.11", "3.12"]
26
+ fail-fast: false
27
+
28
+ steps:
29
+
30
+ - name: Check out repository
31
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
32
+ with:
33
+ persist-credentials: false
34
+
35
+ - name: Install uv
36
+ uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182
37
+ with:
38
+ python-version: ${{ matrix.python-version }}
39
+ enable-cache: true
40
+ cache-dependency-glob: "uv.lock"
41
+
42
+ - name: Set up Python ${{ matrix.python-version }}
43
+ uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
44
+ with:
45
+ python-version: ${{ matrix.python-version }}
46
+
47
+ - name: Install just
48
+ run: |
49
+ uv tool install rust-just
50
+
51
+ - name: Install project
52
+ run: uv sync --dev
53
+
54
+ - name: Run test suite
55
+ run: just test
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: Publish Python Package
3
+
4
+ # Publishes with trusted publishing to
5
+ # - PyPI on releases created in GitHub UI if status is published.
6
+ # For draft status, nothing happens.
7
+ # - TestPyPI on new tags "v1.2.3" or "v1.2.3.something" on main branch
8
+ #
9
+ # More on trusted publishing: https://docs.pypi.org/trusted-publishers/
10
+
11
+ on: # yamllint disable-line rule:truthy
12
+ push:
13
+ tags:
14
+ # GitHub glob matching is limited [1]. So we can't define a pattern matching
15
+ # pep 440 version definition [N!]N(.N)*[{a|b|rc}N][.postN][.devN]
16
+ - 'v[0-9]+.[0-9]+.[0-9]+.?*'
17
+ - 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]'
18
+ release:
19
+ types: [published]
20
+
21
+ permissions: {}
22
+
23
+ jobs:
24
+ build:
25
+ name: Build Python 🐍 distributions 📦 for publishing
26
+ runs-on: ubuntu-latest
27
+
28
+ steps:
29
+ - name: Check out repository
30
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
31
+ with:
32
+ persist-credentials: false
33
+
34
+ - name: Install uv
35
+ uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182
36
+ with:
37
+ python-version: 3.12
38
+ enable-cache: true
39
+
40
+ - name: Set up Python
41
+ uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
42
+ with:
43
+ python-version: 3.12
44
+
45
+ - name: Install just
46
+ run: |
47
+ uv tool install rust-just
48
+
49
+ - name: Build source and wheel archives
50
+ run: uv build
51
+
52
+ - name: Store built distribution
53
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
54
+ with:
55
+ name: distribution-files
56
+ path: dist/
57
+
58
+ pypi-publish:
59
+ name: Build and publish Python 🐍 package 📦 to PyPI and TestPyPI
60
+ needs: build
61
+ runs-on: ubuntu-latest
62
+ environment:
63
+ name: pypi-release
64
+ url: https://pypi.org/p/pid4cat_model
65
+ permissions:
66
+ id-token: write # this permission is mandatory for trusted publishing
67
+ steps:
68
+ - name: Download built distribution
69
+ uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e
70
+ with:
71
+ name: distribution-files
72
+ path: dist
73
+
74
+ - name: Publish package 📦 to Test PyPI
75
+ if: github.event_name == 'push'
76
+ uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
77
+ with:
78
+ repository-url: https://test.pypi.org/legacy/
79
+ verbose: true
80
+
81
+ - name: Publish package 📦 to PyPI
82
+ if: github.event_name == 'release'
83
+ uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
84
+ with:
85
+ verbose: true
86
+
87
+ # [1] https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
88
+ # Used actions: (updates managed by dependabot)
89
+ # - https://github.com/actions/checkout
90
+ # - https://github.com/astral-sh/setup-uv
91
+ # - https://github.com/actions/setup-python
92
+ # - https://github.com/actions/upload-artifact
93
+ # - https://github.com/actions/download-artifact
94
+ # - https://github.com/pypa/gh-action-pypi-publish/
@@ -0,0 +1,151 @@
1
+ docs/local-js-pkgs
2
+
3
+ # generated part of documentation
4
+ docs/elements/*.md
5
+
6
+ # generated merged schema
7
+ docs/schema/*
8
+ !docs/schema/README.md
9
+
10
+ # linkml-run-examples output (not useful to have in git in its current form)
11
+ examples/output/
12
+
13
+ # Derived schemas, generated from the schema.yaml
14
+ tmp/
15
+ project/
16
+ !project/README.md
17
+
18
+ # Byte-compiled / optimized / DLL files
19
+ __pycache__/
20
+ *.py[cod]
21
+ *$py.class
22
+
23
+ # C extensions
24
+ *.so
25
+
26
+ # Distribution / packaging
27
+ .Python
28
+ build/
29
+ develop-eggs/
30
+ dist/
31
+ downloads/
32
+ eggs/
33
+ .eggs/
34
+ lib/
35
+ lib64/
36
+ parts/
37
+ sdist/
38
+ var/
39
+ wheels/
40
+ pip-wheel-metadata/
41
+ share/python-wheels/
42
+ *.egg-info/
43
+ .installed.cfg
44
+ *.egg
45
+ MANIFEST
46
+
47
+ # PyInstaller
48
+ # Usually these files are written by a python script from a template
49
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
50
+ *.manifest
51
+ *.spec
52
+
53
+ # Installer logs
54
+ pip-log.txt
55
+ pip-delete-this-directory.txt
56
+
57
+ # Unit test / coverage reports
58
+ htmlcov/
59
+ .tox/
60
+ .nox/
61
+ .coverage
62
+ .coverage.*
63
+ .cache
64
+ nosetests.xml
65
+ coverage.xml
66
+ *.cover
67
+ *.py,cover
68
+ .hypothesis/
69
+ .pytest_cache/
70
+
71
+ # Translations
72
+ *.mo
73
+ *.pot
74
+
75
+ # Django stuff:
76
+ *.log
77
+ local_settings.py
78
+ db.sqlite3
79
+ db.sqlite3-journal
80
+
81
+ # Flask stuff:
82
+ instance/
83
+ .webassets-cache
84
+
85
+ # Scrapy stuff:
86
+ .scrapy
87
+
88
+ # Sphinx documentation
89
+ docs/_build/
90
+
91
+ # PyBuilder
92
+ target/
93
+
94
+ # Jupyter Notebook
95
+ .ipynb_checkpoints
96
+
97
+ # IPython
98
+ profile_default/
99
+ ipython_config.py
100
+
101
+ # pyenv
102
+ .python-version
103
+
104
+ # pipenv
105
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
106
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
107
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
108
+ # install all needed dependencies.
109
+ #Pipfile.lock
110
+
111
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
112
+ __pypackages__/
113
+
114
+ # Celery stuff
115
+ celerybeat-schedule
116
+ celerybeat.pid
117
+
118
+ # SageMath parsed files
119
+ *.sage.py
120
+
121
+ # Environments
122
+ .env
123
+ .venv
124
+ env/
125
+ venv/
126
+ ENV/
127
+ env.bak/
128
+ venv.bak/
129
+
130
+ # Spyder project settings
131
+ .spyderproject
132
+ .spyproject
133
+
134
+ # Rope project settings
135
+ .ropeproject
136
+
137
+ # mkdocs documentation
138
+ /site
139
+
140
+ # mypy
141
+ .mypy_cache/
142
+ .dmypy.json
143
+ dmypy.json
144
+
145
+ # Pyre type checker
146
+ .pyre/
147
+
148
+ # pycharm
149
+ .idea/
150
+ # Local vscode editor config
151
+ .vscode/
@@ -0,0 +1,11 @@
1
+ # Use the recommended rule set except for the standard_naming rule
2
+ extends: recommended
3
+
4
+ rules:
5
+ standard_naming:
6
+ level: disabled
7
+ # permissible_values_upper_case: true
8
+ # class_pattern: snake_case
9
+ canonical_prefixes:
10
+ # Superfluous warnings for https-refixes, https://github.com/linkml/linkml/issues/2492
11
+ level: disabled
@@ -0,0 +1,45 @@
1
+ ---
2
+ # https://pre-commit.com/
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v5.0.0
6
+ hooks:
7
+ - id: check-toml
8
+ - id: check-yaml
9
+ - id: end-of-file-fixer
10
+ - id: trailing-whitespace
11
+ args: [--markdown-linebreak-ext=md]
12
+
13
+ - repo: https://github.com/adrienverge/yamllint.git
14
+ rev: v1.37.0
15
+ hooks:
16
+ - id: yamllint
17
+ args: [-c=.yamllint.yaml]
18
+
19
+ - repo: https://github.com/codespell-project/codespell
20
+ rev: v2.4.1
21
+ hooks:
22
+ - id: codespell
23
+ additional_dependencies:
24
+ - tomli
25
+
26
+ - repo: https://github.com/crate-ci/typos
27
+ rev: v1.31.1
28
+ hooks:
29
+ - id: typos
30
+
31
+ - repo: https://github.com/astral-sh/ruff-pre-commit
32
+ # Ruff version.
33
+ rev: v0.11.3
34
+ hooks:
35
+ # Run the linter.
36
+ - id: ruff
37
+ args: [--fix, --exit-non-zero-on-fix]
38
+ # Run the formatter.
39
+ - id: ruff-format
40
+
41
+ - repo: https://github.com/astral-sh/uv-pre-commit
42
+ # uv version.
43
+ rev: 0.6.12
44
+ hooks:
45
+ - id: uv-lock
@@ -0,0 +1,12 @@
1
+ # Configuration for https://github.com/adrienverge/yamllint
2
+
3
+ extends: default
4
+
5
+ rules:
6
+ document-start: disable # Don't check if document has a start marker (---).
7
+ line-length:
8
+ max: 80
9
+ level: warning
10
+ allow-non-breakable-words: true
11
+ allow-non-breakable-inline-mappings: true
12
+ new-lines: disable # Don't check for type of new line characters.
@@ -0,0 +1,76 @@
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,
8
+ body size, disability, ethnicity, gender identity and expression, level of
9
+ experience, nationality, personal appearance, race, religion, or sexual
10
+ 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
52
+ appointed representative at an online or offline event. Representation of a
53
+ project may be 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](contact.md). All complaints will be
59
+ reviewed and investigated and will result in a response that is deemed
60
+ necessary and appropriate to the circumstances. The project team is obligated
61
+ to maintain confidentiality with regard to the reporter of an incident. Further
62
+ 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 has been derived from the excellent code of conduct of the
71
+ [ATOM project](https://github.com/atom/atom/blob/master/CODE_OF_CONDUCT.md)
72
+ which in turn is adapted from the [Contributor Covenant][homepage], version
73
+ 1.4, available at [https://contributor-covenant.org/version/1/4][version]
74
+
75
+ [homepage]: https://contributor-covenant.org
76
+ [version]: https://contributor-covenant.org/version/1/4/
@@ -0,0 +1,113 @@
1
+ # Contributing to pid4cat-model
2
+
3
+ :+1: First of all: Thank you for taking the time to contribute!
4
+
5
+ The following is a set of guidelines for contributing to
6
+ pid4cat-model. These guidelines are not strict rules.
7
+ Use your best judgment, and feel free to propose changes to this document
8
+ in a pull request.
9
+
10
+ ## Table Of Contents
11
+
12
+ - [Contributing to pid4cat-model](#contributing-to-pid4cat-model)
13
+ - [Table Of Contents](#table-of-contents)
14
+ - [Code of Conduct](#code-of-conduct)
15
+ - [Guidelines for Contributions and Requests](#guidelines-for-contributions-and-requests)
16
+ - [Reporting problems with the data model](#reporting-problems-with-the-data-model)
17
+ - [Adding new elements](#adding-new-elements)
18
+ - [Best Practices](#best-practices)
19
+ - [GitHub Best Practice](#github-best-practice)
20
+ - [Understanding LinkML](#understanding-linkml)
21
+ - [Modeling Best Practice](#modeling-best-practice)
22
+
23
+ <a id="code-of-conduct"></a>
24
+
25
+ ## Code of Conduct
26
+
27
+ The pid4cat-model team strives to create a
28
+ welcoming environment for editors, users and other contributors.
29
+ Please carefully read our [Code of Conduct](CODE_OF_CONDUCT.md).
30
+
31
+ <a id="contributions"></a>
32
+
33
+ ## Guidelines for Contributions and Requests
34
+
35
+ <a id="reporting-bugs"></a>
36
+
37
+ ### Reporting problems with the data model
38
+
39
+ Please use our [Issue Tracker][issues] to report problems with the data model.
40
+
41
+ <a id="requesting-terms"></a>
42
+
43
+ ### Adding new elements
44
+
45
+ Please submit a [Pull Request][pulls] with the proposed changes or create an [Issue][issues].
46
+
47
+ <a id="best-practices"></a>
48
+
49
+ ## Best Practices
50
+
51
+ <a id="great-issues"></a>
52
+
53
+ ### GitHub Best Practice
54
+
55
+ - Creating and curating issues
56
+ - Read ["About Issues"][[about-issues]]
57
+ - Issues should be focused and actionable
58
+ - Complex issues should be broken down into simpler issues where possible
59
+ - Pull Requests
60
+ - Read ["About Pull Requests"][about-pulls]
61
+ - Read [GitHub Pull Requests: 10 Tips to Know](https://blog.mergify.com/github-pull-requests-10-tips-to-know/)
62
+ - Pull Requests (PRs) should be atomic and aim to close a single issue
63
+ - Long running PRs should be avoided where possible
64
+ - PRs should reference issues following standard conventions (e.g. “fixes #123”)
65
+ - Schema developers should always be working on a single issue at any one time
66
+ - Never work on the main branch, always work on an issue/feature branch
67
+ - Core developers can work on branches off origin rather than forks
68
+ - Always create a PR on a branch to maximize transparency of what you are doing
69
+ - PRs should be reviewed and merged in a timely fashion by the pid4cat-model technical leads
70
+ - PRs that do not pass GitHub actions should never be merged
71
+ - In the case of git conflicts, the contributor should try and resolve the conflict
72
+ - If a PR fails a GitHub action check, the contributor should try and resolve the issue in a timely fashion
73
+
74
+ ### Understanding LinkML
75
+
76
+ Core developers should read the material on the [LinkML site](https://linkml.io/linkml), in particular:
77
+
78
+ - [Overview](https://linkml.io/linkml/intro/overview.html)
79
+ - [Tutorial](https://linkml.io/linkml/intro/tutorial.html)
80
+ - [Schemas](https://linkml.io/linkml/schemas/index.html)
81
+ - [FAQ](https://linkml.io/linkml/faq/index.html)
82
+
83
+ ### Modeling Best Practice
84
+
85
+ - Follow Naming conventions
86
+ - Standard LinkML naming conventions should be followed (UpperCamelCase for classes and enums, snake_case for slots)
87
+ - Know how to use the LinkML linter to check style and conventions
88
+ - The names for classes should be nouns or noun-phrases: Person, GenomeAnnotation, Address, Sample
89
+ - Spell out abbreviations and short forms, except where this goes against convention (e.g. do not spell out DNA)
90
+ - Elements that are imported from outside (e.g. schema.org) need not follow the same naming conventions
91
+ - Multivalued slots should be named as plurals
92
+ - Document model elements
93
+ - All model elements should have documentation (descriptions) and other textual annotations (e.g. comments, notes)
94
+ - Textual annotations on classes, slots and enumerations should be written with minimal jargon, clear grammar and no misspellings
95
+ - Include examples and counter-examples (intentionally invalid examples)
96
+ - Rationale: these serve as documentation and unit tests
97
+ - These will be used by the automated test suite
98
+ - Invalid example data files should be invalid for one single reason, which should be reflected in the filename. It should be possible to render the invalid example files valid by addressing that single fault.
99
+ - Use enums for categorical values
100
+ - Rationale: Open-ended string ranges encourage multiple values to represent the same entity, like “water”, “H2O” and “HOH”
101
+ - Any slot whose values could be constrained to a finite set should use an Enum
102
+ - Non-categorical values, e.g. descriptive fields like `name` or `description` fall outside of this.
103
+ - Reuse
104
+ - Existing scheme elements should be reused where appropriate, rather than making duplicative elements
105
+ - More specific classes can be created by refining classes using inheritance (`is_a`)
106
+
107
+ [about-branches]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches
108
+ [about-issues]: https://docs.github.com/en/issues/tracking-your-work-with-issues/about-issues
109
+ [about-pulls]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
110
+ [issues]: https://github.com/nfdi4cat/pid4cat-model/issues/
111
+ [pulls]: https://github.com/nfdi4cat/pid4cat-model/pulls/
112
+
113
+ We recommend also reading [GitHub Pull Requests: 10 Tips to Know](https://blog.mergify.com/github-pull-requests-10-tips-to-know/)