-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move doc-requirements to docs/requirements.txt #76
Conversation
Codecov Report
@@ Coverage Diff @@
## main #76 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 456 456
=========================================
Hits 456 456
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there! Looks good, however, I'd prefer to move the requirements to an docs
extra. In the setup.cfg
so it can be installed via pip install -e .[docs]
. Cheers! Joe
@codingjoe I don't know much about readthedocs, only that it would pick up How would we tell readthedocs to pick up the extra? |
pytest_runner | ||
tests_require = | ||
pytest | ||
pytest-cov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi. Thank you for submitting this patch. I think pytest_runner
should be moved into the tests_require
section as well. It will not be needed at runtime.
pytest_runner | |
tests_require = | |
pytest | |
pytest-cov | |
tests_require = | |
pytest | |
pytest-cov | |
pytest_runner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @amotl , thank you for the review!
Moving pytest_runner
to tests_require
breaks the current test execution (via python setup.py test
).
While this should be fixed, I first only wanted to fix the issue at hand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
additionally, now im getting this:
pipenv install --keep-outdated --selective-upgrade "pip install git+https://github.com/syphar/python-measurement@no-sphinx-in-prod"
^CTraceback (most recent call last):
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/bin/pipenv", line 5, in <module>
from pipenv import cli
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/__init__.py", line 63, in <module>
from .cli import cli
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/cli/__init__.py", line 1, in <module>
from .command import cli # noqa
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/cli/command.py", line 7, in <module>
from pipenv.cli.options import (
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/cli/options.py", line 3, in <module>
from pipenv.project import Project
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/project.py", line 19, in <module>
from pipenv.environment import Environment
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/environment.py", line 17, in <module>
from pipenv.patched.pip._internal.commands.install import InstallCommand
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/patched/pip/_internal/commands/__init__.py", line 9, in <module>
from pipenv.patched.pip._internal.cli.base_command import Command
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/patched/pip/_internal/cli/base_command.py", line 15, in <module>
from pipenv.patched.pip._internal.cli import cmdoptions
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/patched/pip/_internal/cli/cmdoptions.py", line 24, in <module>
from pipenv.patched.pip._internal.cli.parser import ConfigOptionParser
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/patched/pip/_internal/cli/parser.py", line 12, in <module>
from pipenv.patched.pip._internal.configuration import Configuration, ConfigurationError
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/patched/pip/_internal/configuration.py", line 26, in <module>
from pipenv.patched.pip._internal.utils.logging import getLogger
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/patched/pip/_internal/utils/logging.py", line 29, in <module>
from pipenv.patched.pip._internal.utils.misc import ensure_dir
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/patched/pip/_internal/utils/misc.py", line 38, in <module>
from pipenv.patched.pip._vendor.tenacity import retry, stop_after_delay, wait_fixed
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/patched/pip/_vendor/tenacity/__init__.py", line 516, in <module>
from pipenv.patched.pip._vendor.tenacity._asyncio import AsyncRetrying # noqa:E402,I100
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/patched/pip/_vendor/tenacity/_asyncio.py", line 33, in <module>
class AsyncRetrying(BaseRetrying):
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/patched/pip/_vendor/tenacity/_asyncio.py", line 67, in AsyncRetrying
async def __anext__(self) -> typing.Union[AttemptManager, typing.Any]:
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/typing.py", line 341, in inner
return cached(*args, **kwds)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/typing.py", line 460, in __getitem__
return self._getitem(self, parameters)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/typing.py", line 673, in Union
return _UnionGenericAlias(self, parameters)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/typing.py", line 1337, in __init__
self.__parameters__ = _collect_parameters(args)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/typing.py", line 1275, in __setattr__
if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams',
^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/typing.py", line 1224, in _is_dunder
return attr.startswith('__') and attr.endswith('__')
^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt
””/noya ticket/python3.8-upgarde-5424 ⍟5 pipenv install --keep-outdated --selective-upgrade "git+https://github.com/syphar/python-measurement@no-sphinx-in-prod"
Loading .env environment variables...
Traceback (most recent call last):
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/bin/pipenv", line 8, in <module>
sys.exit(cli())
^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/cli/options.py", line 57, in main
return super().main(*args, **kwargs, windows_expand_args=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1053, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/cli/command.py", line 239, in install
do_install(
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/core.py", line 2256, in do_install
package = Requirement.from_line(package)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 2685, in from_line
r = vcs_req_from_parsed_line(parsed_line)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 3100, in vcs_req_from_parsed_line
name=parsed_line.name,
^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 603, in name
if self.setup_info:
^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 806, in setup_info
self.setup_info = self.get_setup_info()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 795, in get_setup_info
setup_info = SetupInfo.from_ireq(self.ireq, subdir=self.subdirectory)
^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 772, in ireq
self.parse_ireq()
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 936, in parse_ireq
if self.requirement is not None and self._ireq.req is None:
^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 474, in requirement
self.parse_requirement()
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 1110, in parse_requirement
raise ValueError(
ValueError: pipenv requires an #egg fragment for version controlled dependencies. Please install remote dependency in the form git+https://github.com/syphar/python-measurement#egg=<package-name>.
””/noya ticket/python3.8-upgarde-5424 ⍟5 pipenv install --keep-outdated --selective-upgrade "git+https://github.com/syphar/python-measurement@no-sphinx-in-prod#egg=measurement"
Loading .env environment variables...
Installing git+https://github.com/syphar/python-measurement@no-sphinx-in-prod#egg=measurement...
Traceback (most recent call last):
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/bin/pipenv", line 8, in <module>
sys.exit(cli())
^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/cli/options.py", line 57, in main
return super().main(*args, **kwargs, windows_expand_args=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1053, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/cli/command.py", line 239, in install
do_install(
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/core.py", line 2436, in do_install
project.add_package_to_pipfile(pkg_requirement, dev)
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/project.py", line 952, in add_package_to_pipfile
self.write_toml(p)
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/project.py", line 779, in write_toml
data = convert_toml_outline_tables(data, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/utils/toml.py", line 64, in convert_toml_outline_tables
result = convert_tomlkit_table(table_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/utils/toml.py", line 44, in convert_tomlkit_table
result[key.key] = table
~~~~~~^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/tomlkit/items.py", line 1244, in __setitem__
self._value[key] = value
~~~~~~~~~~~^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/tomlkit/container.py", line 623, in __setitem__
self._replace(old_key, key, value)
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/tomlkit/container.py", line 644, in _replace
self._replace_at(idx, new_key, value)
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/tomlkit/container.py", line 677, in _replace_at
self._insert_at(i, new_key, value)
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/tomlkit/container.py", line 411, in _insert_at
or "\n" in previous_item.trivia.trail
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/pipenv/2022.12.19/libexec/lib/python3.11/site-packages/pipenv/vendor/tomlkit/items.py", line 389, in trivia
return self._trivia
^^^^^^^^^^^^
AttributeError: 'Null' object has no attribute '_trivia'. Did you mean: 'trivia'?
@@ -103,7 +103,7 @@ def __new__(mcs, name, bases, attrs): | |||
@staticmethod | |||
def square(klass): | |||
for name, unit in klass._units.items(): | |||
qs_unit = Unit(factor=unit.factor ** 2) | |||
qs_unit = Unit(factor=unit.factor**2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is irrelevant to the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but CI fails. It's in a separate commit because of that
@@ -170,7 +170,7 @@ def __new__(mcs, name, bases, attrs): | |||
@staticmethod | |||
def cubic(klass): | |||
for name, unit in klass._units.items(): | |||
qs_unit = Unit(factor=unit.factor ** 3) | |||
qs_unit = Unit(factor=unit.factor**3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
This applies to 4.0 right? Which is a full rewrite. If we're on 3.2.0 we need something else right? |
@codingjoe I'm happy to provide a backport PR to a 3.2 branch, if that's what needed. ( assuming the backport could just contain the simple fix I did previously) |
Would appreciate that @syphar |
perhaps I'm missing something, but I think I only can create said PR from my fork when there is an existing 3.2.0 branch, right? |
Right. One of the project maintainers would need to create that branch from the most recent 3.x tag first. |
@amotl @syphar is there any luck with porting it over to 3.2.0? I'm using django-measurement which requires python-measurement<4.0 so def need a port-over. |
@codingjoe already backported the fix, it's in |
@syphar |
On pypi, We're also a user of django-measurements and it works |
This moves the sphinx requirements into
docs/requirements.txt
for our doc-build process & readthedocs to use.This definitely helps with #75 only in that matter that it doesn't break production builds any more.
it doesn't fix the originating issue, only moves it to the doc-build.
I provided specific versions for in
docs/requirements.txt
, as recommended by readthedocs. I'm hoping that freezingsphinxcontrib.applehelp
here helps with fixing this for the doc-build, we'll see when CI passed & how readthedocs handles this.