Skip to content

Commit

Permalink
Merge pull request #9 from peytondmurray/maintainence-fixes
Browse files Browse the repository at this point in the history
Maintainence fixes abound; updates to support python>=3.11
  • Loading branch information
peytondmurray authored May 21, 2024
2 parents ed0f74d + 5465418 commit 585ba52
Show file tree
Hide file tree
Showing 27 changed files with 186 additions and 223 deletions.
8 changes: 0 additions & 8 deletions .bumpversion.cfg

This file was deleted.

26 changes: 0 additions & 26 deletions .circleci/config.yml

This file was deleted.

7 changes: 0 additions & 7 deletions .flake8

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@ ENV/
.idea/
.vs/
.pytest_cache/

.virtual_documents/
27 changes: 17 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-ast
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.270
rev: v0.4.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- id: python-no-log-warn
- id: python-check-mock-methods

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.9-for-vscode
rev: v4.0.0-alpha.8
hooks:
- id: prettier
- id: prettier
files: 'docs/'
types_or: [javascript, ts, tsx, html, css]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.3.0'
rev: 'v1.10.0'
hooks:
- id: mypy
2 changes: 1 addition & 1 deletion .prettierrc.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tabWidth = 4
tabWidth = 2
singleQuote = true
bracketSpacing = false
16 changes: 16 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Copyright (c) 2024 Peyton Murray

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
110 changes: 11 additions & 99 deletions notebooks/plotting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,28 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "7f1adec8-deaf-4b19-87f3-14964856149c",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"%matplotlib widget\n",
"import matplotlib.pyplot as plt\n",
"import matplotlib.transforms as transforms\n",
"import pyforc.core as pfc\n",
"import numpy as np\n",
"\n",
"plt.style.use('dark_background')"
"import pyforc.core as pfc"
]
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "5510a1b0-f666-4f51-8413-e6284377c32a",
"metadata": {},
"outputs": [],
"source": [
"f = pfc.forc.Forc(\n",
" pfc.ingester.PMCIngester,\n",
" pfc.config.Config(\n",
" file_name='/home/pdmurray/Desktop/workspace/pyforc/tests/fixtures/hchb_forc',\n",
" file_name='../tests/fixtures/hchb_forc',\n",
" interpolation='linear',\n",
" pipeline=[\n",
" pfc.ops.correct_drift,\n",
Expand All @@ -44,117 +39,34 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "f8bf0a2f-879b-4821-a683-47f2f3a85077",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "988577afbe404460b9a63c90504c0eab",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<AxesSubplot:>"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"fig, ax = plt.subplots(figsize=(15, 10))\n",
"pfc.plot.imshow(f, 'm', ax=ax)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"id": "85dc0442-5611-4e0c-a908-acd083e0cce4",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "36a9b34e41b444aeada7a84328c4bcbf",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<AxesSubplot:>"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"pfc.plot.imshow(f, 'rho')"
]
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"id": "5c7a157f-7391-4c4d-b134-4d8f9db8a1fe",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "5f88eb4ded2a4eadac9b2878fe3175eb",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<AxesSubplot:>"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"pfc.plot.curves(f)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e2713311-d95e-4571-b79f-a428ce222256",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -173,7 +85,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.1"
"version": "3.12.1"
}
},
"nbformat": 4,
Expand Down
Empty file removed pyforc/__init__.py
Empty file.
Empty file removed pyforc/core/__init__.py
Empty file.
Empty file removed pyforc/main.py
Empty file.
Loading

0 comments on commit 585ba52

Please sign in to comment.