Skip to content

Commit

Permalink
docs: Separate CI badges for Linux and macOS & Windows
Browse files Browse the repository at this point in the history
feat(cli): Replace argparse with click
feat(dev-container): Update dependencies and add Nox support
feat(dev-container): update dev container and vscode settings
feat(dev-container): Update dev container to use ubuntu-24.04
feat(devcontainer): Install miniconda and update devcontainer
feat(devcontainer): update miniforge installation and pin packages
feat(test): Add OCP dependency and skip Python 3.12 test
fix(noxfile): add python 3.10 to pytest session
fix(test): Skip test for Python 3.12

- Add a TODO for handling CLI Exception
- Add Nox support for running tests with a matrix of operating systems and Python versions.
- Add Nox support to dev-container.yml workflow.
- Add noxfile.py support for specified Python versions.
- Add OCP dependency to test environment and skip Python 3.12 test for macOS.
- Add virtualenv to vscode extensions.
- Also updated noxfile to use the new dependencies.
- Fix assembly test for Python 3.12 on macOS.
- Fix python test workflow by removing commented-out, irrelevant conda install.
- move ubuntu-24.04 tests to dev-container
- Pin `cadquery-ocp` version for consistency.
- remove outdated 3.12/3.13 test skip
- This change addresses some issues with previous versions.
- Update dependencies to latest versions.
- Update dev-container to add notes about OS and python version.
- Update devcontainer.json to add miniconda to PATH.
- Update Dockerfile to install miniconda, resolve issues with libmamba lockfile.
- Update miniforge installation in devcontainer to use `sudo` for installation.
- Update poetry.lock.
- Update the dev container workflow to use ubuntu-24.04 for testing.
  • Loading branch information
alexanderilyin committed Dec 28, 2024
1 parent 17f22b4 commit 924d832
Show file tree
Hide file tree
Showing 150 changed files with 5,927 additions and 2,125 deletions.
File renamed without changes.
7 changes: 5 additions & 2 deletions .devcontainer/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_install_hook_types: [pre-commit, prepare-commit-msg]
# TODO: [TODO-16] @alexanderilyin: Add hook to run pytest via xdist
# TODO: [TODO-17] @alexanderilyin: Add hook to run behave via behavex
# TODO: [TODO-18] @alexanderilyin: Add hook to check author email. We should only accept commits from partcad.org email addresses.
repos:
- repo: https://github.com/partcad/pre-commit
rev: v1.7.1
rev: v1.8.2
hooks:
- id: prepare-commit-msg
args: ["--open-source", "--commit-msg-filename"]
Expand Down Expand Up @@ -39,7 +42,7 @@ repos:
args:
[
"--format=requirements.txt",
"--output=requirements.txt",
"--output=.devcontainer/requirements.txt",
"--with=dev",
"--with=test",
"--with=partcad",
Expand Down
16 changes: 16 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# TODO: @alexanderilyin: Move JIRA CLI installation to Dev Container Templates
# hadolint ignore=DL3007
FROM ghcr.io/ankitpokhrel/jira-cli:latest AS jira

# TODO; @alexanderilyin: Implement SemVer release strategy in https://github.com/partcad/devcontainers-templates/
# hadolint ignore=DL3007
FROM ghcr.io/partcad/devcontainer-partcad:latest

COPY --from=jira /bin/jira /usr/local/bin/jira

# TODO: @alexanderilyin: error libmamba Could not open lockfile '/home/vscode/miniforge3/pkgs/cache/cache.lock' \
# TODO: @alexanderilyin: Run `mamba init`
# hadolint ignore=DL3004
RUN \
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" \
&& sudo -u vscode bash "Miniforge3-$(uname)-$(uname -m).sh" -b -p /home/vscode/miniforge3
11 changes: 11 additions & 0 deletions .devcontainer/allure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
allure:
directory: allure-results
clean: true
links:
- pattern: "https://partcad.atlassian.net/browse/{}"
type: issue
name: Issue
report:
title: "PartCAD Allure Report"
description: "Combined test results for PartCAD"
logo: "https://partcad.org/static/media/logo.ae965d5f99a132f8187e.png"
28 changes: 18 additions & 10 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
{
"name": "PartCAD Dev Container",
// TODO: @alexanderilyin switch to SemVer in image tags
"image": "ghcr.io/partcad/devcontainer-partcad:latest",
"build": {
"dockerfile": "./Dockerfile"
},
"remoteEnv": {
// TODO: @alexanderilyin do not patch PATH here but make `mamba` discoverable.
"PATH": "${containerEnv:PATH}:/home/vscode/miniforge3/bin"
},
"postCreateCommand": {
"setup-utils": "sudo apt-get update && sudo apt-get install -y file xxd",
"~/.cache": "sudo chown -R $(whoami):$(whoami) /home/$(whoami)/.cache"
},
"postStartCommand": {
"pre-commit": "pre-commit install --config .devcontainer/.pre-commit-config.yaml"
},
// "mounts": [
// // TODO: @alexanderilyin: mount ~/.cache/$APP_NAME from persistent named volume
// "source=op,target=${containerWorkspaceFolder}/.op,type=volume"
// ],
"mounts": [
"source=automathor-cache,target=/home/vscode/.cache,type=volume",
"source=automathor-config,target=/home/vscode/.config,type=volume"
],
"customizations": {
"vscode": {
"settings": {
"dotfiles.repository": "partcad/dotfiles"
"dotfiles.repository": "deepspacecartel/dotfiles"
},
// <!-- prettier-ignore-start -->
"extensions": [
// PartCAD TODO: Move extension to PartCAD organization
// PartCAD TODO-19: Move extension to PartCAD organization
"OpenVMP.partcad",
// CAD Viewer
"bernhard-42.ocp-cad-viewer",
Expand All @@ -40,7 +48,7 @@
// Docker Support
"ms-azuretools.vscode-docker",
// YAML Support
// "redhat.vscode-yaml", # TODO:command 'jumpToSchema' already exists
// "redhat.vscode-yaml", # TODO-20:command 'jumpToSchema' already exists
// SVG Support
"jock.svg",
// Jinja Support
Expand Down Expand Up @@ -73,4 +81,4 @@
// <!-- prettier-ignore-end -->
}
}
}
}
82 changes: 81 additions & 1 deletion requirements.txt → .devcontainer/requirements.txt

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

1 change: 0 additions & 1 deletion .git_allowed_signers

This file was deleted.

2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* text=lf
*.step binary
*.png binary
mkdocs/**/*.png filter=lfs diff=lfs merge=lfs -text
*.stl binary
File renamed without changes.
File renamed without changes.
9 changes: 5 additions & 4 deletions README.md → .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

[![License](https://github.com/openvmp/partcad/blob/main/apache20.svg?raw=true)](./LICENSE.txt)

[![CI on Linux, MacOS and Windows](https://github.com/openvmp/partcad/actions/workflows/python-test.yml/badge.svg)](https://github.com/openvmp/partcad/actions/workflows/python-test.yml)
[![CI on MacOS and Windows](https://github.com/openvmp/partcad/actions/workflows/python-test.yml/badge.svg)](https://github.com/openvmp/partcad/actions/workflows/python-test.yml)
[![CI on Linux](https://github.com/partcad/partcad/actions/workflows/dev-container.yml/badge.svg)](https://github.com/openvmp/partcad/actions/workflows/dev-container.yml)
[![CD on Linux, MacOS and Windows](https://github.com/openvmp/partcad/actions/workflows/python-build.yml/badge.svg)](https://github.com/openvmp/partcad/actions/workflows/python-build.yml)
[![Deployment to PyPI](https://github.com/openvmp/partcad/actions/workflows/python-deploy.yml/badge.svg)](https://github.com/openvmp/partcad/actions/workflows/python-deploy.yml)
[![Documentation Status](https://readthedocs.org/projects/partcad/badge/?version=latest)](https://partcad.readthedocs.io/en/latest/?badge=latest)
<a href="https://discord.gg/zdwyxkGM"><img alt="Discord" src="https://img.shields.io/discord/1091497262733074534?logo=discord&logoColor=white&label=Discord&labelColor=353c43&color=31c151"></a>
[![Nox](https://img.shields.io/badge/%F0%9F%A6%8A-Nox-D85E00.svg)](https://github.com/wntrblm/nox)

[PartCAD] is **the first package manager for CAD models** and a framework for managing assemblies.

Expand All @@ -22,7 +24,7 @@ Stay informed and share feedback by joining [our Discord server](https://discord

Subscribe on [LinkedIn], [YouTube], [TikTok], [Facebook], [Instagram], [Threads] and [Twitter/X].

[![PartCAD Visual Studio Code extension](./docs/source/images/vscode1.png)](https://marketplace.visualstudio.com/items?itemName=OpenVMP.partcad)
[![PartCAD Visual Studio Code extension](../docs/source/images/vscode1.png)](https://marketplace.visualstudio.com/items?itemName=OpenVMP.partcad)

## Features

Expand Down Expand Up @@ -59,8 +61,7 @@ Subscribe on [LinkedIn], [YouTube], [TikTok], [Facebook], [Instagram], [Threads]
- Generating with LLM/GenAI
- [x] Google AI (`Gemini`)
- [x] OpenAI (`ChatGPT`)
- [x] Any model in [Ollama](https://ollama.com/) (`Llama 3.1`, `DeepSeek-Coder-V2`, `CodeGemma`,
`Code Llama` etc.)
- [x] Any model in [Ollama](https://ollama.com/) (`Llama 3.1`, `DeepSeek-Coder-V2`, `CodeGemma`, `Code Llama` etc.)
- Part and interface blueprints (2D)
- Using scripting languages
- [x] [CadQuery]
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md → .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@

## Reporting a Vulnerability

Please, email vulnerabilities at [[email protected]](mailto:[email protected]).
Please, email vulnerabilities at [[email protected]](mailto:[email protected]).
2 changes: 2 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ runs:
- name: Init mamba
shell: bash
run: |
command -v mamba
mamba --version
mamba init
touch ~/.bashrc
touch ~/.bash_profile
Expand Down
52 changes: 52 additions & 0 deletions .github/actions/upload-test-results/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Upload Test Results & Coverage Reports

description: Upload test results and coverage reports to GitHub and Codecov

inputs:
name:
description: Name of the artifact to upload to GitHub.
required: true
default: test-results
path:
description: Path to the test results to upload to GitHub.
required: true
status:
description: The status of the job.
required: true
retention-days:
description: Number of days to retain the artifact on GitHub.
required: false
default: "7"
codecov-files:
description: Path to the test results file to upload to Codecov.
required: true
coverage-report:
description: Path to the coverage reports to upload to Codecov.
required: true
token:
description: Codecov token.
required: true

runs:
using: 'composite'
steps:
- name: Upload test results to GitHub
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
retention-days: ${{ inputs.retention-days }}

- name: Upload coverage reports to Codecov
if: ${{ inputs.status }} != 'cancelled'
uses: codecov/codecov-action@v5
with:
files: ${{ inputs.coverage-report }}
token: ${{ inputs.token }}

- name: Upload test results to Codecov
if: ${{ inputs.status }} != 'cancelled'
uses: codecov/test-results-action@v1
with:
files: ${{ inputs.codecov-files }}
token: ${{ inputs.token }}
File renamed without changes
Loading

0 comments on commit 924d832

Please sign in to comment.