Skip to content

Commit 6289a22

Browse files
committedMar 30, 2023
feat: WIP current state of the project
1 parent f5ef095 commit 6289a22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3530
-983
lines changed
 
+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: "prerelease"
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
tags:
8+
- "0.*"
9+
- "*.*.*a*"
10+
- "*.*.*b*"
11+
- "*.*.*rc*"
12+
13+
14+
jobs:
15+
build:
16+
name: "📦 Build (Python ${{ matrix.python-version }}, ${{ matrix.os }})"
17+
timeout-minutes: 10
18+
strategy:
19+
matrix:
20+
python-version:
21+
- '3.8'
22+
- 'pypy-3.8'
23+
- '3.9'
24+
- 'pypy-3.9'
25+
- '3.10'
26+
- '3.11'
27+
os: [ ubuntu-latest ]
28+
runs-on: ${{ matrix.os }}
29+
defaults:
30+
run:
31+
shell: bash -l {0}
32+
steps:
33+
- uses: actions/checkout@v3
34+
- uses: actions/setup-python@v4
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
cache: 'poetry'
38+
- run: pipx install poetry
39+
- run: poetry install --with ci --sync
40+
- run: poetry run nox --session build
41+
- uses: actions/upload-artifact@v3
42+
with:
43+
name: "zipapp"
44+
path: "pyggp-*${{ matrix.python-version }}"
45+
if-no-files-found: error
46+
sanity_check:
47+
name: "🔬 Sanity Check (Python ${{ matrix.python-version }}, ${{ matrix.os }})"
48+
timeout-minutes: 10
49+
strategy:
50+
matrix:
51+
python-version: [ '3.11' ]
52+
os: [ ubuntu-22.04, ubuntu-20.04, macos-12, macos-11, windows-2022, windows-2019 ]
53+
runs-on: ${{ matrix.os }}
54+
defaults:
55+
run:
56+
shell: bash -l {0}
57+
steps:
58+
- uses: actions/checkout@v3
59+
- uses: actions/setup-python@v4
60+
with:
61+
python-version: ${{ matrix.python-version }}
62+
# TODO

‎docs/contributing/documenting.md

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Documenting
2+
3+
This document outlines how to consistently document the modules, classes, and functions in pyggp. It mostly follows
4+
the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html).
5+
6+
## Modules
7+
8+
Modules should have a docstring at the top of the file, which should be a short description of the module. A license
9+
boilerplate is *not* necessary.
10+
11+
```python
12+
"""One line summary of the module, terminated by a period.
13+
14+
Optionally more detail description of the module, but only one-line summary is fine as well. Additionally, an Examples
15+
section might be needed, but is not mandatory.
16+
17+
Examples:
18+
>>> import Foo
19+
>>> Foo.bar()
20+
'baz'
21+
22+
"""
23+
```
24+
25+
Test modules are not required to have a docstring.
26+
27+
### Examples
28+
29+
- A module containing exceptions that all end with `TreeError`:
30+
31+
```python
32+
"""Exceptions regarding Trees."""
33+
```
34+
35+
- A module that contains multiple classes all concerned with handling a specific type of data:
36+
37+
```python
38+
"""Classes for trees.
39+
40+
Provides classes for trees, including a base class for all trees, and a class for binary trees with optimizations
41+
applied.
42+
43+
Examples:
44+
>>> import Tree
45+
>>> Tree.BinaryTree()
46+
<BinaryTree>
47+
>>> Tree.Tree()
48+
<Tree>
49+
50+
"""
51+
```
52+
53+
- A module that contains a single class:
54+
55+
```python
56+
"""Prime number sieve."""
57+
```
58+
59+
- A module that contains functions:
60+
61+
```python
62+
"""Functions for internationalization.
63+
64+
Mostly for internal use when logging messages.
65+
66+
"""
67+
```
68+
69+
## Classes
70+
71+
Classes should have a docstring at the top of the class definition, which should be a short description of the class.

0 commit comments

Comments
 (0)
Please sign in to comment.