Giter Site home page Giter Site logo

Create framework about changes HOT 6 OPEN

ScottRobbins avatar ScottRobbins commented on August 19, 2024
Create framework

from changes.

Comments (6)

ScottRobbins avatar ScottRobbins commented on August 19, 2024

I'm breaking this into some different tasks:

  • Add ability to query releases
  • Add ability to query prereleases
  • Add ability to load release from prereleases (this is likely fast enough that I should always eager load)
  • Add ability to load the prereleases from the release (this is likely fast enough that I should always eager load)
  • Add ability to query changes
  • Add ability to load release from changes (this is likely fast enough that it should always eager load)
  • Add ability to load prerelease from changes (this should be fast enough that it should always eager load)
  • Add ability to load changes from release (this should lazy load and give option to eager load. Is there an easy way to force people to specify eager loading this?)
    • If you always eager load, I don't have performance penalties for reading the same file twice when processing a query
  • Add ability to load changes from prerelease (this should lazy load and give option to eager load. Is there an easy way to force people to specify eager loading this?)
    • If you always eager load, I don't have performance penalties for reading the same file twice when processing a query

from changes.

ScottRobbins avatar ScottRobbins commented on August 19, 2024

Should consider speed improvements by not spawning more queues/threads than necessary and consider using locks or DispatchQueue.concurrentPerform over concurrent queue + barrier

references:

from changes.

ScottRobbins avatar ScottRobbins commented on August 19, 2024

Notes for myself: The query API I want to make kind of like an ORM. Release.where(...).all(), etc.

Same with adding entries. Should take inspiration from things like GRDB and Fluent

from changes.

ScottRobbins avatar ScottRobbins commented on August 19, 2024

Reminding myself I should spend some extra time making sure I add tests, and only useful tests that test inputs and outputs.

I think this should be both unit and if possible integration tests

from changes.

ScottRobbins avatar ScottRobbins commented on August 19, 2024

A lot of these tests are going to involve mocking out the file system. I'd like if I could build a fake file system in the tests easily like

let mockFolder = MockFolder(name: ".changes") {  
  MockFolder(name: "unreleased") {
    MockFolder(name: "entries") {
      MockFile(name: "blah.json")
        .data(data)
    }
  }
  
  MockFolder(name: "releases") {
    ...
  }
}

from changes.

ScottRobbins avatar ScottRobbins commented on August 19, 2024

Note fr myself: I should go back through and make sure my naming for the folders in my unit tests make sense. Like what is the "working" file and what is the "changes" file, etc. Are those clear am I using them consistently?

from changes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.