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

Rewrite #62

Open
6 of 17 tasks
cathaypacific8747 opened this issue Dec 18, 2024 · 0 comments
Open
6 of 17 tasks

Rewrite #62

cathaypacific8747 opened this issue Dec 18, 2024 · 0 comments

Comments

@cathaypacific8747
Copy link

cathaypacific8747 commented Dec 18, 2024

We are rewriting the project to be more modular and typed. Since there will be significant breaking changes, commits will be added in the dev branch and merged into master once stabilised.

todo:

  • Use uv (modern package manager)
  • make web and era5 optional dependencies
  • Use ruff (linting)
  • Use mkdocs
  • Use types whenever possible, check with mypy
  • update testing
  • do not hardcode cache paths #63
  • replace staticmethods in Calculation, Unit, Nav to pure functions
  • Performance should not store Bada
  • split god objects
  • Use fastapi
    • update client: use simple REST calls instead of socketio (to automatically generate an OpenAPI spec and make
      debugging much easier)
    • remove code duplication
  • drop requirement for conda
  • migrate yarn to npm
  • update docs

non-goals:

some notes:

  • makes heavy use of structure-of-arrays (Traffic, Autopilot)
  • Environment responsible for many tasks: simulation, socket IO, file IO.
  • Aircraft doesn't hold its own data, but acts as a pointer/slice to the arrays inside Traffic
    • dangling pointers when public Traffic.del_aircraft() is called
  • environment spawned on socketio run_simulation signal
@cathaypacific8747 cathaypacific8747 converted this from a draft issue Dec 18, 2024
@cathaypacific8747 cathaypacific8747 changed the title migrate to uv, ruff and mypy Rewrite Dec 18, 2024
This was referenced Dec 18, 2024
cathaypacific8747 added a commit that referenced this issue Dec 18, 2024
- fix: broken numpy docs in python files
- collapse `rst` api references to single index md
- style: fix test E501
- ci: update joss, paper
- remove: forge `environment.yml` (deprecate conda)
- remove: `MANIFEST.in` (replaced with hatchling)
cathaypacific8747 added a commit that referenced this issue Dec 20, 2024
- original code largely intact. only adding types to check for logic errors.
- fix: explicitly use uint16 for enums
- fix: `end_time` -> `duration_s`
- fix: `global_time` should be `seconds_since_start`
- rename: `traffic.ap` -> `traffic.autopilot`
- rename: `ConvertHistoricDemo` time -> timestamps
- fix misc logic errors
- chore: properly run ruff, mypy and tests with uv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

1 participant