Compare commits

..

12 commits

Author SHA1 Message Date
Daniel Thoren
0643fe969d
chore: minimize outdated page 🔥 2025-11-18 16:05:49 +01:00
Daniel Thoren
0aaa7ee40b
doc: conventional commit/branch/comment
Added conventions for comments, commits, and branches.
2025-10-16 10:20:01 +02:00
Daniel Thoren
c3ef5fd602
doc: backlog refinement 📝 2023-10-03 14:00:28 +02:00
Daniel Thoren
cfedc6d9af
🎨 clean up 2023-08-22 10:08:26 +02:00
76e69d0899
add snowflake caching ;snowflake: 2023-08-16 11:20:30 +02:00
c0a4e6eee3
:note: add **files changed**-like git command 2023-07-13 16:10:43 +02:00
DannyDannyDanny
f2dc9c1e8a vimwiki: dth @ DK023900WSL 2022-12-28 12:21:26 +01:00
00efbe0792
📝 doc trunk based dev as branching strategy 2022-12-19 10:28:26 +01:00
DannyDannyDanny
48e48735d5 vimwiki: dth @ DK023900WSL 2022-10-25 10:05:18 +02:00
DannyDannyDanny
b69aebf167 Merge branch 'main' of github.com:DannyDannyDanny/methodology into main 2022-10-21 14:10:58 +02:00
10c457f31d
📝 add exercise roadmap 2022-10-03 10:33:20 +02:00
5b3af97fc3
💄 make example roadmap 2022-10-03 10:31:02 +02:00
7 changed files with 113 additions and 17 deletions

View file

@ -1,8 +1,14 @@
## [DannyDannyDanny/Methodology](https://github.com/DannyDannyDanny/methodology/) ## [DannyDannyDanny/Methodology](https://github.com/DannyDannyDanny/methodology/)
Conventions:
* [conventional comments](https://conventionalcomments.org/)
* [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)
* [conventional branch](https://conventional-branch.github.io/)
This guide focuses on designing, developing ~~and delivering~~ Data-Processing Sytems, written primarily in python, deploying to Linux servers, optionally communicating with external interfaces (APIs or DBs). The repo is actively being updated; _bookmark_ :bookmark: it, leave a _Star_ :star: or _Watch_ :eye: the repo. This guide focuses on designing, developing ~~and delivering~~ Data-Processing Sytems, written primarily in python, deploying to Linux servers, optionally communicating with external interfaces (APIs or DBs). The repo is actively being updated; _bookmark_ :bookmark: it, leave a _Star_ :star: or _Watch_ :eye: the repo.
* [repo roadmap](#roadmap) * [repo roadmap](#roadmap)
* 🔴🟡🟢 [example process roadmap](example_progress_roadmap.md)
* [gitmoji](#gitmoji-reference) * [gitmoji](#gitmoji-reference)
* [planning](project_planning_contracting.md) * [planning](project_planning_contracting.md)
* ideation / design (coming soon) * ideation / design (coming soon)
@ -12,8 +18,9 @@ This guide focuses on designing, developing ~~and delivering~~ Data-Processing S
* Deployment (coming soon) * Deployment (coming soon)
* Launch (coming soon) * Launch (coming soon)
* Maintenance (coming soon) * Maintenance (coming soon)
* [cloud engineering](cloud-engineering.md)
* [data management](data_storage.md) * [data management](data_storage.md)
* [tools](tools.md) (:construction: under construction :construction:) * [tools](tools.md) :construction:
* [philosophy](philosophy.md) * [philosophy](philosophy.md)
* [scripts](scripts/) * [scripts](scripts/)
* [emoji_shortlist](scripts/emoji_shortlist.py) * [emoji_shortlist](scripts/emoji_shortlist.py)

3
cloud-engineering.md Normal file
View file

@ -0,0 +1,3 @@
# Cloud Engineering
* [general guidance](https://www.lockedinspace.com/posts/001.html)

View file

@ -0,0 +1,44 @@
## Datasets
Which datasets are in the cloud?
🔴 - dataset in cloud
🟡 - dataset migration in progress
🟢 - dataset entirely migrated
* Dataset1
* 🟢 Dataset2
* 🟢 Dataset 2
* 🟡 Dataset 3
* 🔴 Dataset 4
* 🔴 Dataset 5
* 🔴 Dataset 6
* 🔴 Dataset 7
## Projects
What projects are fully in the cloud?
🔴 - project not in cloud
🟡 - project migration in progress
🟢 - project entirely in cloud
* 🟢 Project 1
* 🟡 Project 2
* 🟡 Project 3
* 🔴 Project 4
* 🔴 Project 5
## Users
Who is in the cloud?
🔴 - no projects in cloud
🟡 - some projects in cloud
🟢 - all projects in cloud
* 🟢 User 1
* 🟢 User 2
* 🟡 User 3
* 🟡 User 4
* 🔴 User 5

View file

@ -1,2 +1,2 @@
# Index For VIMWIKI # Index For methodology/VIMWIKI
* [readme.md](README.md) * [readme.md](README.md)

View file

@ -1,6 +1,14 @@
### Development ### Development
* Development Cycle [Agile](https://www.atlassian.com/agile/scrum/sprints) * Development Cycle [Agile](https://www.atlassian.com/agile/scrum/sprints)
#### Backlog Refinement
* Fibonacci Story Points: 1 2 3 5 8 13 20 40 100
* Each Story should have an epic
* Example Description:
* **Background**: Who? Why? What? How?
* **Expected Outcome**: measurable change from before / after completion.
* **Dependencies**: descriptions / approval from ABC / acceptance criteria / uaser acceotance testing
## Development Infrastructure ## Development Infrastructure
* **[Setup Dev Machine](setup-dev-machine.md)** * **[Setup Dev Machine](setup-dev-machine.md)**
* **Setup Environments** * **Setup Environments**
@ -17,6 +25,7 @@
* Setup [Travis-CI build testing](https://docs.travis-ci.com/user/customizing-the-build/#building-specific-branches) * Setup [Travis-CI build testing](https://docs.travis-ci.com/user/customizing-the-build/#building-specific-branches)
* Add an [`.EditorConfig` file](https://editorconfig.org/) * Add an [`.EditorConfig` file](https://editorconfig.org/)
* Add [git commit template](https://gist.github.com/lisawolderiksen/a7b99d94c92c6671181611be1641c733#file-git-commit-template-md) * Add [git commit template](https://gist.github.com/lisawolderiksen/a7b99d94c92c6671181611be1641c733#file-git-commit-template-md)
* Branching strategy: small teams might want to adopt [trunk based development](https://trunkbaseddevelopment.com/)
* **Documentation** * **Documentation**
* Your repo should have a one-liner for isntallation andd running: (docker-compose.yml + `doco up`) * Your repo should have a one-liner for isntallation andd running: (docker-compose.yml + `doco up`)
@ -77,6 +86,9 @@ git log --follow -- filename
# search code in all history # search code in all history
git log -S "some_old_varname" --oneline --all git log -S "some_old_varname" --oneline --all
# files changed on your branch compared to origin/main i.e. **files changed** in a Github PR
git diff --name-only origin/main
``` ```
### Submitting multiple PRs ### Submitting multiple PRs

View file

@ -1,3 +1,46 @@
## database file-caching
```
from pathlib import Path
from snowflake.connector import connect
import pandas as pd
import hashlib
def get_df(query, env, use_cache=True):
print(f'{query[:100] = }')
if env == "prod":
role = "COSUTMER"
warehouse = "CLOWN_COSTUMES"
elif env == "sand":
role = "CUSTOMER"
warehouse = "CUSTOMER_INFORMATION"
else:
raise ValueError(f"env must be prod or sand - recieved: {env}")
hash_query_4_digits = hashlib.shake_128(query.encode()).hexdigest(4)
cache_pkl_path = Path(f"/tmp/cache-{env}-{hash_query_4_digits}.pkl")
print(cache_pkl_path.exists(), cache_pkl_path)
if cache_pkl_path.exists() and use_cache:
print('loading cached data')
df = pd.read_pickle(cache_pkl_path)
return df
print("fetching & caching data")
with connect(
authenticator="externalbrowser",
user="user@company.com",
account=f"company-{env}",
role=role,
warehouse=warehouse,
) as con:
cur = con.cursor()
cur.execute(query)
df = cur.fetch_pandas_all()
df.to_pickle(cache_pkl_path)
return df
```
## Python Kernel Management ## Python Kernel Management
``` ```
# install new kernel "my_new_env" # install new kernel "my_new_env"

View file

@ -1,17 +1,4 @@
# Dev Machine # Dev Machine
🚧 I'm currently in the process of [switching to Linux](https://github.com/DannyDannyDanny/methodology/issues/5). This page is made redundant by: [DannyDannyDanny/dotfiles](https://github.com/DannyDannyDanny/dotfiles)
> TODO: delete this page
🧤 Get comfortable with these tools on a system you are familiar with like MacOS or Windows (via Windows-Subsystem-Linux).
| Tool |Linux-Compatible | MacOS-compatible | Description |
|--- |--- | --- | --- |
| [`zsh`](https://www.zsh.org/) + [omz](https://github.com/ohmyzsh/ohmyzsh) | ✅ | ✅ | Preferred Shell + Configurator |
| [`lf`](https://github.com/gokcehan/lf) | ✅ | ✅ | CLI file browser |
| [`vim`](https://github.com/gokcehan/lf) | ✅ | ✅ | CLI text editor |
| ~[`mutt`](http://www.mutt.org/)~ | ✅ | ✅ | ~CLI email client~ (just use a browser for now) |
🔖 Further reading:
* [Unix as IDE](https://blog.sanctum.geek.nz/series/unix-as-ide/)
* [LARBS progs.csv](https://github.com/LukeSmithxyz/LARBS/blob/master/progs.csv)