Skip to content

Commit

Permalink
Merge remote-tracking branch 'openastronomy/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Feb 27, 2024
2 parents d7d9c32 + 9914890 commit 0373e0c
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 17 deletions.
9 changes: 6 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def bake_examples(cookies):
"""
Examples on.
"""
result = cookies.bake(extra_context={"include_example_code": "y"})
result = cookies.bake(extra_context={"include_example_code": "y",
"author_name": "test"})
return _handle_cookiecutter_errors(result)


Expand All @@ -74,7 +75,8 @@ def bake_examples_compiled(cookies):
Examples on.
"""
result = cookies.bake(extra_context={"include_example_code": "y",
"use_compiled_extensions": "y"})
"use_compiled_extensions": "y",
"author_name": "test"})
return _handle_cookiecutter_errors(result)


Expand All @@ -85,5 +87,6 @@ def bake_examples_compiled_dev_version(cookies):
"""
result = cookies.bake(extra_context={"include_example_code": "y",
"use_compiled_extensions": "y",
"enable_dynamic_dev_versions": "y"})
"enable_dynamic_dev_versions": "y",
"author_name": "test"})
return _handle_cookiecutter_errors(result)
7 changes: 7 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ envlist =
build-docs

[testenv]
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
description = render the template and run all the rendered tox environments
skip_install = true
deps =
Expand Down
2 changes: 1 addition & 1 deletion {{ cookiecutter.package_name }}/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ global-exclude *.pyc *.o
# This subpackage is only used in development checkouts
# and should not be included in built tarballs
prune {{ cookiecutter.module_name }}/_dev
{% endif -%}
{%- endif %}
10 changes: 4 additions & 6 deletions {{ cookiecutter.package_name }}/docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
Expand All @@ -9,14 +7,14 @@

# -- Project information -----------------------------------------------------

project = "{{ cookiecutter.package_name }}"
copyright = "2022, {{ cookiecutter.author_name }}"
author = "{{ cookiecutter.author_name }}"

# The full version, including alpha/beta/rc tags
from {{ cookiecutter.module_name }} import __version__
release = __version__

project = "{{ cookiecutter.package_name }}"
copyright = "2022, {{ cookiecutter.author_name }}"
author = "{{ cookiecutter.author_name }}"

# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
Expand Down
2 changes: 1 addition & 1 deletion {{ cookiecutter.package_name }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ open_astronomy_package_template_example = "{{ cookiecutter.module_name }}.exampl
tests = [
"pytest",
"pytest-doctestplus",
"pytest-cov",
"pytest-cov"
]
docs = [
"sphinx",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
__all__ = ['do_primes']
{% else %}
__all__ = []
{%- endif %}
{%- endif -%}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
except ImportError:
raise
except Exception as e:
raise ValueError(f'setuptools_scm can not determine version.') from e
raise ValueError('setuptools_scm can not determine version.') from e
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ def main(args=None):
primes = do_primes(res.n, res.cy)
post = time()

print('Found {0} prime numbers'.format(len(primes)))
print('Largest prime: {0}'.format(primes[-1]))
print(f'Found {len(primes)} prime numbers')
print(f'Largest prime: {primes[-1]}')

if res.time:
print('Running time: {0} s'.format(post - pre))
print(f'Running time: {post - pre} s')

if res.prnt:
print('Primes: {0}'.format(primes))
print(f'Primes: {primes}')

0 comments on commit 0373e0c

Please sign in to comment.