Code Monkey home page Code Monkey logo

py-ds-template's Introduction

My cookiecutter template for Python data science project

To start a new project, run

cookiecutter https://github.com/verdimrc/py-ds-template

py-ds-template's People

Contributors

verdimrc avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

josiahdavis

py-ds-template's Issues

File not found problem

I'm making a small platform game as a complete beginner and I'm trying to load a background using:

#load images
bg_img = pygame.image.load('img/sky.png')

When I then try to run it, it tells me this:

bg_img = pygame.image.load('img/sky.png')
FileNotFoundError: No such file or directory.

What do I have to do? The picture (sky.png) is in a folder named "img" in my files. Do I have to somehow upload it to pygame before I run that code or will it find it in my files on my computer?

FileNotFoundError

Getting an error when running this: FileNotFoundError: [Errno 2] No such file or directory: 'src/josiahcctest'

See here for the full traceback:

cookiecutter https://github.com/verdimrc/py-ds-template.git
You've downloaded /home/ec2-user/.cookiecutters/py-ds-template before. Is it okay to delete and re-download it? [yes]: yes
project_name [My new project]: josiahcctest
repo_name [my-repo]: josiahcctest
author_name [Your name (or your organization/company/team)]: josiahdavis
description [A short description of the project.]: blah
Select open_source_license:
1 - No license file
2 - MIT License
3 - Apache-2.0 License
Choose from 1, 2, 3 [1]: 3
Select python_interpreter:
1 - python3
2 - python
Choose from 1, 2 [1]: 1
package_name []: josiahcctest
Traceback (most recent call last):
  File "/tmp/tmp2mld1jr6.py", line 9, in <module>
    pkg_dir.mkdir()
  File "/home/ec2-user/anaconda3/lib/python3.7/pathlib.py", line 1268, in mkdir
    self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'src/josiahcctest'
ERROR: Stopping generation because post_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)

Error on commit `env: python3.8: No such file or directory`

When I go to make my initial commit I get this strange error:

env: python3.8: No such file or directory

Steps to reproduce:

conda create -y -n myenv python=3.7
conda activate myenv
pip install cookiecutter
cookiecutter https://github.com/verdimrc/py-ds-template
git init
pre-commit autoupdate
pre-commit install
git add -A
git commit -m "Initial commit for nhl util repository"

Result

env: python3.8: No such file or directory

Expected result

A successful commit.

System Information

MacOS
Python 3.7.10

Clean template tox.ini

TODO:

  • no need to template [main]src_dir. It's sufficient to use src
  • add test dir to [main]src_dir
  • testenv for linter checks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.