Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed Feb 29, 2024
1 parent 94db33c commit b90d015
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 95 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,10 @@ package.json
# repo specific
examples/using_pfsspy/aia_map.fits
docs/sg_execution_times.rst
docs/manual/source/numerical-methods.aux
docs/manual/source/numerical-methods.bbl
docs/manual/source/numerical-methods.fdb_latexmk
docs/manual/source/numerical-methods.fls
docs/manual/source/numerical-methods.out
docs/manual/source/numerical-methods.pdf
docs/manual/source/numerical-methods.synctex.gz
2 changes: 1 addition & 1 deletion .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exclude = [
select = ["E", "F", "W", "UP", "PT"]
extend-ignore = [
# pycodestyle (E, W)
"E501", # LineTooLong # TODO! fix
"E501", # LineTooLong
# pytest (PT)
"PT001", # Always use pytest.fixture()
"PT004", # Fixtures which don't return anything should have leading _
Expand Down
30 changes: 17 additions & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

# The full version, including alpha/beta/rc tags
from sunkit_magex import __version__
release = __version__

release = __version__
project = "sunkit-magex"
copyright = "2024, The SunPy Community"
author = "The SunPy Community"
Expand Down Expand Up @@ -73,27 +73,31 @@
from sphinx_gallery.sorting import ExplicitOrder # noqa

sphinx_gallery_conf = {
"abort_on_example_error": False,
"backreferences_dir": os.path.join("generated", "modules"),
"filename_pattern": "^((?!skip_).)*$",
"ignore_pattern": "helpers.py",
"default_thumb_file": PNG_ICON,
"examples_dirs": os.path.join("..", "examples"),
"subsection_order": ExplicitOrder(["../examples/using_pfsspy",
"../examples/finding_data",
"../examples/utils",
"../examples/internals",
"../examples/testing"]),
"filename_pattern": '^((?!skip_).)*$',
"gallery_dirs": os.path.join("generated", "gallery"),
"ignore_pattern": "helpers.py",
"matplotlib_animations": True,
"default_thumb_file": PNG_ICON,
"abort_on_example_error": False,
"only_warn_on_example_error": True,
"plot_gallery": "True",
"remove_config_comments": True,
"only_warn_on_example_error": True,
"subsection_order": ExplicitOrder([
"../examples/using_pfsspy",
"../examples/finding_data",
"../examples/utils",
"../examples/internals",
"../examples/testing"
]),
}

# -- Other options ----------------------------------------------------------
# JSOC email os env
# see https://github.com/sunpy/sunpy/wiki/Home:-JSOC

# JSOC email OS ENV
# See https://github.com/sunpy/sunpy/wiki/Home:-JSOC
os.environ["JSOC_EMAIL"] = '[email protected]'

default_role = 'py:obj'
nitpicky = True
56 changes: 0 additions & 56 deletions examples/finding_data/get_hmi_data.py

This file was deleted.

21 changes: 19 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name = "sunkit_magex"
description = "Solar Magnetic field Extrapollation"
requires-python = ">=3.10"
readme = { file = "README.rst", content-type = "text/x-rst" }
license = { file = "licenses/LICENSE.rst", content-type = "text/plain" }
license = { file = "licenses/LICENSE.rst"}
authors = [
{ name = "The SunPy Community", email = "[email protected]" },
]
Expand Down Expand Up @@ -77,7 +77,24 @@ testpaths = [
]
doctest_plus = "enabled"
text_file_format = "rst"
addopts = "--doctest-rst"
addopts = "--doctest-rst -p no:unraisableexception -p no:threadexception"
filterwarnings = [
"error",
# Do not fail on pytest config issues (i.e. missing plugins) but do show them
"always::pytest.PytestConfigWarning",
# A list of warnings to ignore follows. If you add to this list, you MUST
# add a comment or ideally a link to an issue that explains why the warning
# is being ignored
# https://github.com/pytest-dev/pytest-cov/issues/557
# It was fixed and released but it does not seem to be fixed
"ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning",
# https://github.com/pandas-dev/pandas/issues/54466
# Should stop when pandas 3.0.0 is released
"ignore:(?s).*Pyarrow will become a required dependency of pandas:DeprecationWarning",
# Can be removed when https://github.com/dateutil/dateutil/issues/1314 is resolved
# deprecated in Python 3.12, needs a release of dateutil 2.8.3 or higher
"ignore:datetime.datetime.utcfromtimestamp():DeprecationWarning",
]

[tool.coverage.run]
omit = [
Expand Down
1 change: 1 addition & 0 deletions sunkit_magex/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
from .version import version as __version__

__all__ = []
6 changes: 0 additions & 6 deletions sunkit_magex/data/README.rst

This file was deleted.

4 changes: 0 additions & 4 deletions sunkit_magex/tests/__init__.py

This file was deleted.

15 changes: 2 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,20 @@ envlist =

[testenv]
pypi_filter = https://raw.githubusercontent.com/sunpy/sunpy/main/.test_package_pins.txt
# Run the tests in a temporary directory to make sure that we don't import
# the package from the source tree
# Run the tests in a temporary directory to make sure that we don't import the package from the source tree
# This is only needed if you do not use a src directory like a sane person
change_dir = .tmp/{envname}
description =
run tests
oldestdeps: with the oldest supported version of key dependencies
devdeps: with the latest developer version of key dependencies

pass_env =
# Custom compiler locations (such as ccache)
CC
# Location of locales (needed by sphinx on some systems)
LOCALE_ARCHIVE
# If the user has set a LC override we should follow it
LC_ALL

set_env =
MPLBACKEND=agg
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
Expand All @@ -40,22 +38,13 @@ deps =
# devdeps: git+https://github.com/ndcube/ndcube
oldestdeps: minimum_dependencies
pytest-xdist

# The following indicates which extras_require will be installed
extras =
tests

commands_pre =
oldestdeps: minimum_dependencies sunkit_magex --filename requirements-min.txt
oldestdeps: pip install -r requirements-min.txt
pip freeze --all --no-input

commands =
# To run different commands for different factors exclude the factor from the default command like this
# !online: {env:PYTEST_COMMAND} {posargs}
# Then specify a specific one like this
# online: {env:PYTEST_COMMAND} --remote-data=any {posargs}
# If you have no factors which require different commands this is all you need:
{env:PYTEST_COMMAND} {posargs}

[testenv:codestyle]
Expand Down

0 comments on commit b90d015

Please sign in to comment.