GithubHelp home page GithubHelp logo

scisharp / codeminion Goto Github PK

View Code? Open in Web Editor NEW
34.0 18.0 13.0 23.17 MB

A code generator framework capable of auto-generating the APIs of several SciSharp libraries.

License: Apache License 2.0

C# 99.61% Python 0.39%

codeminion's Introduction

CodeMinion

CodeMinion

A code generator framework written by the SciSharp team to generate the APIs of several SciSharp libraries. You code the intersting parts, the minion writes the rest for you.

The framework consists of code generator named The Minion.

The Minion

The Minion is capable of generating the source code of entire libraries from model definitions and is currently specialized on wrapping Python libraries using Pythonnet. The model definitions are usually harvested off of HTML documentation pages.

Generated by the Minion

These libraries have been generated by CodeMinion from Python docs:

  • Numpy.NET ... 39,103 lines of code (mostly done)
  • Torch.NET ... 10,767 lines of code (work in progress)
  • Keras.NET ... 7,573 lines of code (mostly done)
  • SpaCy.NET ... (work in progress)

Contributing to CodeMinion

Any help is appreciated. If you fix bugs or improve anything please send a PR.

  • Be sure not to make manual changes in generated files! Instead the generator has to be fixed
  • When changing the generator, generate the code for all generated projects (i.e. Numpy.NET and Torch.NET) and check the changes in the generated code (i.e. by looking over the git diff) to see that nothing broke.
  • When you check in changes in the generator, please also check in the changes it has on the generated code.

codeminion's People

Contributors

deepakkumar1984 avatar henon avatar nucs avatar oceania2018 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codeminion's Issues

[Suggestion] Proper Documentation Syntax

I wanted to copy documentation from Numpy.NET to use in NumSharp and noticed that the documentation there looks like the following:

/// <summary>
/// Return evenly spaced values within a given interval.
/// 
/// Values are generated within the half-open interval [start, stop)
/// (in other words, the interval including start but excluding stop).
/// For integer arguments the function is equivalent to the Python built-in
/// range function, but returns an ndarray rather than a list.
/// 
/// When using a non-integer step, such as 0.1, the results will often not
/// be consistent.  It is better to use numpy.linspace for these cases.
/// </summary>
/// <param name="start">
/// Start of interval.  The interval includes this value.  The default
/// start value is 0.
/// </param>
/// <param name="stop">
/// End of interval.  The interval does not include this value, except
/// in some cases where step is not an integer and floating point
/// round-off affects the length of out.
/// </param>
/// <param name="step">
/// Spacing between values.  For any output out, this is the distance
/// between two adjacent values, out[i+1] - out[i].  The default
/// step size is 1.  If step is specified as a position argument,
/// start must also be given.
/// </param>
/// <param name="dtype">
/// The type of the output array.  If dtype is not given, infer the data
/// type from the other input arguments.
/// </param>
/// <returns>
/// Array of evenly spaced values.
/// 
/// For floating point arguments, the length of the result is
/// ceil((stop - start)/step).  Because of floating point overflow,
/// this rule may result in the last element of out being greater
/// than stop.
/// </returns>
public static NDarray arange(short start, short stop, short step = 1, Dtype dtype = null)
    => NumPy.Instance.arange(start, stop, step:step, dtype:dtype);

When you view it in quick-view, it looks like this:
image

If you replace every end of sentence with <br></br>, it looks like this which is much more readable (this example is not even on the worst case):
image

Made a quick regex to help find end of sentences.

(?:(?<=\w|\)|\])(?<!\d)|(?<=\s\d))\.(?=(?:\s|$))

Live: https://regex101.com/r/SmjBsp/1
Usage: Regex.Replace(input, regex, ".<br></br>\n", RegexOptions.MultiLine)

It is also common to add \t before start of each line just to make it much more comfy to the eye.

image

CodeMinion solution misses Python.Runtime.csproj

I can't compile any project from the CodeMinion solution, error below:

Severity	Code	Description	Project	File	Line	Suppression State
Error	NU1104	Unable to find project 'C:\Users\epignatel\Documents\repos\pythonnet\src\runtime\Python.Runtime.csproj'. Check that the project reference is valid and that the project file exists.	Python.Included	C:\Users\epignatel\Documents\repos\codeminion\src\Python.Included\Python.Included.csproj	1	

Specifically, the Python.Runtime project does not load (unavailable).

Am I missing something?

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.