Skip to content

Commit 712f29e

Browse files
authored
Merge pull request #5 from python-project-templates/tkp/impl
WIP implementing
2 parents 4bdc55f + 8ec13f5 commit 712f29e

17 files changed

+531
-580
lines changed

Diff for: .copier-answers.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Changes here will be overwritten by Copier
2-
_commit: b6bd6c7
2+
_commit: 81e8acd
33
_src_path: [email protected]:python-project-templates/base.git
44
add_extension: python
5-
5+
email: t.paine154@gmail.com
66
github: python-project-templates
77
project_description: Hatch plugin for C++ builds
88
project_name: hatch cpp

Diff for: .github/CODE_OF_CONDUCT.md

+47-99
Original file line numberDiff line numberDiff line change
@@ -2,127 +2,75 @@
22

33
## Our Pledge
44

5-
We as members, contributors, and leaders pledge to make participation in our
6-
community a harassment-free experience for everyone, regardless of age, body
7-
size, visible or invisible disability, ethnicity, sex characteristics, gender
8-
identity and expression, level of experience, education, socio-economic status,
9-
nationality, personal appearance, race, religion, or sexual identity
10-
and orientation.
11-
12-
We pledge to act and interact in ways that contribute to an open, welcoming,
13-
diverse, inclusive, and healthy community.
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
1411

1512
## Our Standards
1613

17-
Examples of behavior that contributes to a positive environment for our
18-
community include:
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
1916

20-
* Demonstrating empathy and kindness toward other people
21-
* Being respectful of differing opinions, viewpoints, and experiences
22-
* Giving and gracefully accepting constructive feedback
23-
* Accepting responsibility and apologizing to those affected by our mistakes,
24-
and learning from the experience
25-
* Focusing on what is best not just for us as individuals, but for the
26-
overall community
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
2722

28-
Examples of unacceptable behavior include:
23+
Examples of unacceptable behavior by participants include:
2924

30-
* The use of sexualized language or imagery, and sexual attention or
31-
advances of any kind
32-
* Trolling, insulting or derogatory comments, and personal or political attacks
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
3328
* Public or private harassment
34-
* Publishing others' private information, such as a physical or email
35-
address, without their explicit permission
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
3631
* Other conduct which could reasonably be considered inappropriate in a
37-
professional setting
32+
professional setting
3833

39-
## Enforcement Responsibilities
34+
## Our Responsibilities
4035

41-
Community leaders are responsible for clarifying and enforcing our standards of
42-
acceptable behavior and will take appropriate and fair corrective action in
43-
response to any behavior that they deem inappropriate, threatening, offensive,
44-
or harmful.
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
4539

46-
Community leaders have the right and responsibility to remove, edit, or reject
47-
comments, commits, code, wiki edits, issues, and other contributions that are
48-
not aligned to this Code of Conduct, and will communicate reasons for moderation
49-
decisions when appropriate.
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
5045

5146
## Scope
5247

53-
This Code of Conduct applies within all community spaces, and also applies when
54-
an individual is officially representing the community in public spaces.
55-
Examples of representing our community include using an official e-mail address,
56-
posting via an official social media account, or acting as an appointed
57-
representative at an online or offline event.
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
5854

5955
## Enforcement
6056

6157
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62-
reported to the community leaders responsible for enforcement at
63-
64-
All complaints will be reviewed and investigated promptly and fairly.
65-
66-
All community leaders are obligated to respect the privacy and security of the
67-
reporter of any incident.
68-
69-
## Enforcement Guidelines
70-
71-
Community leaders will follow these Community Impact Guidelines in determining
72-
the consequences for any action they deem in violation of this Code of Conduct:
73-
74-
### 1. Correction
75-
76-
**Community Impact**: Use of inappropriate language or other behavior deemed
77-
unprofessional or unwelcome in the community.
78-
79-
**Consequence**: A private, written warning from community leaders, providing
80-
clarity around the nature of the violation and an explanation of why the
81-
behavior was inappropriate. A public apology may be requested.
82-
83-
### 2. Warning
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
8463

85-
**Community Impact**: A violation through a single incident or series
86-
of actions.
87-
88-
**Consequence**: A warning with consequences for continued behavior. No
89-
interaction with the people involved, including unsolicited interaction with
90-
those enforcing the Code of Conduct, for a specified period of time. This
91-
includes avoiding interactions in community spaces as well as external channels
92-
like social media. Violating these terms may lead to a temporary or
93-
permanent ban.
94-
95-
### 3. Temporary Ban
96-
97-
**Community Impact**: A serious violation of community standards, including
98-
sustained inappropriate behavior.
99-
100-
**Consequence**: A temporary ban from any sort of interaction or public
101-
communication with the community for a specified period of time. No public or
102-
private interaction with the people involved, including unsolicited interaction
103-
with those enforcing the Code of Conduct, is allowed during this period.
104-
Violating these terms may lead to a permanent ban.
105-
106-
### 4. Permanent Ban
107-
108-
**Community Impact**: Demonstrating a pattern of violation of community
109-
standards, including sustained inappropriate behavior, harassment of an
110-
individual, or aggression toward or disparagement of classes of individuals.
111-
112-
**Consequence**: A permanent ban from any sort of public interaction within
113-
the community.
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
11467

11568
## Attribution
11669

117-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118-
version 2.0, available at
119-
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120-
121-
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122-
enforcement ladder](https://github.com/mozilla/diversity).
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
12372

12473
[homepage]: https://www.contributor-covenant.org
12574

126-
For answers to common questions about this code of conduct, see the FAQ at
127-
https://www.contributor-covenant.org/faq. Translations are available at
128-
https://www.contributor-covenant.org/translations.
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

Diff for: .github/workflows/build.yml

+24-38
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@ on:
77
tags:
88
- v*
99
paths-ignore:
10-
- docs/
1110
- LICENSE
1211
- README.md
1312
pull_request:
13+
branches:
14+
- main
1415
workflow_dispatch:
1516

1617
concurrency:
1718
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1819
cancel-in-progress: true
1920

2021
permissions:
21-
contents: write
22+
contents: read
2223
checks: write
2324
pull-requests: write
2425

@@ -28,10 +29,8 @@ jobs:
2829

2930
strategy:
3031
matrix:
31-
# os: [ubuntu-latest, macos-latest, windows-latest]
3232
os: [ubuntu-latest, macos-latest]
33-
python-version: [3.9, 3.11]
34-
node-version: [18.x]
33+
python-version: ["3.9"]
3534

3635
steps:
3736
- uses: actions/checkout@v4
@@ -40,60 +39,47 @@ jobs:
4039
uses: actions/setup-python@v5
4140
with:
4241
python-version: ${{ matrix.python-version }}
43-
cache: "pip"
42+
cache: 'pip'
4443
cache-dependency-path: 'pyproject.toml'
4544

46-
- name: Install pandoc via brew
47-
run: brew install pandoc
48-
if: ${{ matrix.os == 'macos-latest' }}
49-
50-
- name: Install pandoc via apt
51-
run: sudo apt install pandoc
52-
if: ${{ matrix.os == 'ubuntu-latest' }}
53-
54-
- name: Install pnpm
55-
uses: pnpm/action-setup@v4
56-
with:
57-
version: 9
58-
package_json_file: js/package.json
59-
6045
- name: Install dependencies
6146
run: make develop
6247

63-
- name: Build
64-
run: make build
65-
6648
- name: Lint
6749
run: make lint
6850

51+
- name: Checks
52+
run: make checks
53+
54+
- name: Build
55+
run: make build
56+
6957
- name: Test
70-
run: make tests
71-
if: ${{ matrix.os == 'ubuntu-latest' }}
58+
run: make coverage
7259

7360
- name: Upload test results (Python)
7461
uses: actions/upload-artifact@v4
7562
with:
76-
name: py-test-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.node-version}}
63+
name: test-results-${{ matrix.os }}-${{ matrix.python-version }}
7764
path: junit.xml
78-
if: ${{ matrix.os == 'ubuntu-latest' }}
79-
80-
- name: Upload test results (JS)
81-
uses: actions/upload-artifact@v4
82-
with:
83-
name: js-test-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.node-version}}
84-
path: js/junit.xml
85-
if: ${{ matrix.os == 'ubuntu-latest' }}
65+
if: ${{ always() }}
8666

8767
- name: Publish Unit Test Results
8868
uses: EnricoMi/publish-unit-test-result-action@v2
8969
with:
90-
files: |
91-
**/junit.xml
92-
if: ${{ matrix.os == 'ubuntu-latest' }}
70+
files: '**/junit.xml'
71+
if: matrix.os == 'ubuntu-latest'
9372

9473
- name: Upload coverage
9574
uses: codecov/codecov-action@v5
75+
with:
76+
token: ${{ secrets.CODECOV_TOKEN }}
9677

97-
- name: Twine check
78+
- name: Make dist
9879
run: make dist
9980

81+
- uses: actions/upload-artifact@v4
82+
with:
83+
name: dist-${{matrix.os}}
84+
path: dist
85+
if: matrix.os == 'ubuntu-latest'

Diff for: .github/workflows/copier.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Copier Updates
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 5 * * 0"
7+
8+
jobs:
9+
update:
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions-ext/copier-update@main
16+
with:
17+
token: ${{ secrets.WORKFLOW_TOKEN }}

Diff for: Makefile

+4-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ develop: ## install dependencies and build library
77
python -m pip install -e .[develop]
88

99
build: ## build the python library
10-
python -m build . -n
10+
python -m build -n
1111

1212
install: ## install library
1313
python -m pip install .
@@ -34,7 +34,7 @@ format: fix
3434
################
3535
# Other Checks #
3636
################
37-
.PHONY: check-manifest checks check annotate
37+
.PHONY: check-manifest checks check
3838

3939
check-manifest: ## check python sdist manifest with check-manifest
4040
check-manifest -v
@@ -44,19 +44,16 @@ checks: check-manifest
4444
# Alias
4545
check: checks
4646

47-
annotate: ## run python type annotation checks with mypy
48-
python -m mypy ./hatch_cpp
49-
5047
#########
5148
# TESTS #
5249
#########
5350
.PHONY: test coverage tests
5451

5552
test: ## run python tests
56-
python -m pytest -v hatch_cpp/tests --junitxml=junit.xml
53+
python -m pytest -v hatch_cpp/tests
5754

5855
coverage: ## run tests and collect test coverage
59-
python -m pytest -v hatch_cpp/tests --junitxml=junit.xml --cov=hatch_cpp --cov-branch --cov-fail-under=50 --cov-report term-missing --cov-report xml
56+
python -m pytest -v hatch_cpp/tests --cov=hatch_cpp --cov-report term-missing --cov-report xml
6057

6158
# Alias
6259
tests: test

Diff for: README.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
# hatch-cpp
22

3-
Hatch plugin for C++ Projects
3+
Hatch plugin for C++ builds
4+
5+
[![Build Status](https://github.com/python-project-templates/hatch-cpp/actions/workflows/build.yml/badge.svg?branch=main&event=push)](https://github.com/python-project-templates/hatch-cpp/actions/workflows/build.yml)
6+
[![codecov](https://codecov.io/gh/python-project-templates/hatch-cpp/branch/main/graph/badge.svg)](https://codecov.io/gh/python-project-templates/hatch-cpp)
7+
[![License](https://img.shields.io/github/license/python-project-templates/hatch-cpp)](https://github.com/python-project-templates/hatch-cpp)
8+
[![PyPI](https://img.shields.io/pypi/v/hatch-cpp.svg)](https://pypi.python.org/pypi/hatch-cpp)
9+
10+
## Overview
11+
12+
> [!NOTE]
13+
> This library was generated using [copier](https://copier.readthedocs.io/en/stable/) from the [Base Python Project Template repository](https://github.com/python-project-templates/base).

Diff for: hatch_cpp/__init__.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
__version__ = "0.1.0"
2-
3-
from .utils import cpp_builder

0 commit comments

Comments
 (0)