Skip to content

A compact command-line utility meticulously verifying the adherence of XBRL Taxonomy Packages to the rigorous standards set forth by the Taxonomy Package 1.0 Standard.

License

Notifications You must be signed in to change notification settings

CH6832/xbrl-taxonomy-package-conformant-processor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

XBRL Taxonomy Package Conformant Processor

πŸ“° About the project

A small command line program that checks whether an XBRL Taxonomy Package complies with the Standard Taxonomy Package 1.0 and adjusts it if necessary.

How it works

  1. Run for example app.py EDINET "full/path/to/input/archive.zip". The app.py file is the starting point of the application. EDINET represents the Electronic Disclosure System provided by the JFSA. The path afterwards can be any path locating an XBRL Taxonomy Package (ZIP). In this case EDINET is the abbreveation of the taxonomy package provider and full/path/to/archive.zip is the path to the zip archive. Packages to test/to experiment with the application are located in the input-folder.

  2. The class Checker class in TPChecker.py analyzes the package according to the Taxonomy Package 1.0 standard. The result of the analyzation is displayed on the command line.

  3. Based on the result calculated by the Checker-class, the next step is to fix the package. TPFixer.py contains an Interface with relevant abstract methods. Each class represents a package by a specific provider. When the class is initialized, the package to fix will be copied over to the output-folder. The definied methods from the Interface are responsible for fixing the package. The result of the fixed package will be a fixed zip archive containing all relevant data.

Content overview

.
β”œβ”€β”€ .vscode/ - visual studio code settings
β”œβ”€β”€ tests/ - code and data for tests
β”œβ”€β”€ input/ - xbrl taxonomy packages
β”œβ”€β”€ output/ - folder for fixed taxonomy packages
β”œβ”€β”€ venv/ - data for virtual environemnt 
β”œβ”€β”€ .gitignore - contains folders/files ignored by git
β”œβ”€β”€ app.py - program entry point
β”œβ”€β”€ CODE_OF_CONDUCT.md - project code of conduct
β”œβ”€β”€ COPYRIGHT - project copyright
β”œβ”€β”€ LICENSE - license text
β”œβ”€β”€ README.md - relevant information about the project
β”œβ”€β”€ requirements.txt - requirements to run the project
β”œβ”€β”€ TPChecker.py - check package according to the standard
β”œβ”€β”€ TPFixer.py - Fix package according to standard
└── TPMisc.py - module with helper functions

πŸ““ Features

  • Checking and fixing:
    • xml format checking
    • case sensitivity checking (done by python)
    • archive format ceck
    • top-level directory checking and fixing
    • META-INF folder checking and fixing
    • taxonomyPackage.xml checkng and fixing
    • catalog.xml checking and fixing
    • URL resolution checking and fixing
    • Entrypoint localiazation

πŸƒ Getting started

Prerequisites and example usage

  1. Install requirements:
pip3 install -r requirements.txt
  1. Run script:
python3 app.py [PROVIDER] [PATH/TO/PKG]
python3 app.py EDINET "input/ALL_20221101/ALL_20221101.zip"
Input information:
------------------
    Provider -> EDINET
    Package  -> ..\input\ALL_20221101\ALL_20221101.zip

Analyzis results:
------------------
    DONE: Package is ZIP
    ERROR: Package has not single toplevel dir
    ERROR: Package has no META-INF folder
    ERROR: Package has no catalog.xml
    ERROR: Package has no taxonomy-package.xml

Fixing package...
    META-INF directory generated
    Top level directory generated
    Package content restructured
    catalog.xml file generated
    catalog.xml is xml file
    taxonomyPackage.xml file generated
    taxonomyPackage.xml is xml file
    Final zip generated

Output result:
--------------
    ..\output\ALL_20221101\ALL_20221101.zip is fixed!

Build and install the .whl package

  1. Upgrade packages:
py -m pip install --upgrade build 
  1. Build package:
py -m build 
  1. Install the package:
py -m pip install "dist/example_package_CHRISTOPH_HARTLEB-0.0.1-py3-none-any.whl"

Create documentation

  1. Move into dcos folder
cd docs
  1. Initilaize project:
sphinx-quickstart 
  1. Build/rebuild the documentation:
make html

πŸ’‘ Tips and Tricks

Use absolute paths for input XBRL taxonomy packages to avoid any path-related issues.
Ensure your input packages adhere to the XBRL Taxonomy Package 1.0 standard for accurate processing.

πŸ”§ Troubleshooting

If you encounter any issues while using the tool, consider the following troubleshooting steps:

  • Check if all prerequisites are installed correctly.
  • Verify that the input XBRL taxonomy package is valid and adheres to the required format.
  • Refer to the error messages for clues on what might be going wrong.
  • Search for similar issues in the project's GitHub repository or online forums.

πŸ“’ Contributing

We welcome contributions from the community! If you'd like to contribute to the project, please follow these steps:

  • Fork the repository.
  • Create a new branch for your feature or bug fix.
  • Make your changes and ensure all tests pass.
  • Submit a pull request with a clear description of your changes.

πŸ“– Documentation

For more information on how to use the tool and its features, open the official documentation in a browser of your choice.

πŸš€ Roadmap

Here are some planned features and enhancements for future releases:

Support for additional XBRL taxonomy package standards.
Improved error handling and logging.
Integration with other XBRL processing tools.

πŸ™‹ Support

If you need any assistance or have any questions about the project, feel free to reach out to us via email or open a new issue in the GitHub repository.

πŸ”– License

This project is licensed under the terms of the GPL v3.

©️ Copyright

See the COPYRIGHT file for copyright and licensing details.

πŸ“ Code of Conduct

Please review our Code of Conduct before contributing to this project.

πŸ“š Resources used to create this project

About

A compact command-line utility meticulously verifying the adherence of XBRL Taxonomy Packages to the rigorous standards set forth by the Taxonomy Package 1.0 Standard.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages