Skip to content

Commit 1a866c6

Browse files
committed
Initial Scaffold
0 parents  commit 1a866c6

File tree

13 files changed

+2138
-0
lines changed

13 files changed

+2138
-0
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#This is used to automatically add reviewers to PR's. Developers can still manually add reviewers in addition to the below users.
2+
3+
* @zprobst @ccloes

.github/CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributing
2+
3+
Review our Contributing Guide [in the Docs](https://nodestream-proj.github.io/nodestream/contributing).
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG]"
5+
labels: bug
6+
assignees: zprobst
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Additional context**
24+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "[REQUEST]"
5+
labels: enhancement
6+
assignees: zprobst
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/ci.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Continuous Integration
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
python-version: ["3.10", "3.11"]
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Install Poetry
16+
run: curl -sSL https://install.python-poetry.org | python -
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
cache: poetry
22+
cache-dependency-path: poetry.lock
23+
- name: Install Dependenencies
24+
run: |
25+
poetry env use ${{ matrix.python-version }}
26+
poetry install
27+
- name: Run Tests
28+
run: poetry run pytest --cov nodestream_plugin_semantic --cov-report term --cov-report xml
29+
- name: Run Lints
30+
run: |
31+
poetry run ruff nodestream_plugin_semantic tests
32+
poetry run black nodestream_plugin_semantic tests --check
33+
poetry run isort nodestream_plugin_semantic tests --check-only
34+
- name: Upload coverage reports to Codecov
35+
uses: codecov/codecov-action@v3
36+
with:
37+
token: ${{ secrets.CODECOV_TOKEN }}
38+
flags: ${{ matrix.python-version }}

.github/workflows/release.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Release
2+
3+
# Trigger the workflow on a release event.
4+
# This will trigger the workflow when a release is published - so draft releases will not trigger the workflow.
5+
on:
6+
release:
7+
types: [published]
8+
9+
jobs:
10+
publish:
11+
# Name of the job for the workflow.
12+
name: Publish Package to PyPI
13+
runs-on: ubuntu-latest
14+
15+
# Get the oidc token with write permissions to upload the package to PyPI.
16+
# We have configured the trusted OIDC token in the pypi project settings.
17+
# See here: https://docs.pypi.org/trusted-publishers/using-a-publisher/
18+
permissions:
19+
id-token: write
20+
attestations: write
21+
22+
# Use the Github Actions Environment to isolate the workflow from the rest of the repository.
23+
# See here: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment
24+
environment:
25+
name: pypi
26+
url: https://pypi.org/p/nodestream-plugin-dotenv/
27+
28+
steps:
29+
# Checkout the repository subject to the release.
30+
- uses: actions/checkout@v4
31+
32+
# Install poetry to build the package.
33+
- name: Install poetry
34+
run: pipx install poetry
35+
36+
# Set up Python 3.12 to build the package.
37+
# Python version here does not really matter as long as it works with
38+
# poetry because its simply building the package. We've confirmed functionality
39+
# with CI testing before this step.
40+
- name: Set up Python 3.12
41+
uses: actions/setup-python@v5
42+
with:
43+
python-version: 3.12
44+
cache: 'poetry'
45+
46+
# Build the package using poetry. This will create a dist directory with the package.
47+
# Poetry isn't _special_ in the sense that it builds packages in some unique way.
48+
# Therefore, we can use poetry built packaes with PyPA's action for publishing packages below.
49+
# See: https://python-poetry.org/docs/cli/#build
50+
- name: Build Package
51+
run: poetry build
52+
53+
# Publish the package to PyPI using the OIDC token and PyPA's action for publishing packages.
54+
# By default, this action will publish to the PyPI server and pull artifacts from the dist directory.
55+
# Dist directory is where poetry builds the package in the previous step.
56+
# See:
57+
# - https://github.com/marketplace/actions/pypi-publish
58+
# - https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
59+
- name: Publish package distributions to PyPI
60+
uses: pypa/gh-action-pypi-publish@release/v1
61+
62+
# We are then going to store the built package as an artifact.
63+
# This is so we can sign the package and upload it to the GitHub release.
64+
# this is being done as a seperate job so that we can minimize the permissions needed for the publish job.
65+
- name: Store the Built Package
66+
uses: actions/upload-artifact@v3
67+
with:
68+
name: python-package-distribution
69+
path: dist/
70+
71+
# We are then going to sign the package using Github's Attest Build Provenance action.
72+
# This action will sign the package and upload the signature to the GitHub release.
73+
# This is to ensure that the package is verified and trusted by the user.
74+
- uses: actions/attest-build-provenance@v1
75+
with:
76+
subject-path: 'dist/*'

.gitignore

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# poetry
98+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102+
#poetry.lock
103+
104+
# pdm
105+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106+
#pdm.lock
107+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108+
# in version control.
109+
# https://pdm.fming.dev/#use-with-ide
110+
.pdm.toml
111+
112+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113+
__pypackages__/
114+
115+
# Celery stuff
116+
celerybeat-schedule
117+
celerybeat.pid
118+
119+
# SageMath parsed files
120+
*.sage.py
121+
122+
# Environments
123+
.env
124+
.venv
125+
env/
126+
venv/
127+
ENV/
128+
env.bak/
129+
venv.bak/
130+
131+
# Spyder project settings
132+
.spyderproject
133+
.spyproject
134+
135+
# Rope project settings
136+
.ropeproject
137+
138+
# mkdocs documentation
139+
/site
140+
141+
# mypy
142+
.mypy_cache/
143+
.dmypy.json
144+
dmypy.json
145+
146+
# Pyre type checker
147+
.pyre/
148+
149+
# pytype static type analyzer
150+
.pytype/
151+
152+
# Cython debug symbols
153+
cython_debug/
154+
155+
# PyCharm
156+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158+
# and can be added to the global gitignore or merged into this file. For a more nuclear
159+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160+
#.idea/

0 commit comments

Comments
 (0)