Skip to main content

AslUtils

Utility scripts to parse ASL files and the actual ASL language.

Installing

Preferably this is installed in a virtual environment. To create a virtual environment in the current directory write python3 -m venv env/. To enter the virtual environment use source env/bin/activate.

To install simply use pip: pip3 install aslutils.

Installing for development

To install the package for development, clone it and then install it in editable mode: pip3 install -e /path/to/aslutils/ (i.e. the directory that contains setup.py).

Using aslutils

The documentation can be found at https://alehed.github.io/aslutils/

Developing

Generating the documentation

aslutils uses sphinx (pip install sphinx) to generate the documentation. From the root folder the command to generate the html documentation is sphinx-build -b html docs/source docs/build. The docs can then be found at docs/build/index.html.

If anything in the source changes (class names, new classes etc.) the aslutils.rst and modules.rst files have to be regenerated. This can be done via sphinx-apidoc -f -o docs/source/ aslutils. Do not edit those files manually as the changes will be overwritten once sphinx-apidoc is rerun.

Build time dependencies

In order to build the project locally, you need to have antlr4 (https://www.antlr.org/) and the corresponding antlr4 python runtime installed (pip install antlr4-python3-runtime==4.?.?, the version has to match the installed antlr version).

Building the parser

The ASL visitor code is generated with antlr4 -Dlanguage=Python3 -no-listener -visitor ./aslutils/ASL.g4. This has to be done every time the file ASL.g4 is changed.

Packaging

Note: I am currently the sole packager of this project, so this section is only for reference to my later self.

Once antlr is installed, this step is easy. The dependencies for packaging are: wheel, setuptools and twine (pip install wheel setuptools twine)

After old versions are removed from the dist directory rm dist/*, the package needs to be generated with: python setup.py sdist bdist_wheel --universal. Then it can be uploaded using twine: twine upload dist/*.

Release process

Again, this is only for myself.

  1. Decide to do a new release
  2. Fully regenerate the documentation and commit the changes
  3. Bump the version in setup.py
  4. Tag the latest commit and push it
  5. Publish the documentation with the provided script
  6. Do the step described in packaging

Metadata

Release files for aslutils 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aslutils 0.1.2
File Size Uploaded
aslutils-0.1.2.tar.gz 32.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aslutils 0.1.2
File Interpreter ABI Platform
aslutils-0.1.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 74.6 kB

Release files / aslutils-0.1.2.tar.gz

Download URL aslutils-0.1.2.tar.gz
Size 32.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dd77fb7bae6d8101b03348bdba08e2f29d36763c70e401b11c3451a718f57abc
BLAKE2b-256 checksum
How to use checksums
260462c2d12d31cf463b98622e86216d58da3303e4814ced61012ce22bb3eb58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

Release files / aslutils-0.1.2-py2.py3-none-any.whl

Download URL aslutils-0.1.2-py2.py3-none-any.whl
Size 41.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
19504edca59112338d8fc4e077f5673ccef0354a9fe875720b56eb89ef8a5975
BLAKE2b-256 checksum
How to use checksums
158d625876cbbd34a13ab54dda854feeb51b592dcc7dea5ac989b43ac530bb36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page