Skip to content

fix: template file extension rename to .py #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

Merged
merged 2 commits into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/run_code_style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
set -xeu

if [ $1 == "lint" ]; then
flake8 app templates tests --config .flake8
isort app templates tests --check --settings pyproject.toml
black app templates tests --check --config pyproject.toml
flake8 app templates/*/_sidebar.py tests --config .flake8
isort app templates/*/_sidebar.py tests --check --settings pyproject.toml
black app templates/*/_sidebar.py tests --check --config pyproject.toml
elif [ $1 == "fmt" ]; then
isort app templates tests --color --settings pyproject.toml
black app templates tests --config pyproject.toml
isort app templates/*/_sidebar.py tests --color --settings pyproject.toml
black app templates/*/_sidebar.py tests --config pyproject.toml
elif [ $1 == "install" ]; then
pip install flake8 "black==20.8b1" "isort==5.7.0"
fi
2 changes: 1 addition & 1 deletion app/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def render_templates(self, template_name: str, project_name: str, config: dict):
)
for fname in env.list_templates(filter_func=lambda x: not x.startswith("_")):
code = env.get_template(fname).render(**config)
fname = fname.replace(".pyi", ".py").replace(template_name, project_name)
fname = fname.replace(template_name, project_name)
self.rendered_code[fname] = code
yield fname, code

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion templates/gan/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ torch>=1.7.0
pytorch-ignite>=0.4.4
torchvision>=0.8.0
matplotlib>=3.4.1
pandas>=1.2.3
pandas
{{ handler_deps }}
{{ logger_deps }}
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion templates/image_classification/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ def dependencies(fname):
),
zip_safe=True,
install_requires=requirements,
)
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.