Skip to content

Commit

Permalink
Up.
Browse files Browse the repository at this point in the history
  • Loading branch information
ionelmc committed Mar 23, 2024
1 parent 8d7192d commit 3b2607a
Show file tree
Hide file tree
Showing 11 changed files with 101 additions and 107 deletions.
2 changes: 1 addition & 1 deletion .cookiecutterrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Generated by cookiepatcher, a small shim around cookiecutter (pip install cookiepatcher)

default_context:
c_extension_module: _nameless
c_extension_optional: 'yes'
c_extension_support: cython
codacy: 'no'
Expand All @@ -15,6 +14,7 @@ default_context:
email: [email protected]
formatter_quote_style: double
full_name: Ionel Cristian Mărieș
function_name: compute
github_actions: 'yes'
github_actions_osx: 'yes'
github_actions_windows: 'yes'
Expand Down
12 changes: 5 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import os
import traceback

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
Expand All @@ -23,6 +20,8 @@

version = release = get_distribution("nameless").version
except Exception:
import traceback

traceback.print_exc()
version = release = "1.0.0"

Expand All @@ -32,11 +31,10 @@
"issue": ("https://github.com/ionelmc/python-nameless/issues/%s", "#"),
"pr": ("https://github.com/ionelmc/python-nameless/pull/%s", "PR #"),
}
# on_rtd is whether we are on readthedocs.org
on_rtd = os.environ.get("READTHEDOCS", None) == "True"

if not on_rtd: # only set the theme if we are building docs locally
html_theme = "sphinx_rtd_theme"
html_theme_options = {
"githuburl": "https://github.com/ionelmc/python-nameless/",
}

html_use_smartypants = True
html_last_updated_fmt = "%b %d, %Y"
Expand Down
7 changes: 5 additions & 2 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Usage
=====

To use Nameless in a project::
To use the project:

import nameless
.. code-block:: python
import nameless
nameless.compute(...)
13 changes: 2 additions & 11 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,10 @@ addopts =
# --pyargs nameless.
# Any tests in the src/ directory (that is, tests installed with the package)
# can be run by any user with pytest --pyargs nameless.
# Packages that are sensitive to the host machine, most famously NumPy,
# include tests with the installed package so that any user can check
# at any time that everything is working properly.
# If you do choose to make installable tests, this will run the installed
# tests as they are actually installed (same principle as when we ensure that
# we always test the installed version of the package).
# If you have no need for this (and your src/ directory is very large),
# you can save a few milliseconds on testing by telling pytest not to search
# the src/ directory by removing
# --pyargs and nameless from the options here.
testpaths =
nameless
tests/
# If you want to switch back to tests outside package just remove --pyargs
# and edit testpaths to have "tests/" instead of "nameless".

# Idea from: https://til.simonwillison.net/pytest/treat-warnings-as-errors
filterwarnings =
Expand Down
4 changes: 2 additions & 2 deletions src/nameless/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__version__ = "1.0.0"

from .core import main
from .core import compute

__all__ = [
"main",
"compute",
]
Loading

0 comments on commit 3b2607a

Please sign in to comment.