Skip to content

Commit 908763d

Browse files
authored
Merge pull request #1 from Anselmoo/dev
Add CI Pipeline, docs, and release drafter
2 parents 6ad19b5 + f87dbcc commit 908763d

Some content is hidden

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

56 files changed

+6473
-5500
lines changed

.github/release-drafter.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name-template: "v$RESOLVED_VERSION 🌈"
2+
tag-template: "v$RESOLVED_VERSION"
3+
template: |
4+
# 🧭 What's Changed
5+
$CHANGES
6+
# ⚙️ Who Contributes
7+
$CONTRIBUTORS
8+
categories:
9+
- title: "🏆 Milestone"
10+
label: "milestone"
11+
- title: "🚀 New"
12+
label: "enhancement"
13+
- title: "🐛 Bug Fixes"
14+
label: "bug"
15+
- title: "🧰 Maintenance"
16+
label: "maintenance"
17+
- title: "🗂 Documentation"
18+
label: "documentation"
19+
- title: "🔗 Dependency Updates"
20+
label: "dependencies"
21+
- title: "👋 Welcome"
22+
label: "good first issue"
23+
24+
version-resolver:
25+
major:
26+
labels:
27+
- "milestone"
28+
minor:
29+
labels:
30+
- "enhancement"
31+
patch:
32+
labels:
33+
- "bug"
34+
- "maintenance"
35+
- "documentation"
36+
- "dependencies"
37+
- "security"
38+
- "good first issue"
39+
40+
exclude-labels:
41+
- "skip-changelog"

.github/workflows/python-ci.yml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI - Python Package
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
build:
11+
name: Python ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
python-version:
17+
- 3.7
18+
- 3.8
19+
- 3.9
20+
os:
21+
- ubuntu-latest
22+
- macOS-latest
23+
- windows-latest
24+
arch:
25+
- x64
26+
steps:
27+
- uses: actions/checkout@v2
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
- name: Install dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install poetry
36+
- name: Install SpectraFit
37+
run: |
38+
poetry install
39+
- name: Style-Check via poetry
40+
run: |
41+
poetry run pre-commit run --all-files
42+
documentation:
43+
name: Build documentation
44+
runs-on: ubuntu-latest
45+
needs: build
46+
steps:
47+
- uses: actions/checkout@v2
48+
- uses: actions/setup-python@v2
49+
with:
50+
python-version: 3.8
51+
- name: Install dependencies
52+
run: |
53+
python -m pip install --upgrade pip
54+
pip install poetry
55+
- name: Install SpectraFit
56+
run: |
57+
poetry install
58+
- name: Set git config
59+
run: |
60+
git config --local user.email "[email protected]"
61+
git config --local user.name "GitHub Action"
62+
- name: Deploy documentation develops
63+
if: contains(github.ref, 'refs/heads/master')
64+
run: |
65+
mkdocs gh-deploy --clean --force

.github/workflows/release-drafter.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- master
8+
9+
jobs:
10+
update_release_draft:
11+
if: github.repository == 'Anselmoo/spectrafit'
12+
runs-on: ubuntu-latest
13+
steps:
14+
# Drafts your next Release notes as Pull Requests are merged into "master"
15+
- uses: release-drafter/release-drafter@v5
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
.mypy_cache
44
.DS_Store
55
__pycache__
6+
site

.pre-commit-config.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ repos:
33
rev: v4.0.1
44
hooks:
55
- id: check-yaml
6+
exclude: mkdocs.yml
67
- id: check-toml
78
- id: check-json
89
- id: check-symlinks
@@ -16,7 +17,19 @@ repos:
1617
rev: 21.7b0
1718
hooks:
1819
- id: black
20+
- repo: https://github.com/asottile/blacken-docs
21+
rev: v1.10.0
22+
hooks:
23+
- id: blacken-docs
24+
additional_dependencies: [black==21.7b0]
1925
- repo: https://github.com/PyCQA/isort.git
2026
rev: 5.9.3
2127
hooks:
2228
- id: isort
29+
- repo: https://github.com/PyCQA/flake8.git
30+
rev: 3.9.2
31+
hooks:
32+
- id: flake8
33+
exclude: ^spectrafit/test/, ^examples/
34+
additional_dependencies: [flake8-docstrings]
35+
entry: flake8 --docstring-convention google --max-doc-length 100 --max-line-length 88 --ignore E203,W503,W605

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
---
1515

1616
- Changed from text file based input to object based input.
17-
- Replaced `matplotlib` with `plotly` for the plotting.
17+
- Extended `matplotlib` with `seaborn` for the plotting.
1818
- Start outsourcing code into submodules.

CODE_OF_CONDUCT.md

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
- Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
- The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
- Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
[email protected]. All complaints will be reviewed and investigated promptly
64+
and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series of
86+
actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or permanent
93+
ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within the
113+
community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by
122+
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

CONTRIBUTING.md

Whitespace-only changes.

0 commit comments

Comments
 (0)