Skip to content

Commit

Permalink
fix: template file extension rename to .py (#43) [skip ci]
Browse files Browse the repository at this point in the history
* fix: file ext to pyi for image classification

* fix: rename to .py
  • Loading branch information
Jeff Yang committed Apr 6, 2021
1 parent 9ef83ca commit df65ca1
Show file tree
Hide file tree
Showing 34 changed files with 8 additions and 8 deletions.
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.
File renamed without changes.
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.
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.

0 comments on commit df65ca1

Please sign in to comment.