Skip to content

Commit 847e06c

Browse files
Prepare for first release (#1)
1 parent 2e50a97 commit 847e06c

File tree

7 files changed

+207
-5
lines changed

7 files changed

+207
-5
lines changed

.github/workflows/ci.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
test:
11+
name: Code Quality
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Install Nodejs
16+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
17+
with:
18+
node-version: 22
19+
20+
- name: Checkout repository
21+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Check formatting
29+
run: npm run format:check
30+
31+
- name: Lint code
32+
run: npm run lint
33+
34+
- name: Type check
35+
run: npm run compile-tests
36+
37+
- name: Build extension
38+
run: npm run compile
39+
40+
- name: Package extension
41+
run: npx vsce package

.github/workflows/release.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
check-version:
10+
name: 'Check version'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Install Nodejs
14+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
15+
with:
16+
node-version: 22
17+
18+
- name: Checkout repository
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
with:
21+
fetch-depth: ${{ env.FETCH_DEPTH }}
22+
23+
- name: Validate package version matches git tag
24+
run: |
25+
TAG_VERSION=${GITHUB_REF#refs/tags/v}
26+
PACKAGE_VERSION=$(node -p "require('./package.json').version")
27+
if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then
28+
echo "Error: Tag version ($TAG_VERSION) does not match package.json version ($PACKAGE_VERSION)"
29+
exit 1
30+
fi
31+
32+
publish-code-marketplace:
33+
name: 'Publish (Code Marketplace)'
34+
runs-on: ubuntu-latest
35+
needs: check-version
36+
steps:
37+
- name: Install Nodejs
38+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
39+
with:
40+
node-version: 22
41+
42+
- name: Checkout repository
43+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
44+
with:
45+
fetch-depth: 0
46+
47+
# Install Node dependencies.
48+
- run: npm ci
49+
50+
# Publish to the Code Marketplace.
51+
- name: Publish Extension (Code Marketplace)
52+
run: npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }}

.vscodeignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
**/.github/
12
.vscode/**
23
.vscode-test/**
34
out/**
@@ -12,3 +13,4 @@ vsc-extension-quickstart.md
1213
**/*.map
1314
**/*.ts
1415
**/.vscode-test.*
16+
.claude

CONTRIBUTING.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Contributing to Pixi Code
2+
3+
Thank you for your interest in contributing to Pixi Code! This document provides guidelines for contributing to this VS
4+
Code extension that integrates Pixi environments with the Python Environments extension.
5+
6+
## Development setup
7+
8+
1. **Prerequisites**
9+
- Node.js 20+
10+
- VS Code with the Python Environments extension installed
11+
- Pixi installed on your system
12+
13+
2. **Clone and setup**
14+
15+
```bash
16+
git clone https://github.com/renan-r-santos/pixi-code.git
17+
cd pixi-code
18+
npm install
19+
```
20+
21+
3. **Development workflow**
22+
```bash
23+
npm run compile # Build the extension
24+
npm run watch # Watch for changes during development
25+
```
26+
27+
## Code style and quality
28+
29+
This project maintains strict code quality standards using TypeScript, ESLint, and Prettier. All code must pass these
30+
quality checks before being merged.
31+
32+
```bash
33+
npm run lint # Check for linting issues
34+
npm run format:check # Check code formatting
35+
npm run compile # Build and verify compilation
36+
```
37+
38+
Fixing issues:
39+
40+
```bash
41+
npm run format # Auto-fix formatting issues
42+
npm run lint -- --fix # Auto-fix linting issues where possible
43+
```
44+
45+
## Making a contribution
46+
47+
### 1. Fork and branch
48+
49+
Fork the repository and create a feature branch:
50+
51+
```bash
52+
git checkout -b feature/your-feature-name
53+
```
54+
55+
### 2. Development guidelines
56+
57+
- **Follow existing patterns**: Study the codebase structure and maintain consistency
58+
- **TypeScript strict mode**: Leverage strong typing throughout
59+
- **Import organization**: ESLint automatically sorts and organizes imports
60+
- **Code formatting**: Use Prettier to format your code
61+
- **Logging**: Use the provided logging utilities in `src/common/logging.ts`
62+
63+
### 3. Extension testing
64+
65+
Test the extension functionality:
66+
67+
1. Press `F5` in launch VS Code in debug mode
68+
2. Open a project containing `pixi.toml` or `pyproject.toml`
69+
3. Verify Pixi environments are discovered and functional
70+
4. Test environment switching and terminal activation
71+
72+
### 4. Commit and submit
73+
74+
- Reference any related issues
75+
- Submit a pull request with detailed description

RELEASE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Release Process
2+
3+
## Steps to Release
4+
5+
1. **Create a PR updating package.json version**
6+
7+
2. **Merge PR**
8+
9+
3. **Create Git Tag**
10+
11+
```bash
12+
git tag vx.x.x
13+
git push origin vx.x.x
14+
```
15+
16+
4. **Verify GitHub Actions**
17+
- Check that release workflow runs successfully

assets/icon.png

44.4 KB
Loading

package.json

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,30 @@
11
{
22
"name": "pixi-code",
3-
"displayName": "pixi-code",
4-
"description": "Pixi VSCode integration",
3+
"displayName": "Pixi Code",
4+
"description": "Pixi support for the Python Environments extension",
5+
"icon": "assets/icon.png",
56
"license": "MIT",
67
"version": "0.1.0",
8+
"homepage": "https://github.com/renan-r-santos/pixi-code",
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/renan-r-santos/pixi-code"
12+
},
13+
"bugs": {
14+
"url": "https://github.com/renan-r-santos/pixi-code/issues"
15+
},
16+
"keywords": [
17+
"pixi",
18+
"vscode",
19+
"python",
20+
"conda"
21+
],
722
"engines": {
823
"vscode": "^1.102.0"
924
},
1025
"categories": [
11-
"Other"
26+
"Data Science",
27+
"Programming Languages"
1228
],
1329
"activationEvents": [
1430
"onLanguage:python",
@@ -52,8 +68,7 @@
5268
"pretest": "npm run compile-tests && npm run compile && npm run lint",
5369
"lint": "eslint src",
5470
"format": "prettier --write .",
55-
"format:check": "prettier --check .",
56-
"test": "vscode-test"
71+
"format:check": "prettier --check ."
5772
},
5873
"devDependencies": {
5974
"@types/node": "20.x",

0 commit comments

Comments
 (0)