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

Updating templates #13231

Closed

Conversation

dreamer-coding-555
Copy link
Contributor

Here are the changes made to the existing code:

  1. Import CythonProject: Added an import statement to import the CythonProject class from the Cython templates module.

  2. Include CythonProject in _IMPL dictionary: Added an entry for 'cython' in the _IMPL dictionary mapping programming languages to corresponding template classes. This allows the sample_generator function to retrieve the CythonProject class based on the language specified in the options.

  3. Update sample_generator function: Modified the sample_generator function to retrieve the appropriate template class based on the language specified in the options, including the newly added Cython project template. Now, the function can instantiate the selected template class with the provided options and return the instance, allowing for the generation of Cython projects.

These changes enable the sample_generator function to generate Cython projects in addition to projects in other supported languages.

@@ -3,35 +3,37 @@

from __future__ import annotations

from pathlib import Path

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'Path' is not used.
@@ -3,84 +3,86 @@

from __future__ import annotations

from pathlib import Path

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'Path' is not used.
@@ -3,10 +3,11 @@

from __future__ import annotations

from pathlib import Path

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'Path' is not used.
@@ -3,10 +3,11 @@

from __future__ import annotations

from pathlib import Path

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'Path' is not used.
@@ -3,18 +3,18 @@

from __future__ import annotations

from pathlib import Path

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'Path' is not used.
if T.TYPE_CHECKING:
from ..minit import Arguments

from typing import Dict, Union

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'Dict' is not used.
Import of 'Union' is not used.
Comment on lines +76 to +82
content = template.format(project_name=options.name,
language=language,
version=options.version,
executable=options.executable,
sourcespec=sourcespec,
depspec=depspec,
default_options=formatted_default_options)

Check failure

Code scanning / CodeQL

Missing named arguments in formatting call Error

Missing named argument for string format. Format ["
project('{{project_name}}', 'java',
version: '{{version}}',
default_options: [{{default_options}}]) jar('{{executable}}',
{{sourcespec}},
{{depspec}}
main_class: '{{main_class}}',
install: true)
"](1) requires 'main_class', but it is omitted.
Copy link
Member

@eli-schwartz eli-schwartz left a comment

Choose a reason for hiding this comment

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

There are 29 commits here and none of them have a valid commit message.

From a very quick look at the actual code changes being done here, there's a lot of changes that must not be made. Don't reformat whitespace across 3 dozen files, don't change single quotes to double quotes (the project coding standards are to use single quotes), please divide up your changes into discrete commits that each do one thing and include a commit message describing what those changes do -- "Update xxxxx.py" isn't a good commit message and can't be merged.

This will make the changes much easier to review, so we can look at why he CI is failing.

@dreamer-coding-555
Copy link
Contributor Author

I'll take a second try at this

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.

None yet

2 participants