Skip to content

Commit 58fa958

Browse files
author
Kevin
committed
Add initial project setup and configuration files
- Created .gitignore_updated to exclude unnecessary files from version control. - Added VSCode configuration files for debugging and settings. - Included a tasks.json file for creating a Python virtual environment. - Developed a comprehensive CONTRIBUTING.md to guide new contributors. - Established a data directory with example datasets and simulation presets. - Implemented simulation presets in TOML format for various nanoparticle systems. - Created benchmark and setup scripts for performance testing and environment setup.
1 parent 142ab26 commit 58fa958

15 files changed

Lines changed: 1830 additions & 13 deletions

File tree

.copilot/config.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
"""
2+
Configuration for GitHub Copilot in NanoSimLab.
3+
4+
This module contains settings and preferences for GitHub Copilot
5+
to provide better assistance for scientific computing and nanorobotics code.
6+
"""
7+
8+
# Copilot context and preferences for NanoSimLab project
9+
COPILOT_CONTEXT = {
10+
"project_type": "scientific_computing",
11+
"domain": "nanorobotics",
12+
"primary_language": "python",
13+
"frameworks": [
14+
"numpy",
15+
"scipy",
16+
"matplotlib",
17+
"pytest",
18+
"click"
19+
],
20+
"scientific_libraries": [
21+
"mdanalysis",
22+
"ase",
23+
"hoomd",
24+
"openmm",
25+
"pymatgen"
26+
],
27+
"coding_style": {
28+
"naming_convention": "snake_case",
29+
"line_length": 100,
30+
"type_hints": True,
31+
"docstring_style": "google"
32+
},
33+
"preferred_patterns": [
34+
"numpy array operations",
35+
"scientific computing best practices",
36+
"brownian dynamics algorithms",
37+
"molecular simulation techniques",
38+
"statistical analysis methods"
39+
]
40+
}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Bug Report
2+
description: File a bug report to help us improve NanoSimLab
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report! Please provide as much detail as possible.
10+
11+
- type: input
12+
id: version
13+
attributes:
14+
label: NanoSimLab Version
15+
description: What version of NanoSimLab are you running?
16+
placeholder: e.g., 0.1.0
17+
validations:
18+
required: true
19+
20+
- type: input
21+
id: python-version
22+
attributes:
23+
label: Python Version
24+
description: What version of Python are you using?
25+
placeholder: e.g., 3.11.0
26+
validations:
27+
required: true
28+
29+
- type: input
30+
id: os
31+
attributes:
32+
label: Operating System
33+
description: What operating system are you using?
34+
placeholder: e.g., Ubuntu 22.04, macOS 13.0, Windows 11
35+
validations:
36+
required: true
37+
38+
- type: textarea
39+
id: bug-description
40+
attributes:
41+
label: Bug Description
42+
description: A clear and concise description of what the bug is.
43+
placeholder: Describe what happened and what you expected to happen.
44+
validations:
45+
required: true
46+
47+
- type: textarea
48+
id: reproduce-steps
49+
attributes:
50+
label: Steps to Reproduce
51+
description: Please provide step-by-step instructions to reproduce the issue.
52+
placeholder: |
53+
1. Import nanosimlab
54+
2. Create simulation with parameters...
55+
3. Run simulation...
56+
4. See error
57+
validations:
58+
required: true
59+
60+
- type: textarea
61+
id: minimal-example
62+
attributes:
63+
label: Minimal Code Example
64+
description: If possible, provide a minimal code example that reproduces the issue.
65+
render: python
66+
placeholder: |
67+
import nanosimlab
68+
# Your minimal example here
69+
70+
- type: textarea
71+
id: error-output
72+
attributes:
73+
label: Error Output
74+
description: If there's an error message, please include the full traceback.
75+
render: text
76+
placeholder: Paste the full error message and traceback here.
77+
78+
- type: textarea
79+
id: expected-behavior
80+
attributes:
81+
label: Expected Behavior
82+
description: What did you expect to happen?
83+
placeholder: Describe the expected behavior.
84+
85+
- type: textarea
86+
id: additional-context
87+
attributes:
88+
label: Additional Context
89+
description: Add any other context about the problem here.
90+
placeholder: Any additional information that might be relevant.
91+
92+
- type: checkboxes
93+
id: checklist
94+
attributes:
95+
label: Checklist
96+
description: Please confirm the following before submitting.
97+
options:
98+
- label: I have searched existing issues to ensure this is not a duplicate.
99+
required: true
100+
- label: I have provided all the requested information above.
101+
required: true
102+
- label: I am using a supported version of Python (3.10+).
103+
required: true
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement for NanoSimLab
3+
title: "[Feature]: "
4+
labels: ["enhancement", "feature-request"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for suggesting a new feature! Please provide as much detail as possible about your idea.
10+
11+
- type: textarea
12+
id: feature-description
13+
attributes:
14+
label: Feature Description
15+
description: A clear and concise description of the feature you'd like to see.
16+
placeholder: Describe the feature you want to be added.
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: motivation
22+
attributes:
23+
label: Motivation
24+
description: Why is this feature needed? What problem does it solve?
25+
placeholder: Explain the motivation behind this feature request.
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: use-case
31+
attributes:
32+
label: Use Case
33+
description: Describe how you would use this feature.
34+
placeholder: Provide a concrete example of how this feature would be used.
35+
36+
- type: textarea
37+
id: proposed-solution
38+
attributes:
39+
label: Proposed Solution
40+
description: How do you think this feature should be implemented?
41+
placeholder: Describe your proposed solution or implementation approach.
42+
43+
- type: textarea
44+
id: alternatives
45+
attributes:
46+
label: Alternative Solutions
47+
description: Are there any alternative solutions or workarounds you've considered?
48+
placeholder: Describe any alternative approaches you've thought about.
49+
50+
- type: textarea
51+
id: example-code
52+
attributes:
53+
label: Example Code
54+
description: If applicable, provide an example of how the feature might be used.
55+
render: python
56+
placeholder: |
57+
# Example usage of the proposed feature
58+
import nanosimlab
59+
# Your example here
60+
61+
- type: dropdown
62+
id: priority
63+
attributes:
64+
label: Priority
65+
description: How important is this feature to you?
66+
options:
67+
- Low - Nice to have
68+
- Medium - Would be helpful
69+
- High - Important for my work
70+
- Critical - Blocking my progress
71+
validations:
72+
required: true
73+
74+
- type: dropdown
75+
id: complexity
76+
attributes:
77+
label: Estimated Complexity
78+
description: How complex do you think this feature is to implement?
79+
options:
80+
- Low - Small change or addition
81+
- Medium - Moderate implementation effort
82+
- High - Significant development required
83+
- Unknown - Not sure about complexity
84+
85+
- type: checkboxes
86+
id: contribution
87+
attributes:
88+
label: Contribution
89+
description: Are you willing to help implement this feature?
90+
options:
91+
- label: I'm willing to submit a pull request for this feature.
92+
- label: I can help with testing this feature.
93+
- label: I can help with documentation for this feature.
94+
95+
- type: textarea
96+
id: additional-context
97+
attributes:
98+
label: Additional Context
99+
description: Add any other context, screenshots, or examples about the feature request.
100+
placeholder: Any additional information that might be relevant.

.github/workflows/ci.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Cache pip dependencies
25+
uses: actions/cache@v3
26+
with:
27+
path: ~/.cache/pip
28+
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
29+
restore-keys: |
30+
${{ runner.os }}-pip-
31+
32+
- name: Install dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install -e ".[dev,analysis]"
36+
37+
- name: Lint with flake8
38+
run: |
39+
flake8 src/nanosimlab tests/ --count --select=E9,F63,F7,F82 --show-source --statistics
40+
flake8 src/nanosimlab tests/ --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics
41+
42+
- name: Type check with mypy
43+
run: |
44+
mypy src/nanosimlab
45+
46+
- name: Format check with black
47+
run: |
48+
black --check --diff src/nanosimlab tests/
49+
50+
- name: Import sort check with isort
51+
run: |
52+
isort --check-only --diff src/nanosimlab tests/
53+
54+
- name: Test with pytest
55+
run: |
56+
pytest tests/ -v --cov=nanosimlab --cov-report=xml --cov-report=term
57+
58+
- name: Upload coverage to Codecov
59+
if: matrix.python-version == '3.11'
60+
uses: codecov/codecov-action@v3
61+
with:
62+
file: ./coverage.xml
63+
flags: unittests
64+
name: codecov-umbrella
65+
66+
build:
67+
needs: test
68+
runs-on: ubuntu-latest
69+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
70+
71+
steps:
72+
- uses: actions/checkout@v4
73+
74+
- name: Set up Python
75+
uses: actions/setup-python@v5
76+
with:
77+
python-version: "3.11"
78+
79+
- name: Install build dependencies
80+
run: |
81+
python -m pip install --upgrade pip
82+
pip install build twine
83+
84+
- name: Build package
85+
run: python -m build
86+
87+
- name: Check package
88+
run: twine check dist/*
89+
90+
- name: Upload build artifacts
91+
uses: actions/upload-artifact@v3
92+
with:
93+
name: dist
94+
path: dist/

0 commit comments

Comments
 (0)