Skip to content

Commit 03586ee

Browse files
authored
Release the initial version. (#1)
1 parent 93aad67 commit 03586ee

37 files changed

+1898
-16
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
### Bug description
11+
12+
A clear and concise description of what the bug is.
13+
14+
### To Reproduce
15+
16+
Ideally, provide a minimal code example. If that's not possible, describe steps to reproduce the bug.
17+
18+
### Expected behavior
19+
20+
A clear and concise description of what you expected to happen.
21+
22+
### Screenshots/Error messages
23+
24+
If applicable, add screenshots to help explain your problem.
25+
26+
### System
27+
28+
- OS: [e.g. Ubuntu 18.04]
29+
- Version [e.g. 0.0.1]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Enhancement
3+
about: Enhance an existing component.
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
* pybaum version used, if any:
11+
* Python version, if any:
12+
* Operating System:
13+
14+
### What would you like to enhance and why? Is it related to an issue/problem?
15+
16+
A clear and concise description of the current implementation and its limitations.
17+
18+
### Describe the solution you'd like
19+
20+
A clear and concise description of what you want to happen.
21+
22+
### Describe alternatives you've considered
23+
24+
A clear and concise description of any alternative solutions or features you've
25+
considered and why you have discarded them.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: feature-request
6+
assignees: ''
7+
8+
---
9+
10+
### Current situation
11+
12+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]; Currently there is no way of [...]
13+
14+
### Desired Situation
15+
16+
What functionality should become possible or easier?
17+
18+
### Proposed implementation
19+
20+
How would you implement the new feature? Did you consider alternative implementations?
21+
You can start by describing interface changes like a new argument or a new function. There is no need to get too detailed here.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### What problem do you want to solve?
2+
3+
Reference the issue or discussion, if there is any. Provide a description of your
4+
proposed solution.
5+
6+
### Todo
7+
8+
- [ ] Target the right branch and pick an appropriate title.
9+
- [ ] Put `Closes #XXXX` in the first PR comment to auto-close the relevant issue once
10+
the PR is accepted. This is not applicable if there is no corresponding issue.
11+
- [ ] Any steps that still need to be done.
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Continuous Integration Workflow
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- '*'
9+
10+
# Automatically cancel a previous run.
11+
concurrency:
12+
group: ${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
17+
run-tests:
18+
19+
name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }}
20+
runs-on: ${{ matrix.os }}
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
26+
python-version: ['3.7', '3.8', 3.9]
27+
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: conda-incubator/setup-miniconda@v2
31+
with:
32+
auto-update-conda: true
33+
python-version: ${{ matrix.python-version }}
34+
35+
- name: Install core dependencies.
36+
shell: bash -l {0}
37+
run: conda install -c conda-forge tox-conda
38+
39+
- name: Install fixes for Python 3.7 on Windows
40+
if: runner.os == 'Windows' && matrix.python-version == '3.7'
41+
shell: bash -l {0}
42+
run: conda install -c conda-forge bokeh conda-build numpy scipy joblib
43+
44+
- name: Run pytest.
45+
shell: bash -l {0}
46+
run: tox -e pytest -- -m "not slow" --cov-report=xml --cov=./
47+
48+
- name: Upload coverage report.
49+
if: runner.os == 'Linux' && matrix.python-version == '3.8'
50+
uses: codecov/codecov-action@v1
51+
with:
52+
token: ${{ secrets.CODECOV_TOKEN }}
53+
54+
55+
pre-commit:
56+
57+
name: Run pre-commit.
58+
runs-on: ubuntu-latest
59+
60+
steps:
61+
- uses: actions/checkout@v2
62+
63+
- name: Set up Python 3.8
64+
uses: actions/setup-python@v1
65+
with:
66+
python-version: 3.8
67+
68+
- name: Install dependencies
69+
run: pip install tox
70+
71+
- name: Run pre-commit
72+
run: tox -e pre-commit
73+
74+
75+
docs:
76+
77+
name: Run documentation.
78+
runs-on: ubuntu-latest
79+
80+
steps:
81+
- uses: actions/checkout@v2
82+
- uses: conda-incubator/setup-miniconda@v2
83+
with:
84+
auto-update-conda: true
85+
python-version: 3.8
86+
87+
- name: Install core dependencies.
88+
shell: bash -l {0}
89+
run: conda install -c conda-forge tox-conda
90+
91+
- name: Build docs
92+
shell: bash -l {0}
93+
run: tox -e sphinx
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: PyPI
2+
3+
on: push
4+
5+
jobs:
6+
build-n-publish:
7+
name: Build and publish Python 🐍 distributions 📦 to PyPI
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@master
11+
12+
- name: Set up Python 3.8
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: 3.8
16+
17+
- name: Install pypa/build
18+
run: >-
19+
python -m
20+
pip install
21+
build
22+
--user
23+
- name: Build a binary wheel and a source tarball
24+
run: >-
25+
python -m
26+
build
27+
--sdist
28+
--wheel
29+
--outdir dist/
30+
- name: Publish distribution 📦 to PyPI
31+
if: startsWith(github.ref, 'refs/tags')
32+
uses: pypa/gh-action-pypi-publish@master
33+
with:
34+
password: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,6 @@ dmypy.json
127127

128128
# Pyre type checker
129129
.pyre/
130+
131+
132+
src/pybaum/_version.py

.pre-commit-config.yaml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.0.1
4+
hooks:
5+
- id: check-merge-conflict
6+
- id: debug-statements
7+
- id: end-of-file-fixer
8+
- repo: https://github.com/asottile/reorder_python_imports
9+
rev: v2.6.0
10+
hooks:
11+
- id: reorder-python-imports
12+
types: [python]
13+
- repo: https://github.com/pre-commit/pre-commit-hooks
14+
rev: v4.0.1
15+
hooks:
16+
- id: check-added-large-files
17+
args: ['--maxkb=100']
18+
- id: check-case-conflict
19+
- id: check-merge-conflict
20+
- id: check-vcs-permalinks
21+
- id: check-yaml
22+
- id: debug-statements
23+
- id: end-of-file-fixer
24+
- id: fix-byte-order-marker
25+
- id: mixed-line-ending
26+
- id: no-commit-to-branch
27+
args: [--branch, main]
28+
- id: trailing-whitespace
29+
- repo: https://github.com/pre-commit/pygrep-hooks
30+
rev: v1.9.0
31+
hooks:
32+
- id: python-check-blanket-noqa
33+
- id: python-check-mock-methods
34+
- id: python-no-eval
35+
- id: python-no-log-warn
36+
- id: python-use-type-annotations
37+
- id: rst-backticks
38+
- id: rst-directive-colons
39+
- id: rst-inline-touching-normal
40+
- id: text-unicode-replacement-char
41+
- repo: https://github.com/asottile/blacken-docs
42+
rev: v1.12.0
43+
hooks:
44+
- id: blacken-docs
45+
additional_dependencies: [black]
46+
types: [rst]
47+
- repo: https://github.com/psf/black
48+
rev: 21.12b0
49+
hooks:
50+
- id: black
51+
types: [python]
52+
- repo: https://github.com/PyCQA/flake8
53+
rev: 4.0.1
54+
hooks:
55+
- id: flake8
56+
types: [python]
57+
additional_dependencies: [
58+
flake8-alfred,
59+
flake8-bugbear,
60+
flake8-builtins,
61+
flake8-comprehensions,
62+
flake8-docstrings,
63+
flake8-eradicate,
64+
flake8-print,
65+
flake8-pytest-style,
66+
flake8-todo,
67+
flake8-typing-imports,
68+
flake8-unused-arguments,
69+
pep8-naming,
70+
pydocstyle,
71+
Pygments,
72+
]
73+
- repo: https://github.com/PyCQA/doc8
74+
rev: 0.10.1
75+
hooks:
76+
- id: doc8
77+
- repo: meta
78+
hooks:
79+
- id: check-hooks-apply
80+
- id: check-useless-excludes
81+
# - id: identity # Prints all files passed to pre-commits. Debugging.
82+
- repo: https://github.com/mgedmin/check-manifest
83+
rev: "0.47"
84+
hooks:
85+
- id: check-manifest
86+
- repo: https://github.com/PyCQA/doc8
87+
rev: 0.10.1
88+
hooks:
89+
- id: doc8
90+
- repo: https://github.com/asottile/setup-cfg-fmt
91+
rev: v1.20.0
92+
hooks:
93+
- id: setup-cfg-fmt
94+
- repo: https://github.com/econchick/interrogate
95+
rev: 1.5.0
96+
hooks:
97+
- id: interrogate
98+
args: [-v, --fail-under=20]
99+
exclude: ^(docs|setup\.py)
100+
- repo: https://github.com/codespell-project/codespell
101+
rev: v2.1.0
102+
hooks:
103+
- id: codespell
104+
- repo: https://github.com/asottile/pyupgrade
105+
rev: v2.31.0
106+
hooks:
107+
- id: pyupgrade
108+
args: [--py37-plus]

.readthedocs.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
3+
build:
4+
image: latest
5+
6+
python:
7+
version: 3.9
8+
9+
conda:
10+
environment: docs/environment.yml

CHANGES.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Changes
2+
^^^^^^^
3+
4+
This is a record of all past pybaum releases and what went into them in reverse
5+
chronological order. We follow `semantic versioning <https://semver.org/>`_ and all
6+
releases are available on `Anaconda.org
7+
<https://anaconda.org/OpenSourceEconomics/pybaum>`_.

0 commit comments

Comments
 (0)