Skip to content

Commit

Permalink
Merge pull request #72 from CHIMEFRB/71-repository-updates
Browse files Browse the repository at this point in the history
71 repository updates
  • Loading branch information
emmanuelfonseca authored Aug 24, 2023
2 parents 18f2459 + 7825971 commit de61336
Show file tree
Hide file tree
Showing 10 changed files with 2,040 additions and 156 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Continuous Deployment

on:
push:
branches:
- main

jobs:
deployment:
runs-on: ubuntu-latest
steps:
-
name: Create release
id: release-please
uses: google-github-actions/release-please-action@v3
with:
release-type: python
package-name: fitburst
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI

on:
push:
paths-ignore:
- 'docs/**'
branches: [ main ]
pull_request:
paths-ignore:
- 'docs/**'
branches:
- '**'

jobs:
pre-commit-checks:
runs-on: ubuntu-latest
steps:
-
name: Checkout Repository
uses: actions/checkout@v3
-
name: Install Poetry
run: pipx install poetry
-
name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: 'poetry'
-
name: Install Dependencies
run: poetry install
-
name: Run Pre-Commit
run: poetry run pre-commit run --all-files --show-diff-on-failure

tests:
needs: pre-commit-checks
runs-on: ubuntu-latest
steps:
-
name: Checkout Repository
uses: actions/checkout@v3
-
name: Install Poetry
run: pipx install poetry
-
name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: 'poetry'
-
name: Install Dependencies
run: poetry install

- name: Run Tests
run: |
poetry run pytest
45 changes: 0 additions & 45 deletions .github/workflows/tests.yml

This file was deleted.

158 changes: 97 additions & 61 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,62 +1,98 @@
repos:

- repo: https://github.com/pycqa/isort
rev: 5.5.4
hooks:
- id: isort
args: [ --multi-line=3, --trailing-comma, --force-grid-wrap=0, --use-parentheses, --line-width=88]

- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies: ["flake8-eradicate==0.4.0"]
args: [--max-line-length=89]


- repo: https://github.com/asottile/pyupgrade
rev: v2.7.2
hooks:
- id: pyupgrade
args: [--py36-plus]

- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.782
hooks:
- id: mypy
args: [--ignore-missing-imports]

- repo: https://github.com/pycqa/pydocstyle
rev: 4.0.0 # pick a git hash / tag to point to
hooks:
- id: pydocstyle
args: [--convention=numpy, --add-ignore=D104]

- repo: https://github.com/asottile/blacken-docs
rev: v1.8.0
hooks:
- id: blacken-docs
additional_dependencies: [black==20.8b1]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
exclude: ^docs/*
- id: end-of-file-fixer
exclude: ^docs/*
- id: debug-statements
- id: check-case-conflict
- id: check-json
- id: check-yaml
- id: mixed-line-ending
- id: check-toml
- id: pretty-format-json
- id: check-docstring-first
- id: check-symlinks
- id: detect-private-key
- hooks:
- args:
- --multi-line=3
- --trailing-comma
- --force-grid-wrap=0
- --use-parentheses
- --line-width=88
- --ensure-newline-before-comments
id: isort
repo: https://github.com/pycqa/isort
rev: 5.12.0
- hooks:
- args:
- --max-line-length=89
- --max-complexity=15
id: flake8
repo: https://github.com/pycqa/flake8
rev: 6.1.0
- hooks:
- args:
- --py36-plus
id: pyupgrade
repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
- hooks:
- id: black
repo: https://github.com/psf/black
rev: 23.7.0
- hooks:
- additional_dependencies:
- types-attrs
- types-requests
- types-setuptools
- types-PyYAML
- types-toml
args:
- --ignore-missing-imports
- --no-implicit-optional
id: mypy
repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
- hooks:
- args:
- --convention=google
- --add-ignore=D104
id: pydocstyle
repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
- hooks:
- id: blacken-docs
repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
- hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- id: check-case-conflict
- id: check-json
- id: check-added-large-files
- id: check-yaml
- id: mixed-line-ending
- id: check-toml
- id: pretty-format-json
- id: check-docstring-first
- id: check-symlinks
- id: detect-private-key
- id: pretty-format-json
args:
- --autofix
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
- hooks:
- args:
- -iii
- -lll
id: bandit
repo: https://github.com/PyCQA/bandit
rev: 1.7.5
- hooks:
- additional_dependencies:
- radon
args:
- cc
- --min=C
- --total-average
entry: radon
id: radon
language: python
name: radon
verbose: true
repo: local
- hooks:
- id: commitizen
stages:
- commit-msg
repo: https://github.com/commitizen-tools/commitizen
rev: 3.6.0
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
fitburst
========

This repo contains functions and objects for modeling dynamic spectra of dispersed astrophysical signals at radio frequencies.
This repo contains functions and objects for modeling dynamic spectra of dispersed astrophysical signals at radio frequencies.

## Installation

Currently, `fitburst` can be installed by cloning the repo and running `pip` in the following way:

```
```
pc> git clone [email protected]:CHIMEFRB/fitburst.git
pc> cd fitburst
pc/fitburst> pip install . # add the --user option if you're looking to install in your local environment.
Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ nav:
- Home: index.md
- About: about.md
- Installation: installation.md
- Usage:
- Usage:
- Ways to Use fitburst: usage/using_fitburst.md
- Format of Input Data: usage/formatting_data_generic.md
- Working with Data Readers: usage/using_data_readers.md
- Creating Models of Spectra: usage/creating_models.md
- Developer Guide:
- Developer Guide:
- Coding Philosophy: developer_guide/philosophy.md
- Package Structure: developer_guide/package_structure.md
- Writing Data Readers: developer_guide/readers.md
Loading

0 comments on commit de61336

Please sign in to comment.