Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conda to pixi switch #53

Merged
merged 30 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5a41878
conda to pixi switch
sayantikabanik Oct 22, 2024
40b165b
pixi tasks updated
sayantikabanik Oct 24, 2024
ee76927
pixi updated
sayantikabanik Oct 24, 2024
5e1f068
workflow_dispatch=TRUE
sayantikabanik Oct 24, 2024
e4af4cf
pixi action version update
sayantikabanik Oct 24, 2024
977b809
cache enabled
sayantikabanik Oct 24, 2024
8d3fb33
explicit command
sayantikabanik Oct 24, 2024
b496b57
no shell
sayantikabanik Oct 24, 2024
9b5d885
update shell command
sayantikabanik Oct 24, 2024
50139f4
more updates
sayantikabanik Oct 24, 2024
ef041da
typo
sayantikabanik Oct 24, 2024
048f183
fix fix
sayantikabanik Oct 24, 2024
426d3c7
fix fix fix
sayantikabanik Oct 24, 2024
0430a2c
cache enabled
sayantikabanik Oct 24, 2024
9eb4155
run removed
sayantikabanik Oct 24, 2024
21507b0
cache diabled
sayantikabanik Oct 24, 2024
8182b99
add pixi lock
sayantikabanik Oct 24, 2024
d32f6fa
env masking
sayantikabanik Oct 24, 2024
6add5eb
typo for env keyword fix
sayantikabanik Oct 24, 2024
3f32a01
manifest no?
sayantikabanik Oct 24, 2024
387d26e
last try of day
sayantikabanik Oct 24, 2024
d7e69fe
hmm
sayantikabanik Oct 24, 2024
c7cf798
hmmm
sayantikabanik Oct 24, 2024
6a5888f
drop the version
sayantikabanik Oct 25, 2024
f0efe6b
upload to artifact
sayantikabanik Oct 25, 2024
f8a94bf
no env
sayantikabanik Oct 25, 2024
7223165
platforms updated
sayantikabanik Oct 25, 2024
4943a36
remove artifact
sayantikabanik Oct 25, 2024
19ee1ef
clean up
sayantikabanik Oct 25, 2024
d1705b6
readme fix for pixi
sayantikabanik Oct 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# GitHub syntax highlighting
pixi.lock linguist-language=YAML linguist-generated=true
42 changes: 11 additions & 31 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,27 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# Moving from conda to pixi way of env management
# Read more: https://pixi.sh/dev/basic_usage/

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
workflow_dispatch:

jobs:
Env_check:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up env
uses: conda-incubator/setup-miniconda@master
- name: Set up env with pixi goodness
uses: prefix-dev/setup-[email protected]
with:
miniforge-variant: Miniforge3
miniforge-version: latest
activate-environment: journey
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false
channels: conda-forge
channel-priority: strict

- name: Install package
run: |
pip install -e .
# - name: Test with pytest
# run: |
# pytest tests/package.py
- name: Conda info
run: conda info
- name: Conda list
run: conda list

pixi-version: v0.34.0
cache: true
- run: pixi run DJ_package
- run: pixi run DJ_pre_commit
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,7 @@ dmypy.json

#FastHTML files
.sesskey

# pixi environments
.pixi
*.egg-info
21 changes: 7 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@
### 🚌 What's DataJourney?
DataJourney demonstrates how organizations can effectively manage and utilize data by harnessing the power of open-source technologies. It's designed to help navigate the complex landscape of data tools, offering a structured approach to building **scalable**, and **reproducible** data workflows.

Built on open-source principles, the framework guides users through essential steps—from **identifying** goals and **selecting tools** to **testing** and **customising** workflows. With its flexible, modular design, DataJourney can be tailored to individual needs, making it an invaluable toolkit for data professionals.

Check notice on line 21 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L21

[Google.Passive] In general, use active voice instead of passive voice ('be tailored').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('be tailored').", "location": {"path": "README.md", "range": {"start": {"line": 21, "column": 233}}}, "severity": "INFO"}

### 🛠 Current workflows covered
{✨= Experimental,
✅ = Implemented}

✅ `Python Packaging framework` design principles\
✅ `Conda` environment added\
✅ `GitHub actions` configured\
✅ `Vale.sh` configured at PR level\
✅ `Pre-commit hooks` configured for code linting/formatting\
✅ Environment management via [pixi](https://prefix.dev/)\

Check failure on line 31 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L31

[Vale.Spelling] Did you really mean 'pixi'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'pixi'?", "location": {"path": "README.md", "range": {"start": {"line": 31, "column": 31}}}, "severity": "ERROR"}
✅ Reading data from online sources using [intake](https://github.com/intake/intake)\
✅ Sample pipeline built using [Dagster](https://github.com/dagster-io/dagster)\

Check failure on line 33 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L33

[Vale.Spelling] Did you really mean 'Dagster'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Dagster'?", "location": {"path": "README.md", "range": {"start": {"line": 33, "column": 32}}}, "severity": "ERROR"}
✅ Building Dashboard using [holoviews](https://holoviews.org/gallery/index.html) + [panel](https://panel.holoviz.org/reference/index.html)\

Check failure on line 34 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L34

[Vale.Spelling] Did you really mean 'holoviews'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'holoviews'?", "location": {"path": "README.md", "range": {"start": {"line": 34, "column": 29}}}, "severity": "ERROR"}
✅ Exploratory data analysis (EDA) using [mito](https://www.trymito.io/)\

Check failure on line 35 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L35

[Vale.Spelling] Did you really mean 'mito'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'mito'?", "location": {"path": "README.md", "range": {"start": {"line": 35, "column": 42}}}, "severity": "ERROR"}
✅ Analysing source code complexity using [Wily](https://wily.readthedocs.io/en/latest/index.html)\
✅ Web UI build on [Flask](https://flask.palletsprojects.com/en/3.0.x/) \
✅ Web UI re-done and expanded with [FastHTML](https://docs.fastht.ml/)\
Expand All @@ -53,45 +53,38 @@
This dataset is licensed under Creative Commons Attribution 4.0 (https://creativecommons.org/licenses/by/4.0/)
```

#### Codespaces configured

Check failure on line 56 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L56

[Vale.Spelling] Did you really mean 'Codespaces'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Codespaces'?", "location": {"path": "README.md", "range": {"start": {"line": 56, "column": 6}}}, "severity": "ERROR"}
*Currently new pre-build images are disabled due to limited storage*

Check notice on line 57 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L57

[Google.Passive] In general, use active voice instead of passive voice ('are disabled').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('are disabled').", "location": {"path": "README.md", "range": {"start": {"line": 57, "column": 33}}}, "severity": "INFO"}

![Screenshot 2022-08-29 at 3 41 12 PM (2)](https://user-images.githubusercontent.com/17350312/187180872-881322ed-dfc7-478b-bd07-5fefc1642cb5.png)

### Environment setup using conda:
### Environment setup using pixi:

Check failure on line 61 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L61

[Vale.Spelling] Did you really mean 'pixi'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'pixi'?", "location": {"path": "README.md", "range": {"start": {"line": 61, "column": 29}}}, "severity": "ERROR"}

#### Installing miniconda
- Visit : https://docs.conda.io/en/latest/miniconda.html

#### Create a conda environment
```shell
conda env create -f environment.yml
```
```shell
conda activate journey
```
#### Installing pixi & getting started

Check failure on line 63 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L63

[Vale.Spelling] Did you really mean 'pixi'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'pixi'?", "location": {"path": "README.md", "range": {"start": {"line": 63, "column": 17}}}, "severity": "ERROR"}
- Download pixi : [prefix.dev](https://prefix.dev/)

Check failure on line 64 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L64

[Vale.Spelling] Did you really mean 'pixi'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'pixi'?", "location": {"path": "README.md", "range": {"start": {"line": 64, "column": 12}}}, "severity": "ERROR"}
- Command to activate env: `pixi shell`

Check failure on line 65 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L65

[Vale.Spelling] Did you really mean 'env'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'env'?", "location": {"path": "README.md", "range": {"start": {"line": 65, "column": 23}}}, "severity": "ERROR"}

#### Install the package locally
```shell
pip install -e .
pixi run DJ_package
```

#### 🔌 About pre-commit-hooks and activating
Just like the name suggests, pre-commit-hooks are designed to format the code based on PEP standards before committing. [More details 🗒](https://pre-commit.com/)

Check notice on line 73 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L73

[Google.Passive] In general, use active voice instead of passive voice ('are designed').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('are designed').", "location": {"path": "README.md", "range": {"start": {"line": 73, "column": 47}}}, "severity": "INFO"}

```shell
pre-commit install
pixi run DJ_pre_commit
```
### How to run the applications?

#### Dagster UI

Check failure on line 80 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L80

[Vale.Spelling] Did you really mean 'Dagster'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Dagster'?", "location": {"path": "README.md", "range": {"start": {"line": 80, "column": 6}}}, "severity": "ERROR"}
```shell
cd analytics_framework/pipeline
```
```shell
dagit -f process.py
```
![Dagit UI output](./output/dagit_ui.png)

Check failure on line 87 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L87

[Vale.Spelling] Did you really mean 'Dagit'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Dagit'?", "location": {"path": "README.md", "range": {"start": {"line": 87, "column": 3}}}, "severity": "ERROR"}

#### Panel app
```shell
Expand All @@ -101,20 +94,20 @@
python simple_app.py
```
*NOTE:*
The dashboard generated is exported into HTML format and saved as `stock_price_dashboard.html`

Check notice on line 97 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L97

[Google.Passive] In general, use active voice instead of passive voice ('is exported').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('is exported').", "location": {"path": "README.md", "range": {"start": {"line": 97, "column": 25}}}, "severity": "INFO"}

![Panel app output](./output/panel_app_stock.png)

#### Mito

Check failure on line 101 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L101

[Vale.Spelling] Did you really mean 'Mito'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Mito'?", "location": {"path": "README.md", "range": {"start": {"line": 101, "column": 6}}}, "severity": "ERROR"}

Before running the jupyter notebook `doc/mito_exp.ipynb`, run the below command

Check failure on line 103 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L103

[Vale.Spelling] Did you really mean 'jupyter'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'jupyter'?", "location": {"path": "README.md", "range": {"start": {"line": 103, "column": 20}}}, "severity": "ERROR"}
in your terminal to enable the installer. Might take some time to run.

To explore further visit [trymito.io](https://docs.trymito.io/)
```shell
python -m mitoinstaller install
```
![mito output](./output/mito_graph.png "Graph generated via mitosheet") ![mito output operation](./output/mito_operations.png "Operations performed via mitosheet")

Check failure on line 110 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L110

[Vale.Spelling] Did you really mean 'mito'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'mito'?", "location": {"path": "README.md", "range": {"start": {"line": 110, "column": 3}}}, "severity": "ERROR"}

Check failure on line 110 in README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] README.md#L110

[Vale.Spelling] Did you really mean 'mito'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'mito'?", "location": {"path": "README.md", "range": {"start": {"line": 110, "column": 75}}}, "severity": "ERROR"}


#### Display all data sources present via web UI
Expand Down
Loading
Loading