| projects/copr | ||
| .bashrc_gitbash | ||
| .vimrc_gitbash | ||
| _config.yml | ||
| diagrams.drawio | ||
| LICENSE | ||
| python_kernel.md | ||
| README.md | ||
| vim.md | ||
DannyDannyDanny/Methodology
Repo Roadmap
- 2021Q1:
Gitmoji -> (general) Methodology✅ - 2021Q2:
Version control methodology - 2021Q3: Decide on sections
Python sectionSections by Project Phase (setup, develop, deploy, deliver) each section should cover the same topics (i.e version control, DevOps)- Move as much as possible from Topic Hierarchy into phases
- 2021Q4
- Refine github flows
- Add sub-pages
- Add Custom utils.
- 2022Q1 Consultancy Methodology
- 2022Q2 Alternative to Github?
This guide focuses on designing, developing and delivering Data-Processing Sytems, written primarily in python, deploying to Linux / FreeBSD servers, optionally communicating with external interfaces (APIs or DBs). The repo is actively being updated; bookmark 🔖 it, leave a Star ⭐ or Watch 👁️ the repo.
Project Phases
| Version Control | DevOps | Documentation | |
|---|---|---|---|
| setup | Setup Version Control | b | c |
| develop | Develop with Version Control | b | c |
| deploy | a | b | c |
| deliver | a | b | c |
| mastery | git-mastery |
Gitmoji reference
Use the format :gitmoji: <commit message> in your commit messages. Only proper nouns, CamelCase and class names should have uppercases letters. Avoid using multiple gitmojis. Use several gitmojis if it makes sense.
| emoji | code | description |
|---|---|---|
| ✨ | :sparkles: |
add new feature / function |
| 🎨 | :art: |
refactor code / improve readibility / structure and lint flake8 |
| 🥅 | :goal_net: |
try/raise/handle errors or warnings |
| ⚡ | :zap: |
improve performance / coverage / profiling |
| 🐛 | :bug: |
bug fixing |
| 🚚 | :truck: |
moving / renaming |
| ♻️ | :recycle: |
work related to CI/CD, webhooks, automated tests |
| 💥 | :boom: |
work in progress / breaking changes |
| 📝 | :memo: |
doc / logging / verbosity / code comments |
| 🔥 | :fire: |
remove (dead) code / file |
| 👽 | :alien: |
changes related to APIs and Databases |
| 🎉 | :tada: |
clean / transform / validate data |
| 💄 | :lipstick: |
improve UI / UX, CLI or visualizations |
| 🧠 | :brain: |
statistical modelling, training and prediction |
| 📌 | :pushpin: |
dependency and environment versioning |
| 🙈 | :see_no_evil: |
changes to .gitignore and exclusively local files |
| 🔍 | :mag: |
changes in connection with PR-review change-requests |
Missing a gitmoji? Get inspiration. Submit an issue (or Pull Request).
Setup
Setup Version Control
🚧 Use git hooks!
Oneliner install and run
When using git repositories, connect with ssh.
The README for your project should contain a one-liner code that dowloads, installs and runs a mini-test.
git clone https://github.com/user/repo.git cool-repo && cd cool-repo
pipenv install
pipenv run python .
#cd .. && rm -rf cool-user-repo-online
Develop with Version Control
# Git Log A DOG acronym
git log --all --decorate --oneline --graph
# when you have uncommitted changes
git add --patch <pattern>
# check what you've staged
git diff --cached
# NEW DEVELOPMENT FLOW
# clone repo with local_name enables several clones
git clone <repo> <local_name>
# optional: checkout (i.e switch to) a branch to continue developing from there
git checkout <feature/featurename>
# optional if you switched branch on the last step
# switched branch: branch out from
git checkout <feature/newfeature>
git branch <feature/newfeature>
git push --set-upstream origin <feature/newfeature>
# delete branch locally (-d: normal, -D: force)
git branch -D <branch_name_1> <branch_name_2> <branch_name_1>
# delete remote
git push origin -d <branch_name>
# Comparing / Merging two branches
git merge --no-commit --no-ff <feature/otherfeaturebranch>
# get file from another branch
git checkout <otherbranch> -- path/to/dir
# delete branches not present on remote
git remote prune origin
# see all commits that affected somefile
git log --follow -- filename
# search code in all history
git log -S "some_old_varname" --oneline --all
Submitting multiple PRs
Context:
- submit PR for feature1
- from feature1 branch make new branch feature2
- commit and push feature2 changes
- submit PR
- Both PRs approved
# there should be one or more flows that account for cases where:
# -> feature1 gets change requests
# -> feature1 is rejected and made obsolete
Python
Packages we like:
- Python Standard Library:
- argparse to build CLI programs
- pipx or pyenv. environment management.
- Fabric for deployment over SSH
Pathlib
For navigating, reading and filesystem and file read/write.
from pathlib import Path
Path('.').iterdir()
Path('.').absolute()
Documentation
- Use Google's Markdown Style Guide for written documentation.
- Conceptual graphical documentation as inline embedded images.
- Save Matplotlib / Seaborn plots as
.svg. - Sketches and handwritten illustrations scanned / photographed as
.png/.jpg. - Scanned / photographed illustrations should be cropped, contrast and alligned.
Topic Hierarchy
- Project Planning
- DevOps
- Do CodeReviews
- Use scrum methodology
- Test and Production environments must be the same and very well defined: FreeBSD image or Ubunut Docker container
- UX/UI
- Visualization
- problem: it's difficult to include visualization in this workflow but essential to fast prototyping.
- Perhaps text-to-diagram
- AsciiFlow
- Spectral, a diverging colormap from matplotlib.
- Tikz Editor
- Database / DataWarehouse
- PostgreSQL (datetime functs)
- Consider SQL (but don't use
select *) - Be aware of feature casualties of large databases
- Data Science - Hierarchy of Needs
- Security
- Audit security
- Understand SSH tunnels
- Anticipatory Failure Determination
- Secret Management for APIs
- Programming Personalizations
- vscode tip: turn off openDiffOnClick
- git bash solarized 🌞
- Music for programming
- OpenStack: Linting and Pre-commit Hooks
- Deploying
- Virtualize Everything! Awesome-Compose.
- AI / ML / Modelling
- Philosophy / Mindset / Principles
- the-importance-of-humility-in-software-development
- doing it right vs doing it on time
- Closed Source Software: If you cannot check what it does / how it works, do not use it for the sake of security.
- Software Design X Dieter Rams
- Collaboration / Working in a team
- Details about pair programming
- Is extreme programming a thing?
- Collaboration (tools: csvbox, pyodide)
- Resolve Joel's 12 Questions
- keeping the repo nice
- Misc
- Things you should do now
- Follow naming conventions
- Follow software engineering laws
- There's some gold nuggets this reddit post