A_GIS Python Package
pip install A_GIS
Pronounced with a long "a" like AEGIS, this is a package for functional python.
Distill and recompose
Checkout out notebooks/roundtrip.ipynb for an example of round-tripping.
In the __A_GIS__ directory we can have the segmented data
so that AI can operate on different parts more efficiently.
The basic sequence is
- raw function only (8 lines or less ideally)
- add comments and spacing
- add docstring
- send through formatter
- this is now a complete function like someone would want to see in a code base
To split it up again we go in reverse.
- remove docstring
- remove comments and spacing (save in file)
- save raw function
Now you can see easily if the raw function changed. Once this iteration converges, the diff should be zero.
This process has advantages in that we can isolate the docstring and work on making that beautiful.
It could get examples, and all kinds of crazy awesome reformatting as its own document. Then we can reapply comments to the raw source, THEN the docstring, then format. We could send this to an AI now to create better comments and then ONLY update the comments file. I think the comments are somewhat dependent on the docstring so it's nice to have this flow of regenerating comments assuming a certain docstring and visibility of the whole file.
After splitting back out and saving the raw function, you can see (with git diff for example), if the AI changed the execution of the code. One could imagine asking the AI to split a function into several that don't exceed e.g. 9 lines for example.
This scheme gives us a way to then split those functions and send them to their place on the file system.
By going to such small granularity, we should be able to fit in many AIs token counts and they should be able to design tests and examples much easier.
We could also, based on similarity metrics for the raw functions, make sure AI aren't creating a bunch of extra functions. I.e. if they create a new one that has high similarity to an existing one, we could ask it to use the existing one instead, or propose modifications to the existing one, e.g. optional arguments, that would make it work.
It would be interesting to see what an AI would generate in terms of a code base with this approach. It should arrive at lots of small functions that are basically idioms, like A_GIS.File.read().
You should be able to apply this approach hierarchically to handle tests
for example, each test a function. This should be a totally functional
based system. Inside the functions we may want helper classes,
especially for testing. We should start
these names with an _ to make sure they do not appear in the public
API.
Finally, it should be possible to hash the raw function content like
IPFS and provide these in a distributed computing framework, where you
basically call a function by the hash, output = A_GIS.<hash>(input)
which ensures you get a specific version of that function even across
different versions of A_GIS. All A_GIS functions should require
keywords which may help with handling serialized data in dictionaries
and such.
Nice Tree Output
tree -I *.pyc -I __A_GIS__ -I __init__.py -I __pycache__ -I tests A_GIS/
Metadata
Release files for A-GIS 0.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| A_GIS-0.8.1.tar.gz | 22.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| A_GIS-0.8.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 58.5 kB
Release files / A_GIS-0.8.1.tar.gz
| Download URL | A_GIS-0.8.1.tar.gz |
|---|---|
| Size | 22.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d555b9aa45aaf9addee2b9a67ecfe830a8e62cb2e55cebda46fb7ce871656ac
|
|
BLAKE2b-256 checksum How to use checksums |
9c57da33e3a0188b45f3a413594c1edbbc8e3cd66926f4e4767cc42c4ee99061
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.8
|
Release files / A_GIS-0.8.1-py3-none-any.whl
| Download URL | A_GIS-0.8.1-py3-none-any.whl |
|---|---|
| Size | 35.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68f4a3645fe6711c1815394f2063b605f5561bf90d90e9b6139449880661bfd9
|
|
BLAKE2b-256 checksum How to use checksums |
28f32bfb9bb25e7084cb552cf374bcc7059000d2d4772b4afad72ec1021fc718
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.8
|
Security for A-GIS 0.8.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.