Skip to content

Commit

Permalink
Fixed: #169 -> minimalistic printout for terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
Anselmoo committed Dec 25, 2021
1 parent b50a4b7 commit fbf9683
Show file tree
Hide file tree
Showing 53 changed files with 153 additions and 146 deletions.
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

version: 2
updates:

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
Expand Down
58 changes: 29 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ name: "CodeQL"

on:
push:
branches: [ main ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]
schedule:
- cron: '33 9 * * 0'
- cron: "33 9 * * 0"

jobs:
analyze:
Expand All @@ -32,40 +32,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
language: ["python"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
14 changes: 7 additions & 7 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
# This is important to fetch the changes to the previous commit
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
# This is important to fetch the changes to the previous commit
fetch-depth: 0

# - name: Prettify code
# uses: creyD/prettier_action@v4.1
Expand Down
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ cache:
- venv/

before_script:
- python -V # Print out python version for debugging
- python -V # Print out python version for debugging
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate

test:
script:
- python setup.py test
- pip install tox flake8 # you can also use tox
- pip install tox flake8 # you can also use tox
- tox -e py36,flake8

run:
Expand Down
3 changes: 2 additions & 1 deletion .gitlab/.gitlab-webide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ terminal:
- name: registry.gitlab.com/gitlab-org/webide-file-sync:latest
alias: webide-file-sync
entrypoint: ["/bin/sh"]
command: ["-c", "sleep 5 && ./webide-file-sync -project-dir $CI_PROJECT_DIR"]
command:
["-c", "sleep 5 && ./webide-file-sync -project-dir $CI_PROJECT_DIR"]
ports:
# The `webide-file-sync` executable defaults to port 3000.
- number: 3000
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: check-ast
- id: check-merge-conflict
- id: check-added-large-files
args: ['--maxkb=1000']
args: ["--maxkb=1000"]
- repo: https://github.com/psf/black.git
rev: 21.12b0
hooks:
Expand Down
23 changes: 19 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@

> See also: [https://github.com/Anselmoo/spectrafit/releases][1]
## v 0.8.0

---

- Introduced smaller enhancement:
- Printout of the fit parameters in the output file: True/False -> [0, 1, 2]
- Keyword check for `SpectraFit`
- Fix smaller bugs:
- `Pseudo-Voigt` power factor from 0.25 -> 0.2
- Correct type-definitions for `SpectraFit`

## v0.7.1

---

- Maintance of the `SpectraFit` package

## v0.7.0

---
Expand Down Expand Up @@ -150,11 +167,9 @@
[8]: https://github.com/Anselmoo/spectrafit/security
[9]: https://dependabot.com
[10]: https://securitylab.github.com/tools/codeql/
[11]:
https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository
[11]: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository
[12]: https://git-lfs.github.com
[13]: https://github.com/apps/stale
[14]: https://github.com/Anselmoo/spectrafit/blob/main/README.md
[15]: https://pypi.org/project/spectrafit/
[16]:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.find_peaks.html
[16]: https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.find_peaks.html
2 changes: 1 addition & 1 deletion Examples/example_1_summary.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"header": null,
"noplot": false,
"version": false,
"verbose": false,
"verbose": 1,
"description": {
"project_name": "Example1",
"project_details": "Example 1",
Expand Down
2 changes: 1 addition & 1 deletion Examples/example_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"separator": "\t",
"shift": 0,
"smooth": 0,
"verbose": false,
"verbose": 1,
"version": false
},
"fitting": {
Expand Down
2 changes: 1 addition & 1 deletion Examples/example_2_summary.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"header": null,
"noplot": false,
"version": false,
"verbose": false,
"verbose": 1,
"description": {
"project_name": "Template",
"project_details": "Template for testing",
Expand Down
2 changes: 1 addition & 1 deletion Examples/example_3.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"separator": ",",
"shift": 0,
"smooth": 0,
"verbose": false,
"verbose": 1,
"version": false
},
"fitting": {
Expand Down
2 changes: 1 addition & 1 deletion Examples/example_3_summary.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"header": 0,
"noplot": false,
"version": false,
"verbose": false,
"verbose": 1,
"description": {
"project_name": "Template",
"project_details": "Template for testing",
Expand Down
2 changes: 1 addition & 1 deletion Examples/example_5.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"separator": ",",
"shift": 0,
"smooth": 0,
"verbose": false,
"verbose": 1,
"version": false
},
"fitting": {
Expand Down
2 changes: 1 addition & 1 deletion Examples/example_5_summary.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"header": 0,
"noplot": false,
"version": false,
"verbose": false,
"verbose": 1,
"description": {
"project_name": "Template",
"project_details": "Template for testing",
Expand Down
2 changes: 1 addition & 1 deletion Examples/example_6.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"separator": ",",
"shift": 0.2,
"smooth": false,
"verbose": false,
"verbose": 1,
"version": false,
"noplot": false,
"global": 1
Expand Down
2 changes: 1 addition & 1 deletion Examples/example_6_summary.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"header": 0,
"noplot": false,
"version": false,
"verbose": false,
"verbose": 1,
"global": 1,
"description": {
"project_name": "Template",
Expand Down
2 changes: 1 addition & 1 deletion Examples/example_7.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"width": [0.002, 12],
"wlen": 100
},
"verbose": false,
"verbose": 1,
"version": false
},
"fitting": {
Expand Down
2 changes: 1 addition & 1 deletion Examples/example_7_summary.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"noplot": false,
"version": false,
"verbose": false,
"verbose": 1,
"description": {
"project_name": "Template",
"project_details": "Template for testing",
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@ optional arguments:
for manual peak definition.
-np, --noplot No plotting the spectra and the fit of `SpectraFit`.
-v, --version Display the current version of `SpectraFit`.
-vb, --verbose Display the initial configuration parameters as a
dictionary.
-vb, --verbose Display the initial configuration parameters and fit
results, as a table '1', as a dictionary '2', or not in
the terminal '0'. The default option is set to 1 for
table `printout`.
```
## Documentation
Expand Down
3 changes: 1 addition & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ Tell them where to go, how often they can expect to get an update on a reported
vulnerability, what to expect if the vulnerability is accepted or declined, etc.

[1]: https://securitylab.github.com/tools/codeql/
[2]:
https://github.com/Anselmoo/spectrafit/blob/main/.github/workflows/codeql-analysis.yml
[2]: https://github.com/Anselmoo/spectrafit/blob/main/.github/workflows/codeql-analysis.yml
6 changes: 2 additions & 4 deletions docs/doc/fitting.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ result = mini.minimize(**args["optimizer"])
this [SciPy implementation][4] is implemented in `SpectraFit` and can be
used by setting the `minimizer` parameter to `"differential_evolution"`.

[1]:
https://lmfit.github.io/lmfit-py/fitting.html?highlight=minimizer#lmfit.minimizer.Minimizer
[1]: https://lmfit.github.io/lmfit-py/fitting.html?highlight=minimizer#lmfit.minimizer.Minimizer
[2]: https://lmfit.github.io/lmfit-py/fitting.html?highlight=minimize
[3]: https://en.wikipedia.org/wiki/Differential_evolution
[4]:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.differential_evolution.html
[4]: https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.differential_evolution.html
2 changes: 1 addition & 1 deletion docs/examples/example3.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ also printed in the terminal output:
"separator": "\t",
"shift": 0,
"smooth": 0,
"verbose": false,
"verbose": 1,
"version": false
},
"fitting": {
Expand Down
10 changes: 4 additions & 6 deletions docs/examples/example4.md
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ following changes between previous
"separator": "\t",
"shift": 0,
"smooth": 0,
"verbose": false,
"verbose": 1,
"version": false
},
```
Expand All @@ -659,7 +659,7 @@ and actually
"separator": ",",
"shift": 0.2,
"smooth": 4,
"verbose": true,
"verbose": 2,
"version": false,
"noplot": true
},
Expand All @@ -680,8 +680,6 @@ spectrafit _ -i example_3.json

> Elastic-line of a pseudo 2p3d-RIXS spectra.

[1]:
https://numpy.org/doc/stable/reference/random/generated/numpy.random.random.html
[2]:
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html
[1]: https://numpy.org/doc/stable/reference/random/generated/numpy.random.random.html
[2]: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html
[3]: ../../examples/example3/
2 changes: 1 addition & 1 deletion docs/examples/example6.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ based on the `lmfit` approach for [Fit Multiple Data Sets][2]. In this case of
"separator": ",",
"shift": 0.2,
"smooth": false,
"verbose": false,
"verbose": 1,
"version": false,
"noplot": false,
"global": 1
Expand Down
5 changes: 2 additions & 3 deletions docs/examples/example7.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ In the following example the in example the section block looks like:
"width": [0.002, 12],
"wlen": 100
},
"verbose": false,
"verbose": 1,
"version": false
}
}
Expand Down Expand Up @@ -347,6 +347,5 @@ in the figure shown below.
},
```

[1]:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.find_peaks.html
[1]: https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.find_peaks.html
[2]: ../../interface/usage/
Loading

0 comments on commit fbf9683

Please sign in to comment.