Skip to content

Commit e9901cc

Browse files
Initial project (#1)
initial project setup for testing, building, linting, documentation, simple-syslog-grammar/antlr support
1 parent 3912a18 commit e9901cc

33 files changed

+17564
-0
lines changed

.darglint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[darglint]
2+
strictness=short

.flake8

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[flake8]
2+
application-import-names = simple_syslog,tests
3+
select = B,B9,BLK,C,D,DAR,E,F,I,S,W
4+
ignore = E203,W503,E501,D100
5+
max-line-length = 88
6+
max-complexity = 10
7+
docstring-convention = google
8+
9+
exclude =
10+
generated,

.github/workflows/tests.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Tests
2+
on: push
3+
jobs:
4+
tests:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
python-version: ['3.8', '3.9']
9+
name: Python ${{ matrix.python-version }}
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-python@v1
13+
with:
14+
python-version: ${{ matrix.python-version }}
15+
architecture: x64
16+
- run: pip install nox==2022.8.7
17+
- run: pip install nox-poetry==1.0.1
18+
- run: pip install poetry==1.1.14
19+
- run: nox --python ${{ matrix.python-version }}

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# local copy of the generate script ( modified )
2+
generate.sh
3+
# jenv
4+
.java-version
15
# Byte-compiled / optimized / DLL files
26
__pycache__/
37
*.py[cod]
@@ -127,3 +131,6 @@ dmypy.json
127131

128132
# Pyre type checker
129133
.pyre/
134+
135+
# idea
136+
.idea/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "simple_syslog/grammars"]
2+
path = simple_syslog/grammars
3+
url = https://github.com/palindromicity/simple-syslog-grammars.git

.pre-commit-config.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.3.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
exclude: ^simple_syslog/generated/
8+
- id: trailing-whitespace
9+
exclude: ^simple_syslog/generated/
10+
- repo: local
11+
hooks:
12+
- id: black
13+
exclude: ^simple_syslog/generated/
14+
name: black
15+
entry: poetry run black
16+
language: system
17+
types: [python]
18+
- id: flake8
19+
exclude: ^simple_syslog/generated/
20+
name: flake8
21+
entry: poetry run flake8
22+
language: system
23+
types: [ python ]
24+
- id: isort
25+
exclude: ^simple_syslog/generated/
26+
name: isort (python)
27+
entry: poetry run isort
28+
language: system
29+
types: [ python ]

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
1+
<!--
2+
Copyright 2022 simple-syslog authors
3+
All rights reserved.
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License. Copyright 2022 simple-syslog authors
15+
All rights reserved.
16+
-->
17+
[![Tests](https://github.com/palindromicity/simple-syslog-python/workflows/Tests/badge.svg)](https://github.com/palindromicity/simple-syslog-python/actions?workflow=Tests)
18+
119
# simple-syslog-python
220
Python 3 Implementation of simple-syslog
21+
22+
poetry
23+
nox
24+
nox-poetry
25+
26+
generate.sh.local

docs/conf.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""Sphinx configuration."""
2+
project = "simple-syslog"
3+
author = "Otto Fowler"
4+
copyright = f"2022, {author}"
5+
extensions = [
6+
"sphinx.ext.autodoc",
7+
"sphinx.ext.napoleon",
8+
"sphinx_autodoc_typehints",
9+
]

docs/index.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
simple-syslog
2+
==============================
3+
Description
4+
5+
6+
Installation
7+
------------
8+
9+
To install the Hypermodern Python project,
10+
run this command in your terminal:
11+
12+
.. code-block:: console
13+
14+
$ pip install simple-syslog
15+
16+
.. toctree::
17+
:hidden:
18+
:maxdepth: 1
19+
20+
license
21+
reference

docs/license.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
License
2+
=======
3+
4+
.. include:: ../LICENSE

0 commit comments

Comments
 (0)