Skip to content

Commit

Permalink
Some bugs fixed
Browse files Browse the repository at this point in the history
setup_project in Makefile fixed
some other bugs fixed
  • Loading branch information
Amin authored and Amin committed Jan 21, 2024
1 parent 2399a9a commit df1aff9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
5 changes: 3 additions & 2 deletions {{ cookiecutter.repo_name }}/.github/workflows/codecheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r requirements_test.txt
- name: Run ruff
run: |
ruff check src
ruff check {{ cookiecutter.project_name }}
- name: Run mypy
run: |
mypy src --install-types --non-interactive
mypy {{ cookiecutter.project_name }} --install-types --non-interactive
1 change: 1 addition & 0 deletions {{ cookiecutter.repo_name }}/.github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r requirements_test.txt
- name: Test with pytest and coverage
run: |
Expand Down
16 changes: 12 additions & 4 deletions {{ cookiecutter.repo_name }}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,18 @@ PYTHON_INTERPRETER = python
#################################################################################

## Fully set up the project
setup_project: create_environment requirements dev_requirements test_requirements
git init
pre-commit install
echo "Run 'wandb login' if you want to use wandb in 'online' mode"
setup_project:
@echo Creating and setting up the environment...
@conda create --name $(PROJECT_NAME) python=$(PYTHON_VERSION) --no-default-packages -y && \
conda activate $(PROJECT_NAME) && \
python -m pip install -U pip setuptools wheel && \
python -m pip install -r requirements.txt && \
python -m pip install -e . && \
python -m pip install .["dev"] && \
python -m pip install .["test"] && \
git init && \
pre-commit install
@echo Setup completed.

## Set up python interpreter environment
create_environment:
Expand Down
3 changes: 2 additions & 1 deletion {{ cookiecutter.repo_name }}/requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ coverage
ruff >= 0.1.3

# type checking
mypy
mypy
types-tensorflow
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
from {{cookiecutter.project_name}}.models.model import MyNeuralNet
from {{cookiecutter.project_name}}.predict_model import predict

0 comments on commit df1aff9

Please sign in to comment.