Skip to content

Commit

Permalink
Merge pull request #8 from ajshajib/bugfix/requirements
Browse files Browse the repository at this point in the history
Bugfix/requirements
  • Loading branch information
ajshajib authored Nov 18, 2024
2 parents 27d0bf5 + 62157e5 commit 1d4d201
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 98 deletions.
15 changes: 11 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,16 @@ repos:
hooks:
- id: black-jupyter
language_version: python3
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
- repo: local
hooks:
- id: docformatter
additional_dependencies: [tomli]
args: [-r, --black, --in-place]
name: docformatter
description: Formats docstrings to follow PEP 257.
entry: python -Im docformatter
additional_dependencies:
- docformatter == 1.7.5
args:
- --in-place
language: python
types:
- python
14 changes: 9 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@ SL Forecast
===========


.. image:: https://img.shields.io/pypi/v/sl_forecast.svg
:target: https://pypi.python.org/pypi/sl_forecast

.. image:: https://img.shields.io/travis/audreyr/sl_forecast.svg
:target: https://travis-ci.com/audreyr/sl_forecast
.. .. image:: https://img.shields.io/pypi/v/sl_forecast.svg
.. :target: https://pypi.python.org/pypi/sl_forecast
.. image:: https://readthedocs.org/projects/sl-forecast/badge/?version=latest
:target: https://sl-forecast.readthedocs.io/en/latest/?version=latest
:alt: Documentation Status

.. image:: https://results.pre-commit.ci/badge/github/LSSTDESC/sl_forecast/main.svg
:target: https://results.pre-commit.ci/latest/github/LSSTDESC/sl_forecast/main
:alt: pre-commit.ci status

.. image:: https://codecov.io/gh/LSSTDESC/sl_forecast/graph/badge.svg?token=n9xsxU1rbY
:target: https://codecov.io/gh/LSSTDESC/sl_forecast




Expand Down
60 changes: 29 additions & 31 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))

sys.path.insert(0, os.path.abspath(".."))

import sl_forecast

Expand All @@ -31,22 +32,22 @@

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = 'SL Forecast'
project = "SL Forecast"
copyright = "2024, Audrey Roy Greenfeld"
author = "Audrey Roy Greenfeld"

Expand All @@ -69,10 +70,10 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
Expand All @@ -83,7 +84,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = "alabaster"

# Theme options are theme-specific and customize the look and feel of a
# theme further. For a list of options available for each theme, see the
Expand All @@ -94,13 +95,13 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]


# -- Options for HTMLHelp output ---------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'sl_forecastdoc'
htmlhelp_basename = "sl_forecastdoc"


# -- Options for LaTeX output ------------------------------------------
Expand All @@ -109,15 +110,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -127,21 +125,21 @@
# (source start file, target name, title, author, documentclass
# [howto, manual, or own class]).
latex_documents = [
(master_doc, 'sl_forecast.tex',
'SL Forecast Documentation',
'Audrey Roy Greenfeld', 'manual'),
(
master_doc,
"sl_forecast.tex",
"SL Forecast Documentation",
"Audrey Roy Greenfeld",
"manual",
),
]


# -- Options for manual page output ------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'sl_forecast',
'SL Forecast Documentation',
[author], 1)
]
man_pages = [(master_doc, "sl_forecast", "SL Forecast Documentation", [author], 1)]


# -- Options for Texinfo output ----------------------------------------
Expand All @@ -150,13 +148,13 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'sl_forecast',
'SL Forecast Documentation',
author,
'sl_forecast',
'One line description of project.',
'Miscellaneous'),
(
master_doc,
"sl_forecast",
"SL Forecast Documentation",
author,
"sl_forecast",
"One line description of project.",
"Miscellaneous",
),
]



Empty file added requirements.txt
Empty file.
12 changes: 0 additions & 12 deletions requirements_dev.txt

This file was deleted.

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
packages=find_packages(include=["sl_forecast", "sl_forecast.*"]),
test_suite="tests",
tests_require=test_requirements,
url="https://github.com/audreyr/sl_forecast",
version="0.1.0",
url="https://github.com/LSSTDESC/sl_forecast",
version="0.0.0",
zip_safe=False,
)
6 changes: 2 additions & 4 deletions sl_forecast/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""Top-level package for SL Forecast."""
"""Top-level package for sl_forecast."""

__author__ = """Audrey Roy Greenfeld"""
__email__ = '[email protected]'
__version__ = '0.1.0'
__version__ = "0.0.0"
16 changes: 0 additions & 16 deletions sl_forecast/cli.py

This file was deleted.

1 change: 1 addition & 0 deletions test_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

31 changes: 7 additions & 24 deletions tests/test_sl_forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,14 @@
"""Tests for `sl_forecast` package."""


import unittest
from click.testing import CliRunner

from sl_forecast import sl_forecast
from sl_forecast import cli


class TestSl_forecast(unittest.TestCase):
class TestSLForecast(object):
"""Tests for `sl_forecast` package."""

def setUp(self):
"""Set up test fixtures, if any."""

def tearDown(self):
"""Tear down test fixtures, if any."""
def setup_method(self):
"""Setup test fixtures, if any."""
pass

def test_000_something(self):
"""Test something."""
def test_version(self):
from sl_forecast import __version__

def test_command_line_interface(self):
"""Test the CLI."""
runner = CliRunner()
result = runner.invoke(cli.main)
assert result.exit_code == 0
assert 'sl_forecast.cli.main' in result.output
help_result = runner.invoke(cli.main, ['--help'])
assert help_result.exit_code == 0
assert '--help Show this message and exit.' in help_result.output
assert __version__ is not None

0 comments on commit 1d4d201

Please sign in to comment.