Skip to content

Commit 5e3e91f

Browse files
authored
Merge pull request #25 from Point72/tkp/cop
Uplift to copier template
2 parents 2702314 + 99c4fc4 commit 5e3e91f

13 files changed

Lines changed: 124 additions & 79 deletions

File tree

.copier-answers.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changes here will be overwritten by Copier
2+
_commit: 2d0c192
3+
_src_path: https://github.com/python-project-templates/base.git
4+
add_docs: false
5+
add_extension: python
6+
add_wiki: true
7+
email: OpenSource@point72.com
8+
github: Point72
9+
project_description: Reactive chat bot framework
10+
project_name: csp bot
11+
python_version_primary: '3.9'
12+
team: Point72, L.P.

.github/CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
5555
## Enforcement
5656

5757
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at CSPOpenSource@point72.com. All
58+
reported by contacting the project team at OpenSource@point72.com. All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate to the circumstances. The project team is
6161
obligated to maintain confidentiality with regard to the reporter of an incident.

.github/dependabot.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# version: 2
2-
# updates:
3-
# - package-ecosystem: "github-actions"
4-
# directory: "/"
5-
# schedule:
6-
# interval: "weekly"
7-
# labels:
8-
# - "part: github_actions"
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
labels:
8+
- "part: github_actions"
99

10-
# - package-ecosystem: "pip"
11-
# directory: "/"
12-
# schedule:
13-
# interval: "monthly"
14-
# labels:
15-
# - "lang: python"
16-
# - "part: dependencies"
10+
- package-ecosystem: "pip"
11+
directory: "/"
12+
schedule:
13+
interval: "monthly"
14+
labels:
15+
- "lang: python"
16+
- "part: dependencies"

.github/workflows/build.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,14 @@ jobs:
3030
strategy:
3131
matrix:
3232
os: [ubuntu-latest]
33-
python-version: ["3.11"]
33+
python-version: ["3.9"]
3434

3535
steps:
3636
- uses: actions/checkout@v4
3737

38-
- name: Set up Python ${{ matrix.python-version }}
39-
uses: actions/setup-python@v5
38+
- uses: actions-ext/python/setup@main
4039
with:
41-
python-version: ${{ matrix.python-version }}
42-
cache: 'pip'
43-
cache-dependency-path: 'pyproject.toml'
40+
version: ${{ matrix.python-version }}
4441

4542
- name: Install dependencies
4643
run: make develop

.github/workflows/copier.yaml

Lines changed: 17 additions & 0 deletions
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 }}

.github/workflows/wiki.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Docs
1+
name: Publish Wiki
22

33
on:
44
push:
@@ -20,13 +20,8 @@ jobs:
2020
deploy:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- name: Checkout
24-
uses: actions/checkout@v4
25-
26-
- name: Make home file
27-
run: cp README.md docs/wiki/Home.md
28-
29-
- name: Upload Documentation to Wiki
30-
uses: Andrew-Chen-Wang/github-wiki-action@v4
23+
- uses: actions/checkout@v4
24+
- run: cp README.md docs/wiki/Home.md
25+
- uses: Andrew-Chen-Wang/github-wiki-action@v5
3126
with:
3227
path: docs/wiki

.gitignore

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ __pycache__/
44
*$py.class
55

66
# C extensions
7+
*.a
78
*.so
9+
*.obj
810
*.dll
11+
*.exp
12+
*.lib
913

1014
# Distribution / packaging
1115
.Python
@@ -29,8 +33,6 @@ share/python-wheels/
2933
MANIFEST
3034

3135
# PyInstaller
32-
# Usually these files are written by a python script from a template
33-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
3436
*.manifest
3537
*.spec
3638

@@ -81,11 +83,7 @@ ipython_config.py
8183
.python-version
8284

8385
# pipenv
84-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
85-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
86-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
87-
# install all needed dependencies.
88-
#Pipfile.lock
86+
Pipfile.lock
8987

9088
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
9189
__pypackages__/
@@ -125,15 +123,31 @@ dmypy.json
125123
.pyre/
126124

127125
# Documentation
128-
docs/_build/
129126
/site
127+
index.md
128+
docs/_build/
129+
docs/src/_build/
130130
docs/api
131131
docs/index.md
132-
_template/labextension
132+
docs/html
133+
docs/jupyter_execute
134+
index.md
135+
136+
# JS
137+
js/coverage
138+
js/dist
139+
js/lib
140+
js/node_modules
141+
js/*.tgz
142+
csp_bot/extension
133143

134144
# Jupyter
135145
.ipynb_checkpoints
136146
.autoversion
147+
!csp_bot/extension/csp_bot.json
148+
!csp_bot/extension/install.json
149+
csp_bot/nbextension
150+
csp_bot/labextension
137151

138152
# Mac
139153
.DS_Store

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2024 the csp-bot authors
189+
Copyright 2024 Point72, L.P.
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

Makefile

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,40 @@
44
.PHONY: develop build install
55

66
develop: ## install dependencies and build library
7-
python -m pip install -e .[develop]
7+
uv pip install -e .[develop]
8+
9+
requirements: ## install prerequisite python build requirements
10+
python -m pip install --upgrade pip toml
11+
python -m pip install `python -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))'`
12+
python -m pip install `python -c 'import toml; c = toml.load("pyproject.toml"); print(" ".join(c["project"]["optional-dependencies"]["develop"]))'`
813

914
build: ## build the python library
1015
python -m build -n
1116

1217
install: ## install library
13-
python -m pip install .
18+
uv pip install .
1419

1520
#########
1621
# LINTS #
1722
#########
18-
.PHONY: lint lints fix format lint-py lint-docs fix-py fix-docs
23+
.PHONY: lint-py lint-docs fix-py fix-docs lint lints fix format
1924

20-
lint-py: ## run python linter with ruff
25+
lint-py: ## lint python with ruff
2126
python -m ruff check csp_bot
2227
python -m ruff format --check csp_bot
2328

2429
lint-docs: ## lint docs with mdformat and codespell
25-
python -m mdformat --check docs/wiki/ README.md
26-
python -m codespell_lib docs/wiki/ README.md
30+
python -m mdformat --check README.md docs/wiki/
31+
python -m codespell_lib README.md docs/wiki/
2732

28-
fix-py: ## fix python formatting with ruff
33+
fix-py: ## autoformat python code with ruff
2934
python -m ruff check --fix csp_bot
3035
python -m ruff format csp_bot
3136

3237
fix-docs: ## autoformat docs with mdformat and codespell
33-
python -m mdformat docs/wiki/ README.md
34-
python -m codespell_lib --write docs/wiki/ README.md
38+
python -m mdformat README.md docs/wiki/
39+
python -m codespell_lib --write README.md docs/wiki/
3540

36-
# alias
3741
lint: lint-py lint-docs ## run all linters
3842
lints: lint
3943
fix: fix-py fix-docs ## run all autoformatters

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<br/>
99

1010
[![Build Status](https://github.com/point72/csp-bot/actions/workflows/build.yaml/badge.svg?branch=main&event=push)](https://github.com/point72/csp-bot/actions/workflows/build.yaml)
11-
[![codecov](https://codecov.io/gh/point72/csp-bot/branch/main/graph/badge.svg)](https://codecov.io/gh/point72/csp-bot)
11+
[![codecov](https://codecov.io/gh/Point72/csp-bot/branch/main/graph/badge.svg)](https://codecov.io/gh/Point72/csp-bot)
1212
[![GitHub issues](https://img.shields.io/github/issues/point72/csp-bot.svg)](https://github.com/point72/csp-bot/issues)
13-
[![PyPI](https://img.shields.io/pypi/l/csp-bot.svg)](https://pypi.python.org/pypi/csp-bot)
13+
[![License](https://img.shields.io/github/license/Point72/csp-bot)](https://github.com/Point72/csp-bot)
1414
[![PyPI](https://img.shields.io/pypi/v/csp-bot.svg)](https://pypi.python.org/pypi/csp-bot)
1515

1616
## Features

0 commit comments

Comments
 (0)