You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,3 +7,15 @@ WARNING: do not name this file as README.md since it will be rendered in the mai
7
7
-``PULL_REQUEST_TEMPLATE.md``
8
8
-``ISSUE_TEMPLATE`` folder:
9
9
- Add [top-level syntax](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms#top-level-syntax) to ISSUE_TEMPLATE/*.md files to configure them and view them as [template in the github web](https://github.com/ITISFoundation/osparc-simcore/issues/new/choose)
10
+
11
+
12
+
---
13
+
14
+
## Copilot Usage Tips
15
+
16
+
1.**Be Specific**: Provide clear and detailed prompts to Copilot for better suggestions.
17
+
2.**Iterate**: Review and refine Copilot's suggestions to ensure they meet project standards.
18
+
3.**Split Tasks**: Break down complex tasks into smaller, manageable parts for better suggestions.
19
+
4.**Test Suggestions**: Always test Copilot-generated code to ensure it works as expected.
20
+
21
+
- SEE https://code.visualstudio.com/docs/copilot/copilot-customization#_custom-instructions
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+43-37Lines changed: 43 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,52 +4,58 @@ This document provides guidelines and best practices for using GitHub Copilot in
4
4
5
5
## General Guidelines
6
6
7
-
1.**Use Python 3.11**: Ensure that all Python-related suggestions align with Python 3.11 features and syntax.
8
-
2.**Node.js Compatibility**: For Node.js projects, ensure compatibility with the version specified in the project (e.g., Node.js 14 or later).
9
-
3.**Follow Coding Conventions**: Adhere to the coding conventions outlined in the `docs/coding-conventions.md` file.
10
-
4.**Test-Driven Development**: Write unit tests for all new functions and features. Use `pytest` for Python and appropriate testing frameworks for Node.js.
11
-
5.**Environment Variables**: Use environment variables as specified in `docs/env-vars.md` for configuration. Avoid hardcoding sensitive information.
12
-
6.**Documentation**: Prefer self-explanatory code; add documentation only if explicitly requested by the developer.
7
+
1.**Test-Driven Development**: Write unit tests for all new functions and features. Use `pytest` for Python and appropriate testing frameworks for Node.js.
8
+
2.**Environment Variables**: Use [Environment Variables Guide](../docs/env-vars.md) for configuration. Avoid hardcoding sensitive information.
9
+
3.**Documentation**: Prefer self-explanatory code; add documentation only if explicitly requested by the developer.
13
10
14
-
## Python-Specific Instructions
11
+
---
15
12
16
-
- Always use type hints and annotations to improve code clarity and compatibility with tools like `mypy`.
17
-
- An exception to that rule is in `test_*` functions return type hint must not be added
18
-
- Follow the dependency management practices outlined in `requirements/`.
19
-
- Use `ruff` for code formatting and for linting.
20
-
- Use `black` for code formatting and `pylint` for linting.
21
-
- ensure we use `sqlalchemy` >2 compatible code.
22
-
- ensure we use `pydantic` >2 compatible code.
23
-
- ensure we use `fastapi` >0.100 compatible code
24
-
- use f-string formatting
25
-
- Only add comments in function if strictly necessary
26
-
- use relative imports
27
-
- imports should be at top of the file
13
+
## 🛠️Coding Instructions for Python in This Repository
28
14
15
+
Follow these rules strictly when generating Python code:
29
16
30
-
### Json serialization
17
+
### 1. Python Version
31
18
32
-
- Generally use `json_dumps`/`json_loads` from `common_library.json_serialization` to built-in `json.dumps` / `json.loads`.
33
-
- Prefer Pydantic model methods (e.g., `model.model_dump_json()`) for serialization.
19
+
* Use Python 3.11: Ensure all code uses features and syntax compatible with Python 3.11.
34
20
21
+
### 2. **Type Annotations**
35
22
36
-
## Node.js-Specific Instructions
23
+
* Always use full type annotations for all functions and class attributes.
24
+
* ❗ **Exception**: Do **not** add return type annotations in `test_*` functions.
37
25
38
-
- Use ES6+ syntax and features.
39
-
- Follow the `package.json` configuration for dependencies and scripts.
40
-
- Use `eslint` for linting and `prettier` for code formatting.
41
-
- Write modular and reusable code, adhering to the project's structure.
0 commit comments