Coder Social home page Coder Social logo

d2animdata's People

Contributors

pastelmind avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

shakahl

d2animdata's Issues

Support additional file formats

Let's add support for more file formats. I can leverage the extras_require feature of setuptools (or the requires-extra option of flit, if I switch over to it) to add conditional dependencies. I can then detect which optional dependencies are available, and make related features selectively available.

File Formats

  • JSON5: Minor improvements to JSON. Since we already support JSON, migration would be quite easy.
    • Dependency: dpranke/pyjson5 AKA json5.
    • PyJSON5 requires VC++ to build on Windows and provides no wheels, so no go.
  • YAML: A popular configuration format. It is quite complex, though, so I might not use it.
  • TOML: An increasingly popular alternative to YAML with less lenient syntax. Since I am already using this in one of my projects, adding support for this should be trivial.

Move all tool config into pyproject.toml

The goal is to reduce the number of config files as much as possible.

Speed up CI/CD

Currently, the entire CI/CD Workflow (see .github/workflows/build.yml) takes about 2 minutes, not including the publish Job). This is too long for a simple one-file distribution.

A significant amount of time is spent on installing dependencies. Windows runners in particular spend inordinate amounts of time on pip install. See the stats for run 52035558, which ran on the current HEAD (79e4191):

Job Installing Dependencies (s) Total (s) Percentage
build 8 14 57.1%
lint (black) 14 23 60.9%
lint (isort) 16 23 69.6%
lint (pylint) 11 19 57.9%
test (ubuntu, py37) 12 23 52.2%
test (ubuntu, py38) 11 20 55.0%
test (windows, py37) 48 67 71.6%
test (windows, py38) 34 52 65.4%

Solutions

Install needed dependencies only

Only install dependencies required for each job. The lint jobs don't need tox. The test jobs don't need Pylint. No job needs pipdeptree, as I use it for examining dependencies.

To do so, split requirements-dev.txt into multiple files: linting, building-and-testing, and miscellaneous development tools. More fine-grained splitting is possible (requirements-lint-black.txt, requirements-lint-pylint.txt, etc.), but it would make managing dependencies a nightmare.

Unfortunately, the dependencies for building wheels (setuptools, wheel, etc.) must be installed on both the build and test jobs. This is because I want to test both sdists and wheels.

(Rejected) Merge build and test jobs

Since building sdists and wheels take a trivial amount of time, we could reduce the overall time spent by building them directly in each test job. This eliminates the need for a separate build job.

However, this means that make each test job would uses sdists and wheels built on its own platform and Python runtime, not the ones published to PyPI. The status quo ensures that I am actually testing what is published. Hence, this idea is rejected.

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.