Skip to content
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

Fix object index in API docs by splitting API docs in two #1080

Merged
merged 8 commits into from Jan 10, 2023
Merged

Conversation

hynek
Copy link
Member

@hynek hynek commented Jan 4, 2023

So this has turned into a total nightmare thanks to the different behavior of defining functions (and everything else) using .. autofunction vs .. function and the interaction with .. module xyz (can exist only once, but implies currentmodule).

I think instead of merging this crap, I'll split api.rst into api.rst and api-attr.rst. That should help overview too.

closes #1077

@hynek hynek changed the title Fix object index in API docs Fix object index in API docs by splitting API docs in two Jan 4, 2023
@webknjaz
Copy link
Member

webknjaz commented Jan 4, 2023

Did you inspect the result with python -m sphinx.ext.intersphinx?

Here's what's set up with this PR:

$ python -m sphinx.ext.intersphinx https://attrs--1080.org.readthedocs.build/en/1080/objects.inv
py:class
	attr.Attribute                           api-attr.html#attr.Attribute
	attr.VersionInfo                         api-attr.html#attr.VersionInfo
	attr._make.Attribute                     api.html#attrs.Attribute
	attr._make.Factory                       api.html#attrs.Factory
	attr._version_info.VersionInfo           api-attr.html#attr.VersionInfo
	attrs.Attribute                          api.html#attrs.Attribute
	attrs.Factory                            api.html#attrs.Factory
py:data
	attr.NOTHING                             api-attr.html#attr.NOTHING
	attrs.NOTHING                            api.html#attrs.NOTHING
	attrs.setters.NO_OP                      api.html#attrs.setters.NO_OP
py:exception
	attr.exceptions.AttrsAttributeNotFoundError api.html#attrs.exceptions.AttrsAttributeNotFoundError
	attr.exceptions.DefaultAlreadySetError   api.html#attrs.exceptions.DefaultAlreadySetError
	attr.exceptions.FrozenAttributeError     api.html#attrs.exceptions.FrozenAttributeError
	attr.exceptions.FrozenError              api.html#attrs.exceptions.FrozenError
	attr.exceptions.FrozenInstanceError      api.html#attrs.exceptions.FrozenInstanceError
	attr.exceptions.NotAnAttrsClassError     api.html#attrs.exceptions.NotAnAttrsClassError
	attr.exceptions.NotCallableError         api.html#attrs.exceptions.NotCallableError
	attr.exceptions.PythonTooOldError        api.html#attrs.exceptions.PythonTooOldError
	attr.exceptions.UnannotatedAttributeError api.html#attrs.exceptions.UnannotatedAttributeError
	attrs.exceptions.AttrsAttributeNotFoundError api.html#attrs.exceptions.AttrsAttributeNotFoundError
	attrs.exceptions.DefaultAlreadySetError  api.html#attrs.exceptions.DefaultAlreadySetError
	attrs.exceptions.FrozenAttributeError    api.html#attrs.exceptions.FrozenAttributeError
	attrs.exceptions.FrozenError             api.html#attrs.exceptions.FrozenError
	attrs.exceptions.FrozenInstanceError     api.html#attrs.exceptions.FrozenInstanceError
	attrs.exceptions.NotAnAttrsClassError    api.html#attrs.exceptions.NotAnAttrsClassError
	attrs.exceptions.NotCallableError        api.html#attrs.exceptions.NotCallableError
	attrs.exceptions.PythonTooOldError       api.html#attrs.exceptions.PythonTooOldError
	attrs.exceptions.UnannotatedAttributeError api.html#attrs.exceptions.UnannotatedAttributeError
py:function
	attr.asdict                              api-attr.html#attr.asdict
	attr.assoc                               api-attr.html#attr.assoc
	attr.astuple                             api-attr.html#attr.astuple
	attr.cmp_using                           api-attr.html#attr.cmp_using
	attr.define                              api-attr.html#attr.define
	attr.evolve                              api-attr.html#attr.evolve
	attr.field                               api-attr.html#attr.field
	attr.fields                              api-attr.html#attr.fields
	attr.fields_dict                         api-attr.html#attr.fields_dict
	attr.filters.exclude                     api-attr.html#attr.filters.exclude
	attr.filters.include                     api-attr.html#attr.filters.include
	attr.frozen                              api-attr.html#attr.frozen
	attr.get_run_validators                  api-attr.html#attr.get_run_validators
	attr.has                                 api-attr.html#attr.has
	attr.ib                                  api-attr.html#attr.ib
	attr.make_class                          api-attr.html#attr.make_class
	attr.mutable                             api-attr.html#attr.mutable
	attr.resolve_types                       api-attr.html#attr.resolve_types
	attr.s                                   api-attr.html#attr.s
	attr.set_run_validators                  api-attr.html#attr.set_run_validators
	attr.validate                            api-attr.html#attr.validate
	attrs.asdict                             api.html#attrs.asdict
	attrs.astuple                            api.html#attrs.astuple
	attrs.cmp_using                          api.html#attrs.cmp_using
	attrs.converters.default_if_none         api.html#attrs.converters.default_if_none
	attrs.converters.optional                api.html#attrs.converters.optional
	attrs.converters.pipe                    api.html#attrs.converters.pipe
	attrs.converters.to_bool                 api.html#attrs.converters.to_bool
	attrs.define                             api.html#attrs.define
	attrs.evolve                             api.html#attrs.evolve
	attrs.field                              api.html#attrs.field
	attrs.fields                             api.html#attrs.fields
	attrs.fields_dict                        api.html#attrs.fields_dict
	attrs.filters.exclude                    api.html#attrs.filters.exclude
	attrs.filters.include                    api.html#attrs.filters.include
	attrs.frozen                             api.html#attrs.frozen
	attrs.has                                api.html#attrs.has
	attrs.make_class                         api.html#attrs.make_class
	attrs.mutable                            api.html#attrs.mutable
	attrs.resolve_types                      api.html#attrs.resolve_types
	attrs.setters.convert                    api.html#attrs.setters.convert
	attrs.setters.frozen                     api.html#attrs.setters.frozen
	attrs.setters.pipe                       api.html#attrs.setters.pipe
	attrs.setters.validate                   api.html#attrs.setters.validate
	attrs.validate                           api.html#attrs.validate
	attrs.validators.and_                    api.html#attrs.validators.and_
	attrs.validators.deep_iterable           api.html#attrs.validators.deep_iterable
	attrs.validators.deep_mapping            api.html#attrs.validators.deep_mapping
	attrs.validators.disabled                api.html#attrs.validators.disabled
	attrs.validators.ge                      api.html#attrs.validators.ge
	attrs.validators.get_disabled            api.html#attrs.validators.get_disabled
	attrs.validators.gt                      api.html#attrs.validators.gt
	attrs.validators.in_                     api.html#attrs.validators.in_
	attrs.validators.instance_of             api.html#attrs.validators.instance_of
	attrs.validators.is_callable             api.html#attrs.validators.is_callable
	attrs.validators.le                      api.html#attrs.validators.le
	attrs.validators.lt                      api.html#attrs.validators.lt
	attrs.validators.matches_re              api.html#attrs.validators.matches_re
	attrs.validators.max_len                 api.html#attrs.validators.max_len
	attrs.validators.min_len                 api.html#attrs.validators.min_len
	attrs.validators.not_                    api.html#attrs.validators.not_
	attrs.validators.optional                api.html#attrs.validators.optional
	attrs.validators.provides                api.html#attrs.validators.provides
	attrs.validators.set_disabled            api.html#attrs.validators.set_disabled
py:method
	attrs.Attribute.evolve                   api.html#attrs.Attribute.evolve
py:module
	attr                                     api-attr.html#module-attr
	attr.converters                          api-attr.html#module-attr.converters
	attr.exceptions                          api-attr.html#module-attr.exceptions
	attr.filters                             api-attr.html#module-attr.filters
	attr.setters                             api-attr.html#module-attr.setters
	attr.validators                          api-attr.html#module-attr.validators
	attrs                                    api.html#module-attrs
	attrs.converters                         api.html#module-attrs.converters
	attrs.exceptions                         api.html#module-attrs.exceptions
	attrs.filters                            api.html#module-attrs.filters
	attrs.setters                            api.html#module-attrs.setters
	attrs.validators                         api.html#module-attrs.validators
std:doc
	api                                      API Reference                           : api.html
	api-attr                                 API Reference for the attr Namespace    : api-attr.html
	changelog                                Changelog                               : changelog.html
	comparison                               Comparison                              : comparison.html
	examples                                 attrs by Example                        : examples.html
	extending                                Extending                               : extending.html
	glossary                                 Glossary                                : glossary.html
	hashing                                  Hashing                                 : hashing.html
	how-does-it-work                         How Does It Work?                       : how-does-it-work.html
	index                                    attrs: Classes Without Boilerplate      : index.html
	init                                     Initialization                          : init.html
	license                                  License and Credits                     : license.html
	names                                    On The Core API Names                   : names.html
	overview                                 Overview                                : overview.html
	types                                    Type Annotations                        : types.html
	why                                      Why not…                                : why.html
std:label
	api-validators                           Validators                              : api.html#api-validators
	api_setters                              Setters                                 : api.html#api-setters
	asdict                                   Converting to Collections Types         : examples.html#asdict
	converters                               Converters                              : init.html#converters
	custom-comparison                        Customization                           : comparison.html#custom-comparison
	examples-validators                      Validators                              : examples.html#examples-validators
	extending-metadata                       Metadata                                : extending.html#extending-metadata
	genindex                                 Index                                   : genindex.html
	helpers                                  Helpers                                 : api.html#helpers
	how                                      How Does It Work?                       : how-does-it-work.html#how
	how-frozen                               Immutability                            : how-does-it-work.html#how-frozen
	metadata                                 Metadata                                : examples.html#metadata
	modindex                                 Module Index                            : py-modindex.html
	private-attributes                       Private Attributes and Aliases          : init.html#private-attributes
	py-modindex                              Python Module Index                     : py-modindex.html
	search                                   Search Page                             : search.html
	transform-fields                         Automatic Field Transformation and Modification: extending.html#transform-fields
	validators                               Validators                              : init.html#validators
std:term
	dict classes                             glossary.html#term-dict-classes
	dunder methods                           glossary.html#term-dunder-methods
	slotted classes                          glossary.html#term-slotted-classes

docs/api.rst Show resolved Hide resolved
docs/api.rst Show resolved Hide resolved
@hynek
Copy link
Member Author

hynek commented Jan 5, 2023

Did you inspect the result with python -m sphinx.ext.intersphinx?

I've used sphobjinv and doc2dash – didn't know about sphinx.ext.intersphinx – handy!


attr._make.Factory and attr._make.Attribute aside (which I think stems from the aliasing / adding of methods), that list looks good?

@hynek
Copy link
Member Author

hynek commented Jan 10, 2023

@webknjaz does this need anything else or can we merge it?

@webknjaz
Copy link
Member

attr._make.Factory and attr._make.Attribute aside (which I think stems from the aliasing / adding of methods), that list looks good?

I'm wondering if that :canonical: feature could help get rid of the unwanted aliases... Anyway, there are no blockers from my side that would justify delaying the merge — I just missed notifications about the previous replies.. Improvements can always be made later.

@hynek hynek enabled auto-merge (squash) January 10, 2023 16:40
@hynek
Copy link
Member Author

hynek commented Jan 10, 2023

sigh GH doesn't start checks

@hynek hynek closed this Jan 10, 2023
auto-merge was automatically disabled January 10, 2023 16:44

Pull request was closed

@hynek hynek reopened this Jan 10, 2023
@hynek hynek merged commit c02d993 into main Jan 10, 2023
@hynek hynek deleted the fix-objects branch January 10, 2023 16:53
@webknjaz
Copy link
Member

sigh GH doesn't start checks

I'm observing that Azure network seems flaky today. This would explain why some events don't get delivered to the orchestrator invoking runners there... GH doesn't do retries on that front.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some API doc entries in objects.inv have double-attr module prefixes
2 participants