Date | What changed? |
---|---|
2022.22.11 | Created page about how to run a python script |
There is a Python script that can be used for testing the solution against the Tax Authority. Python script for retrieval, validation and submission. Clone the entire repository or download the directory below:
/test_with_Python_script_files
Before running the script you need to install Python and some libraries.
python3 --version
pip3 --version
If they are not installed, they can be installed through the terminal window
brew install python
python3 -m pip install --upgrade pip
Alternatively, a version management package can be used instead. For more information about python on Mac, you can read on homebrew:
https://formulae.brew.sh/formula/pyenv
https://docs.brew.sh/Homebrew-and-Python
sudo apt-get update
sudo apt-get install python3.8
sudo apt install python3-pip
Open the terminal in the project folder and navigate to the
`/test_with_python_script` folder.
Then install all necessary libraries.
You can also use a venv instead of installing globally, read more here: https://docs.python.org/3/library/venv.html
cd docs/test_with_Python_script
pip3 install -r requirements.txt
test_with_Python_script
under https://github.com/Skatteetaten/mva-meldingen/tree/master/docsmva_melding_innsending.py
(See under the comment "# Enter the org_number you want to submit for"). This is currently hardcoded to 999999999Update the file names in the file mva_melding_innsending.py
for the files you wish to use:
mvaMeldingInnsending_filnavn = "kompensasjon_mvakonvolutt.xml
mvaMelding_filnavn = "kompensasjon_mvamelding.xml