Skip to content

Commit

Permalink
Merge branch 'installer_working' of https://github.com/Avik-creator/c…
Browse files Browse the repository at this point in the history
…onda-dot-org into installer_working
  • Loading branch information
Avik-creator committed Nov 14, 2024
2 parents a008798 + 52b1d68 commit 23fcb8e
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 51 deletions.
97 changes: 54 additions & 43 deletions src/components/Installer/index.jsx
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
import React, { useState } from 'react';
import styles from './styles.module.css';
import React, { useState } from "react";
import styles from "./styles.module.css";

export default function CondaInstallerSelector() {
const [os, setOs] = useState('');
const [arch, setArch] = useState('');
const [installerType, setInstallerType] = useState('');
const [os, setOs] = useState("");
const [arch, setArch] = useState("");
const [installerType, setInstallerType] = useState("");

const osArchitectures = {
Linux: ['x64', 'aarch64', 'ppc64le'],
macOS: ['x64', 'ARM64'],
Windows: ['x64', 'ARM64 (Beta)'],
Linux: ["x64", "aarch64", "ppc64le"],
macOS: ["x64", "ARM64"],
Windows: ["x64", "ARM64 (Beta)"],
};

const installerData = {
Anaconda: {
name: 'Anaconda',
url: 'https://docs.anaconda.com/free/anaconda/install/index.html',
defaultChannel: 'defaults',
description: 'Complete distribution for scientific Python development',
name: "Anaconda",
url: "https://docs.anaconda.com/free/anaconda/install/index.html",
defaultChannel: "defaults",
description: "Complete distribution for scientific Python development",
},
Miniconda: {
name: 'Miniconda',
url: 'https://docs.conda.io/en/latest/miniconda.html',
defaultChannel: 'defaults',
description: 'Minimal conda installer with Python',
name: "Miniconda",
url: "https://docs.conda.io/en/latest/miniconda.html",
defaultChannel: "defaults",
description: "Minimal conda installer with Python",
},
Miniforge: {
name: 'Miniforge',
url: 'https://github.com/conda-forge/miniforge',
defaultChannel: 'conda-forge',
description: 'Community-driven minimal installer using conda-forge',
name: "Miniforge",
url: "https://github.com/conda-forge/miniforge",
defaultChannel: "conda-forge",
description: "Community-driven minimal installer using conda-forge",
},
Mambaforge: {
name: 'Mambaforge',
url: 'https://github.com/conda-forge/miniforge#mambaforge',
defaultChannel: 'conda-forge',
description: 'Miniforge variant with mamba as default package manager',
name: "Mambaforge",
url: "https://github.com/conda-forge/miniforge#mambaforge",
defaultChannel: "conda-forge",
description: "Miniforge variant with mamba as default package manager",
},
Micromamba: {
name: 'Micromamba',
url: 'https://mamba.readthedocs.io/en/latest/installation.html#micromamba',
defaultChannel: 'conda-forge',
description: 'Standalone fast package manager (no conda required)',
name: "Micromamba",
url: "https://mamba.readthedocs.io/en/latest/installation.html#micromamba",
defaultChannel: "conda-forge",
description: "Standalone fast package manager (no conda required)",
isStandalone: true,
},
Pixi: {
name: 'Pixi',
url: 'https://prefix.dev/docs/pixi/installation',
defaultChannel: 'conda-forge',
description: 'Modern package management solution for Python, C++, and R',
name: "Pixi",
url: "https://prefix.dev/docs/pixi/installation",
defaultChannel: "conda-forge",
description: "Modern package management solution for Python, C++, and R",
isStandalone: true,
},
};
Expand All @@ -73,15 +73,15 @@ export default function CondaInstallerSelector() {
<div className={styles.form_group}>
<div>
<label htmlFor="os-select" className={styles.label}>
{' '}
{" "}
Operating System
</label>
<select
id="os-select"
value={os}
onChange={(e) => {
setOs(e.target.value);
setArch('');
setArch("");
}}
className={styles.select}
>
Expand All @@ -97,10 +97,15 @@ export default function CondaInstallerSelector() {
{os && (
<div>
<label htmlFor="arch-select" className={styles.label}>
{' '}
{" "}
Architecture
</label>
<select id="arch-select" value={arch} onChange={(e) => setArch(e.target.value)} className={styles.select}>
<select
id="arch-select"
value={arch}
onChange={(e) => setArch(e.target.value)}
className={styles.select}
>
<option value="">Select Architecture</option>
{osArchitectures[os].map((archOption) => (
<option key={archOption} value={archOption}>
Expand All @@ -113,7 +118,7 @@ export default function CondaInstallerSelector() {

<div>
<label htmlFor="installer-select" className={styles.label}>
{' '}
{" "}
Installer Type
</label>
<select
Expand Down Expand Up @@ -141,10 +146,10 @@ export default function CondaInstallerSelector() {
{os}
</li>
{arch && (
<li>
Architecture:
{arch}
</li>
<li>
Architecture:
{arch}
</li>
)}
<li>
Installer:
Expand All @@ -159,15 +164,21 @@ export default function CondaInstallerSelector() {

<div className={styles.description}>
<p>{installerDetails.description}</p>
<a href={installerDetails.url} target="_blank" rel="noopener noreferrer" className={styles.link}>
<a
href={installerDetails.url}
target="_blank"
rel="noopener noreferrer"
className={styles.link}
>
Installation Guide →
</a>
</div>

{installerDetails.isStandalone && (
<div className={styles.standalone_warning}>
<p>
⚠️ This is a standalone tool that does not require a full conda installation.
⚠️ This is a standalone tool that does not require a full
conda installation.
</p>
</div>
)}
Expand Down
16 changes: 8 additions & 8 deletions src/pages/index.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import Header from '../components/Header';
import Info from '../components/Info';
import Features from '../components/Features';
import News from '../components/News';
import styles from './index.module.css';
import React from "react";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import Layout from "@theme/Layout";
import Header from "../components/Header";
import Info from "../components/Info";
import Features from "../components/Features";
import News from "../components/News";
import styles from "./index.module.css";

export default function Home() {
const { siteConfig } = useDocusaurusContext();
Expand Down

0 comments on commit 23fcb8e

Please sign in to comment.