mProjectsCode / obsidian-stats

https://www.moritzjung.dev/obsidian-stats/
GNU General Public License v3.0
14 stars 3 forks source link

Tracking & Visualising Releases Data #2

Closed Fevol closed 10 months ago

Fevol commented 11 months ago

This PR tracks the progress for issue #1.

Progress:

mProjectsCode commented 10 months ago

Some things I noticed:

Fevol commented 10 months ago
  • the svelte files run client side, so the data passed to them should only contain the relevant data and the preprocessing should happen in the astro files, which are evaluated at build time
---
import { getDownloadsPerOS, getNormalisedDownloadsPerOS } from "../../../../src/release/data";
import ReleaseDataFile from '../../../../releases-full-data.json' assert { type: 'json' };
import ReleaseDownloadsChart from '../svelte/releaseDownloadChart.svelte';
import ReleaseRelativeDownloadsChart from '../svelte/releaseRelativeDownloadChart.svelte';

const downloadDataPoints = getDownloadsPerOS(ReleaseDataFile);
const normalisedDownloadDataPoints = getNormalisedDownloadsPerOS(ReleaseDataFile);
---
...

This is the current code for the Astro file, as far as I understand (though granted, this is my first encounter with Astro), is that everything above the --- is considered as part of the preprocessing? Or are there optimizations that could be made here?


  • since github has a 100MB file size limit, the json files should only contain relevant data. E.g. I don't think the size of releases is needed

Ah yeah, I added the download sizes so the package size of Obsidian could be tracked over time. Since the size of the full releases json is only about 150KB, I think it shouldn't be too much of an impact.

mProjectsCode commented 10 months ago

This is the current code for the Astro file, as far as I understand (though granted, this is my first encounter with Astro), is that everything above the --- is considered as part of the preprocessing? Or are there optimizations that could be made here?

Yeah, that is correct. I was more referring to the grouping by OS that you do in the svelte files. But looking at it closer now, that is probably okay.

Ah yeah, I added the download sizes so the package size of Obsidian could be tracked over time. Since the size of the full releases json is only about 150KB, I think it shouldn't be too much of an impact.

Ah ok, Yeah that is fine then.