Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update documentation #16

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

Open
bygu4 wants to merge 21 commits into rework_indexed_grammars
base: rework_indexed_grammars
Choose a base branch
Loading
from update_docs
Open

Update documentation #16

bygu4 wants to merge 21 commits into rework_indexed_grammars from update_docs

Conversation

@bygu4
Copy link
Collaborator

@bygu4 bygu4 commented Jan 1, 2025
edited
Loading

Configure Ruff linter for applying pycodestyle, pydocstyle and other's rules. Update the documentation after adding type annotations to pyformlang.

Notes

It is important to note that sphinx with napoleon supports Python type annotations, so adding type hints to docstrings is not necessary.

Todo

  • Configure Ruff linter
  • Update docstrings and fix rule violations
  • Update code examples in docstrings
  • Add examples for FA string generator and other added features
  • Add linting with Ruff to CI jobs

Related

Copy link

github-actions bot commented Jan 1, 2025
edited
Loading

Coverage

Coverage Report
FileStmtsMissCoverMissing
pyformlang
__init__.py 90100%
pyformlang/cfg
__init__.py 30100%
cfg.py 46622 99%
cfg_variable_converter.py 6544 94%
cyk_table.py 790100%
formal_grammar.py 6911 99%
llone_parser.py 16333 98%
parse_tree.py 6511 98%
recursive_decent_parser.py 6122 97%
set_queue.py 150100%
utils.py 250100%
pyformlang/cfg/tests
__init__.py 00100%
test_cfg.py 62622 99%
test_llone_parser.py 11711 99%
test_production.py 210100%
test_recursive_decent_parser.py 2511 96%
test_terminal.py 330100%
test_variable.py 180100%
pyformlang/fcfg
__init__.py 40100%
fcfg.py 13111 99%
feature_production.py 250100%
feature_structure.py 19133 98%
state.py 360100%
pyformlang/fcfg/tests
__init__.py 00100%
test_fcfg.py 1690100%
test_feature_structure.py 1590100%
pyformlang/finite_automaton
__init__.py 80100%
deterministic_finite_automaton.py 18322 99%
deterministic_transition_function.py 2411 96%
doubly_linked_list.py 350100%
doubly_linked_node.py 100100%
epsilon_nfa.py 21011 99%
finite_automaton.py 23111 99%
hopcroft_processing_list.py 240100%
nondeterministic_finite_automaton.py 400100%
nondeterministic_transition_function.py 480100%
partition.py 400100%
transition_function.py 320100%
utils.py 300100%
pyformlang/finite_automaton/tests
__init__.py 00100%
test_deterministic_finite_automaton.py 2960100%
test_deterministic_transition_function.py 8955 94%
test_epsilon.py 130100%
test_epsilon_nfa.py 5950100%
test_nondeterministic_finite_automaton.py 1600100%
test_nondeterministic_transition_function.py 790100%
test_state.py 280100%
test_symbol.py 290100%
pyformlang/fst
__init__.py 20100%
fst.py 18611 99%
transition_function.py 3833 92%
utils.py 250100%
pyformlang/fst/tests
__init__.py 00100%
test_fst.py 1910100%
pyformlang/indexed_grammar
__init__.py 90100%
consumption_rule.py 3522 94%
duplication_rule.py 320100%
end_rule.py 3311 97%
indexed_grammar.py 27111 99%
production_rule.py 3511 97%
reduced_rule.py 290100%
rule_ordering.py 730100%
rules.py 770100%
utils.py 410100%
pyformlang/indexed_grammar/tests
__init__.py 00100%
test_indexed_grammar.py 2490100%
test_rules.py 350100%
pyformlang/objects
__init__.py 50100%
base_epsilon.py 1511 93%
base_terminal.py 70100%
formal_object.py 240100%
pyformlang/objects/cfg_objects
__init__.py 60100%
cfg_object.py 50100%
epsilon.py 30100%
production.py 4111 98%
terminal.py 100100%
utils.py 140100%
variable.py 130100%
pyformlang/objects/finite_automaton_objects
__init__.py 50100%
epsilon.py 30100%
finite_automaton_object.py 50100%
state.py 70100%
symbol.py 50100%
utils.py 140100%
pyformlang/objects/pda_objects
__init__.py 60100%
epsilon.py 30100%
pda_object.py 50100%
stack_symbol.py 70100%
state.py 70100%
symbol.py 50100%
utils.py 2111 95%
pyformlang/objects/regex_objects
__init__.py 20100%
regex_objects.py 650100%
utils.py 220100%
pyformlang/pda
__init__.py 40100%
pda.py 31722 99%
transition_function.py 3933 92%
utils.py 5322 96%
pyformlang/pda/tests
__init__.py 00100%
test_pda.py 3020100%
pyformlang/regular_expression
__init__.py 30100%
python_regex.py 26966 98%
regex.py 2811414 95%
regex_reader.py 15944 97%
pyformlang/regular_expression/tests
__init__.py 00100%
test_python_regex.py 2780100%
test_regex.py 4110100%
pyformlang/rsa
__init__.py 30100%
box.py 512525 51%
recursive_automaton.py 7299 88%
pyformlang/rsa/tests
__init__.py 00100%
test_rsa.py 370100%
pyformlang/tests
__init__.py 00100%
TOTAL874410899%
Tests Skipped Failures Errors Time
310 0 💤 0 ❌ 0 🔥 8.212s ⏱️

@bygu4 bygu4 requested a review from gsvgit January 6, 2025 20:39
Copy link
Member

@gsvgit gsvgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First part

value : any
The value of the state
value:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok that type annotation is missing?

Parameters
----------
value:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok that type annotation is missing?

boxes : set of :class:`~pyformlang.rsa.Box`
A finite set of boxes
start_box:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok that type annotation is missing?

start_nonterminal : :class:`~pyformlang.finite_automaton.Symbol` | str
The start nonterminal for the recursive automaton
----------
regex:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok that type annotation is missing?

start_nonterminal : \
:class:`~pyformlang.finite_automaton.Symbol` | str, optional
The start nonterminal, S by default
text:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok that type annotation is missing?

-----------
value : any
The value of the object
value:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type annotation?

:param l_sets: a list containing tuples (C, M) where:
Parameters
----------
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type annotation?

prod : any
The production used in the rule
----------
left:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type annotation?

prod : any
The production used in the rule
----------
left:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type annotation?

rules : iterable of :class:`~pyformlang.indexed_grammar.ReducedRule`
A list of all the rules
optim : int
rules:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type annotation?

bygu4 added 21 commits March 23, 2025 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gsvgit gsvgit gsvgit approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

AltStyle によって変換されたページ (->オリジナル) /