pyFitsServer is a lightweight server to facilitate the rendering and previewing of FITS (Flexible Image Transport System) files. It is designed to work in conjunction with the pyFitsVSC Visual Studio Code extension, providing backend services to support the frontend visualization capabilities.
The pyFitsServer acts as a backend server for serving FITS file previews. It processes the FITS files and provides the necessary data and/or images to the pyFitsVSC extension. This server is general enough to serve FITS previews to other clients, too.
To install pyFitsServer from pypi:
-
Make a virtual environment This will help to manage project dependencies.
python -m venv .venv source .venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Use pip to install the package
pip install pyfitsserver
-
Run the server
python -m pyfitsserver
To install and run pyFitsServer from github, follow these steps:
-
Clone the repository:
git clone https://github.com/GillySpace27/pyFitsServer.git
-
Navigate to the directory:
cd pyFitsServer
-
Create a virtual environment (optional but recommended):
This will help to manage project dependencies.
python -m venv .venv source .venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Run the server:
python server.py
or invoke the startup script
python -m pyfitsserver
-
Confirm the server is running properly by running tests (from the project root):
pytest
If everything is set up correctly, the server should be running and you should see output indicating that it is ready to accept requests.
Once the pyFitsServer is running, it will be ready to interface with the pyFitsVSC extension for Visual Studio Code. The server will handle backend operations, such as rendering and processing the FITS files, and send the necessary data back to the pyFitsVSC extension for display. See the integration instructions below.
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
pyFitsVSC is a VS Code extension designed to provide previews of FITS files seamlessly within the editor. Here’s how to use it in conjunction with pyFitsServer:
-
Ensure the server is running by following the installation steps.
-
Install the pyFitsVSC extension by following these steps:
- To install from the precompiled
.vsix
file:- Check the binary files included in this build for a functional precompiled version of the
.vsix
file and download it. - Open VS Code.
- Go to Extensions view (
Ctrl+Shift+X
). - Click the three-dot menu (
...
). - Select
Install from VSIX...
. - Browse to and select the precompiled
.vsix
file.
- Check the binary files included in this build for a functional precompiled version of the
- To compile and package from source (if needed):
- Clone the repository:
git clone https://github.com/GillySpace27/pyfitsvsc.git
- Navigate to the directory:
cd pyfitsvsc
- Install VSCE if not already installed:
npm install -g vsce
- Compile the TypeScript code:
npm run compile
- Package the extension:
vsce package
- Install the VSIX file:
- Open VS Code.
- Go to Extensions view (
Ctrl+Shift+X
). - Click the three-dot menu (
...
). - Select
Install from VSIX...
. - Browse to and select the
.vsix
file created in the previous step.
- Clone the repository:
- To install from the precompiled