noncesense-research-lab / archival_network

Investigating the frequency of alternative blocks, reorganizations, potential double-spend attacks, selfish mining, and more.
MIT License
14 stars 7 forks source link

Adding .gitignore and blackening #31

Closed neffmallon closed 6 years ago

neffmallon commented 6 years ago

Added .gitignore (allows you to have files that are not tracked by git when you add files).

Also used https://github.com/csurfer/blackcellmagic to lint your code. (see https://github.com/ambv/black for more info)

neffmallon commented 6 years ago

Black, by default, makes sure there is a new line to the end of whatever it is formating, which means all the cells have a new line at the end of them. There are good reasons for this with python files, but those good reasons don't track with iPython notebooks. I've filed an issue with that repository, but they might reject it. At any rate, I've changed my local version, so I can remove all those newlines for you if you wish.

Mitchellpkt commented 6 years ago

I often include a file like this: https://github.com/Mitchellpkt/OperatorAware/blob/master/IgnoreThese.gitignore

Then my setup script includes cp IgnoreThese.gitignore .gitignore

neffmallon commented 6 years ago

Having a .gitignore included in the repository allows users to include things like private credentials and have them not be uploaded. It also allows your developers to, say, make generate and save figures and be able to use git add . but not track what you don't actually want in the repository. But also, the blackening is probably out of date anyway. This pull request should probably be closed.

Mitchellpkt commented 6 years ago

I'll try the blackening next time I take a trip to Jupyter. Thanks for bringing it to my attention, @neffmallon