Skip to content

Commit

Permalink
cadquery -> build123d
Browse files Browse the repository at this point in the history
  • Loading branch information
keeeal committed Apr 19, 2024
1 parent 6d9a386 commit 835c7fb
Show file tree
Hide file tree
Showing 20 changed files with 612 additions and 152 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Format

on:
push:
branches:
- main
pull_request:

jobs:
check-formatting:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
make install dev=true
- name: Check formatting
run: |
make format check=true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload Python Package
name: Publish

on:
release:
Expand All @@ -8,22 +8,25 @@ permissions:
contents: read

jobs:
deploy:

publish-package:
name: Publish package
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade pip
pip install build
- name: Build package
run: python -m build

- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test

on:
push:
branches:
- main
pull_request:

jobs:
run-tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
make install dev=true
- name: Run tests
run: |
make test
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
.PHONY: lock docs
.PHONY: install format test lock docs clean

pip-compile-options = --quiet --upgrade --no-emit-index-url

# Lock all requirements
# Install package. Usage: make install [dev=true]
install:
pip install --upgrade pip pip-tools
pip install -r requirements$(if $(dev),-dev,).txt
pip install -e .

# Format code. Usage: make format [check=true]
format:
isort $(if $(check),--check,) .
black $(if $(check),--check,) .

# Run unit tests
test:
pytest .

# Lock requirements
lock:
pip-compile \
$(pip-compile-options) \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# cq-extrusions
A CadQuery library of extrusions
# bd-extrusions
A build123d library of extrusions
24 changes: 7 additions & 17 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
# Configuration file for the Sphinx documentation builder.
from datetime import date

# -- Project information

project = 'cq-extrusions'
copyright = '2024, James Keal'
author = 'James Keal'
release = '0.0.1'

# -- General configuration
project = "bd-extrusions"
release = "0.0.1"
author = "James Keal"
copyright = f"{date.today().year}, {author}"

extensions = [
"autodoc2",
"myst_parser",
"sphinx.ext.autodoc",
]
autodoc2_packages = [
"../src/cq_extrusions",
]

# -- Options for HTML output

html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"
6 changes: 0 additions & 6 deletions docs/index.md

This file was deleted.

7 changes: 7 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Welcome to bd-extrusions's documentation!
=========================================

.. toctree::

vslot
apidocs/index
4 changes: 0 additions & 4 deletions docs/vslot.md

This file was deleted.

7 changes: 7 additions & 0 deletions docs/vslot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
V-Slot
======

.. autodoc2-object:: bd_extrusions.vslot

render_plugin = "rst"
no_index = true
14 changes: 7 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "cq-extrusions"
name = "bd-extrusions"
version = "0.0.1"
authors = [
{ name="James Keal", email="[email protected]" },
]
description = "A CadQuery library of extrusions"
description = "A build123d library of extrusions"
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"cadquery>=2.4.0",
"build123d>=0.5.0",
]
optional-dependencies.dev = [

[project.optional-dependencies]
dev = [
"black",
"isort",
"mypy",
"myst-parser",
"pytest",
"sphinx-autodoc2",
"sphinx-rtd-theme",
"sphinx",
]

[project.urls]
Github = "https://github.com/keeeal/cq-extrusions"
Github = "https://github.com/keeeal/bd-extrusions"
Loading

0 comments on commit 835c7fb

Please sign in to comment.