Skip to content

Commit f0a1e11

Browse files
committed
revise copilot instructions
1 parent 87820ae commit f0a1e11

File tree

4 files changed

+40
-20
lines changed

4 files changed

+40
-20
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
applyTo: '**'
3+
---
4+
Provide project context and coding guidelines that AI should follow when generating code, answering questions, or reviewing changes.
5+
6+
## General Guidelines
7+
8+
1. **Test-Driven Development**: Write unit tests for all new functions and features. Use `pytest` for Python and appropriate testing frameworks for Node.js.
9+
2. **Environment Variables**: Use [Environment Variables Guide](../../docs/env-vars.md) for configuration. Avoid hardcoding sensitive information.
10+
3. **Documentation**: Prefer self-explanatory code; add documentation only if explicitly requested by the developer. Be concise.
11+
4. **Code Reviews**: Participate in code reviews and provide constructive feedback.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
applyTo: '**'
3+
---
4+
Provide project context and coding guidelines that AI should follow when generating code, answering questions, or reviewing changes.
5+
6+
## General Guidelines
7+
8+
1. **Test-Driven Development**: Write unit tests for all new functions and features. Use `pytest` for Python and appropriate testing frameworks for Node.js.
9+
2. **Environment Variables**: Use [Environment Variables Guide](../docs/env-vars.md) for configuration. Avoid hardcoding sensitive information.
10+
3. **Documentation**: Prefer self-explanatory code; add documentation only if explicitly requested by the developer.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
applyTo: '**/*.js'
3+
---
4+
Provide project context and coding guidelines that AI should follow when generating code, answering questions, or reviewing changes.
5+
6+
## 🛠️Coding Instructions for Node.js in This Repository
7+
8+
* Use ES6+ syntax and features.
9+
* Follow the `package.json` configuration for dependencies and scripts.
10+
* Use `eslint` for linting and `prettier` for code formatting.
11+
* Write modular and reusable code, adhering to the project's structure.

.github/copilot-instructions.md renamed to .github/instructions/python.instructions.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
# GitHub Copilot Instructions
2-
3-
This document provides guidelines and best practices for using GitHub Copilot in the `osparc-simcore` repository and other Python and Node.js projects.
4-
5-
## General Guidelines
6-
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.
10-
111
---
2+
applyTo: '**/*.py'
3+
---
4+
Provide project context and coding guidelines that AI should follow when generating code, answering questions, or reviewing changes.
125

136
## 🛠️Coding Instructions for Python in This Repository
147

@@ -25,8 +18,8 @@ Follow these rules **strictly** when generating Python code:
2518

2619
### 3. **Code Style & Formatting**
2720

28-
* Follow [Python Coding Conventions](../docs/coding-conventions.md) **strictly**.
29-
* Format code with `black`.
21+
* Follow [Python Coding Conventions](../../docs/coding-conventions.md) **strictly**.
22+
* Format code with `black` and `ruff`.
3023
* Lint code with `ruff` and `pylint`.
3124

3225
### 4. **Library Compatibility**
@@ -51,11 +44,6 @@ Ensure compatibility with the following library versions:
5144
* Prefer `json_dumps` / `json_loads` from `common_library.json_serialization` instead of the built-in `json.dumps` / `json.loads`.
5245
* When using Pydantic models, prefer methods like `model.model_dump_json()` for serialization.
5346

54-
---
55-
56-
## 🛠️Coding Instructions for Node.js in This Repository
57-
58-
* Use ES6+ syntax and features.
59-
* Follow the `package.json` configuration for dependencies and scripts.
60-
* Use `eslint` for linting and `prettier` for code formatting.
61-
* Write modular and reusable code, adhering to the project's structure.
47+
### 7. **Running tests**
48+
* Use `--keep-docker-up` flag when testing to keep docker containers up between sessions.
49+
* Always activate the python virtual environment before running pytest.

0 commit comments

Comments
 (0)